[Nagiosplug-help] Check_NT question

kyle smith kyles at apple.com
Fri Apr 25 16:07:08 CEST 2008


Yes a custom plugin (you can use almost any language  to write a  
plugin) that checks to see if both of the machines are updating the  
website and then exits with a return code of 2 will do the trick.  
Here's how I would do it:
- decide which host you are going to run the plugin from, if this  
machine is not known to nagios server you will need to set that up
- write the plugin and test it out alone from cli
- install nrpe and edit the nrpe config file to define a command to  
use the plugin
- start nrpe daemon or rig as on demand service
- use local check_nrpe plugin to test your custom plugin (on OSX this  
is /usr/local/nagios/libexec/check_nrpe -H localhost -c  
<command_in_nrpe.cfg>
- test from nagios server (/usr/local/nagios/libexec/check_nrpe -H  
<ip_of_remote_client> -c <command_in_nrpe.cfg>
- if not already using check_nrpe in your nagios installation you  
need to set this up in your command.cfg file
- define new service check using check_nrpe command with same syntax  
as server cli test above
- bounce server and away you go

a lot of steps but once setup very very cool.

good luck!

kyle

On Apr 25, 2008, at 5:11 AM, Greg Martin wrote:

> Ian, perhaps you could use nrpe with a custom script (maybe using
> sc.exe) to do this.
>
> \\Greg
>
> Ian Rarity wrote:
>> Hi all,
>>
>> I was wondering if there's any way to use NSClient and check_nt to
>> generate a warning/critical alert if a particular service on a box IS
>> running?  Check_nt presupposes that the proper state for services  
>> should
>> be running, which is fair enough.
>> However, we have a hot-spare server which runs our main backoffice  
>> app.
>>  The live version of this server updates our website, and we recently
>> had an issue where the backup box came back up after a power cut with
>> all services running, resulting in two conflicting sets of updates  
>> being
>> applied to the website and much confusion all around.
>> Under those circumstances, it would have been handy to be alerted to
>> the fact that the backup box was now also updating the website; can
>> anyone suggest a way to persuade check_nt to do this, or an  
>> alternative
>> plugin?
>>
>> Thanks,
>> Ian.
>>
>> *********************************
>> Ian Rarity
>> Technical Engineer
>> ESPC (UK) Ltd.
>> T: (44)131 624 8000
>> F: (44)131 624 8509
>> http://www.espc.com ( http://www.espc.com/ )
>>
>>
>> *******************************************************************
>> Private and Confidential:  This e-mail transmission is strictly
>> confidential and intended solely for the addressee.  It may contain
>> privileged and confidential information and if you are not the
>> intended recipient, you must not copy, disclose, distribute or
>> take any action in reliance on it. If you have received this
>> e-mail in error, please delete it and notify our E-mail Systems
>> Administrator on +44 (0) 131 624 8000. ESPC (UK) Ltd does not
>> accept any liability for any harm that may be caused to the
>> recipient's system or data by this message or any attachment.
>>
>> ESPC (UK) Ltd is a company registered under the Companies
>> Acts in Scotland (Registered Number SC203535), and having its
>> registered office at 90A George Street, Edinburgh, Midlothian
>> EH2 3DF.
>>
>> ESPC (UK) Limited is authorised and regulated by the Financial
>> Services Authority.
>>
>> --------------------------------------------------------------------- 
>> ----
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>> Don't miss this year's exciting event. There's still time to save  
>> $100.
>> Use priority code J8TL2D2.
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http:// 
>> java.sun.com/javaone
>> _______________________________________________
>> Nagiosplug-help mailing list
>> Nagiosplug-help at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
>> ::: Please include plugins version (-v) and OS when reporting any  
>> issue.
>> ::: Messages without supporting info will risk being sent to /dev/ 
>> null
>>
>>
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save  
> $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http:// 
> java.sun.com/javaone
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any  
> issue.
> ::: Messages without supporting info will risk being sent to /dev/null





More information about the Help mailing list