eventhandler - remote script execution

Steve Shipway s.shipway at auckland.ac.nz
Thu Dec 9 21:33:53 CET 2004


> I would like to - on an alert, to have nagios execute a script on a 
> remote win32 machine to restart a problematic service.

Here, we do this by using:
1) pNSclient 2.0.1 agent on the server monitors the windows service
2) Nagios has event handler calling a short shellscript that calls
check_nrpe
3) NRPE_nt agent on server catches nrpe request and runs restart script
4) service restarts!

The restart script is something very simple -- just 'net start %1%' -- and
the shellscript at (2) parses the Service Description to obtain the
servicename which is passed to check_nrpe as a parameter.

It means having 2 agents on the server (pnsclient, nrpe_nt) though --
actually 3, since we also have the eventlog-nsca daemon running.  They're
fairly small footprints, though.

We're using it here in pre-production, working fine.

Steve

---
Steve Shipway: ITSS, University of Auckland
Email: s.shipway at auckland.ac.nz  Web: http://www.steveshipway.org/  
** We can only discover new oceans when we have the **
** courage to lose sight of the shore.              **
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Steve Shipway.vcf
Type: text/x-vcard
Size: 154 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20041210/ba092cbc/attachment.vcf>


More information about the Users mailing list