tip for users with raspberry in remote location

476 views
Skip to first unread message

Flabbergast

unread,
Jun 13, 2014, 7:33:10 AM6/13/14
to weewx...@googlegroups.com

Hi,

RaspberryPi got a watchdog that can be used to monitor status of different things. I set mine up to look for changes in the weewx log file and if there is no change for 10 minutes it will reboot the system.

This is what I did:

Install the watchdog module:

sudo modprobe bcm2708_wdog

In /etc/modules add:
bcm2708_wdog

Install watchdog daemon:
sudo apt-get install watchdog chkconfig


Edit /etc/watchdog.conf to your liking.
To watch for changes in the weewx log file like I did, uncomment the lines starting with "file" and "change", mine looks like this:
file                    = /var/weewx/log/weewx.log
change                  
= 600
You might have your log file in a different location and also you might have to take a look at the timestamps in it to set a good "change" value.

Also uncomment the line starting with "watchdog-device" and edit it to be:
watchdog-device = /dev/watchdog

Enable more checks if you want.


Add the watchdog daemon to the system services:
watchdog-device = /dev/watchdog

And start it:
sudo service watchdog start

Enjoy!

drich

unread,
Jun 13, 2014, 11:27:29 AM6/13/14
to weewx...@googlegroups.com

I'm a big fan of monit (mmonit.com/monit) that does much of the same thing. It can restart the processes for you and notify you if config files change w/o your knowledge. I have it running most servers on my home servers, but I haven't set it up for weewx yet (waiting for my Vantage Pro to come back from a tune-up at Davis).

I'll probably get it up and running this weekend, if I do I'll post the config file here. It should be really straight-forward to setup.

 

---
Dan Rich <dr...@employees.org> | http://www.employees.org/~drich/ | "Step up to red alert!" "Are you sure, sir? | It means changing the bulb in the sign..." | - Red Dwarf (BBC)
--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Keffer

unread,
Jun 13, 2014, 11:55:08 AM6/13/14
to weewx-user
Just a little note that should you go this route, please keep sending error reports to us!

My goal is an extremely robust weewx that is very hard to crash. I recognize that some configurations make that tough and so a monitoring program may be in order, but my preference is to engineer out any failure modes.

-tk


wysiwyg

unread,
Jun 16, 2014, 8:20:33 AM6/16/14
to weewx...@googlegroups.com
This watchdog function is good to know !

On my side I didnt face so much weewx crashes but sometime the raspberry loses the wifi connection (this raspberry is not at my home and I can access to it almost only by SSH)
To solve this, I have a very short script launched by cron every hour: it pings my modem and if no ping answer it will switch on/off the wifi.
Similar script is also launched once a day and reboot in case connection is still missing.


In case you have or fear some weewx crashes,an other solution is to launch periodically  "sudo service weewx start".
it will start weewx if stopped and just tells it is already started if it is already running.


Thomas Hackler

unread,
Nov 3, 2023, 6:41:26 AM11/3/23
to weewx-user
Hello,
it is an old topic but currently interesting for me.
I try to use monit.
Do you have an example of your rule you use to watch weewx for me? Thank you!

Thomas Hackler

unread,
Mar 26, 2024, 9:02:53 AM3/26/24
to weewx-user
Reply all
Reply to author
Forward
0 new messages