Running check_nagios by ssh
Andy Shellam (Mailing Lists)
andy.shellam-lists at mailnetwork.co.uk
Tue Oct 31 01:03:19 CET 2006
As a quick thought, you could write a simple Bash/PHP/whatever script to
grep the response for the "ok" flag (or warning flag) - or even a zero
process count.
I don't know how Nagios would take over, but if it was a simple case of
the slave doesn't run Nagios until the primary goes down, then your
shell script, upon encountering a zero process count from the master,
could fire up Nagios on the slave - once it detects the primary Nagios
is up again, it could kill off the secondary?
Just a few thoughts.
Andy.
Lehman, John wrote:
> Hello,
> I am trying to run the check_nagios command from one machine to another.
> (slave to master)
>
> I can run the following from the command prompt on the "slave" machine:
>
> Note: the master I am checking is 10.130.4.80
>
> /usr/lib/nagios/plugins/check_by_ssh -H 10.130.4.80 -l smadmin-sec -i
> home/smadmin-sec/.ssh/id_dsa -C "/usr/lib/nagios/plugins/check_nagios
> /var/log/nagios/status.log 5 'nagios'"
>
>
> I get the following as a response:
>
> Nagios ok: located 1 process, status log updated 3 seconds ago
>
>
>
> My question is, can I use the "response" to determine whether the master
> is up and if not I want the slave to take over?
>
> I thought this might be a simple and easy way to set up failover????
>
> Thanks.
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
> !DSPAM:37,4546918140411451056105!
>
>
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list