Thanks Darren & Ged.
For now I've updated the restart script that we use after changing
configuration to prevent it being reloaded if --check fails
echo "Checking Config Syntax"
/opt/smokeping/bin/smokeping --check
RESULT=$?
if [ $RESULT -ne 0 ]; then
echo "smokeping failed with code $RESULT - CHECK SYNTAX"
else
echo "Done. Reloading smokeping"
sudo -u apache /opt/smokeping/bin/smokeping --reload
echo "Done. Restarting Apache"
service httpd restart
echo "Done. Please check smokeping is running correctly"
fi
I do like the idea of storing hosts in a DB and re-generating the config file
from that. We monitor somewhere in the region of 100 hosts so I'll look in to
doing something similar.
Thanks for your help all.
--------------------------
Regards,
Jason Yates
-----Original Message-----
From: Darren Murphy [mailto:[email protected]]
Sent: 17 July 2012 11:56
To: Jason Yates
Cc: [email protected]
Subject: Re: [smokeping-users] 500 Error on Master crashes Slaves?
On 17 July 2012 18:22, Jason Yates <[email protected]> wrote:
>
> Is it possible to stop the slaves from killing smokeping on the first
> 500 error? Or have it automatically restart? I’d prefer not to have to
> go around and restart the slave processes each time a config error is made.
>
A couple of suggestions:
1. To minimise the chances of config errors, automate the generation of your
config file. This is probably only worth doing if you are monitoring lots of
hosts, and have frequent changes. The approach I took was to have a base
template that defines all the global options, and then store all the individual
host data in a database. A simple perl script (iinvoked via crond) checks the
database for changes, and if any are detected a new master config is generated
and smokeping gets a restart.
2. To keep your slaves running, have a look at monit
(http://mmonit.com/monit/) - very easy to install and configure, and does the
job nicely.
hope this helps,
Darren
________________________________________________________________________
In order to protect our email recipients, Betfair Group use SkyScan from
MessageLabs to scan all Incoming and Outgoing mail for viruses.
________________________________________________________________________
_______________________________________________
smokeping-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users