How to run a remote script in Nagios

Tõnis Trei tonis.trei at gmail.com
Tue May 3 16:29:46 CEST 2011


Hello,

Im quite new at Nagios and have run into a small problem.

I need to trigger a script with a parameter on a remote machine and based on
the result trigger an alarm or not.
But im at little loss on how to set it up.

Script is located in /etc/init.d/script.sh on a remote machine and i should
run it as "/etc/init.d/script.sh X" where x is the parameter.
Script returns me the result, eather OK or some text and in case of not
being ok, i want to send this text out with an email.

So im wondering that should i specifie a command in command.cfg that would
run this script and then create a new service that would trigger this
command and mail the results?


Thanks,
Tõnis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110503/3381608e/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
-------------- next part --------------
_______________________________________________
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