check_nt and nsclient++: treat unknown as critical

Hari Sekhon hpsekhon at googlemail.com
Fri Oct 26 10:29:16 CEST 2007


I suspect you'd have to either change the source code of the nsclient++ 
or to write a quick shell wrapper script around check_nt or check_nrpe 
for those checks. If the check return UNKNOWN because of a missing 
definition or some such, the shell can change it's return code and 
output to CRITICAL with some custom message.

It's quite easy to do in Bash, I've done this in a couple of places 
myself, primarily to change the check_dhcp plugin to return warning on 
extra dhcp servers which indicates rogue dhcp on the network... so you 
should be able to do this for your windows checks, test the return codes 
and output and adjust them to your own specification. This is probably 
much easier than changing the source and recompiling nsclient++ 
everywhere (not to mention you only need a single point of change on 
your Nagios monitoring server rather that across all the windows servers).

-h

Hari Sekhon



Michael W. Lucas wrote:
> Hi,
>
> I'm using nsclient++ and check_nt to monitor services on a whole slew
> of Windows boxes.  Works very nicely, but I have to change part of the
> system behavior and the plugin doesn't seem to have that option.
>
> When you check a service and the service is not installed, the plugin
> returns "unknown".  I need to treat those unknowns as critical.  In
> our environment, those errors mean that someone is playing games with
> their server.
>
> Any suggestions?  Or should I use a different plugin if I want this
> behavior?  I can get this with SNMP easily enough, but nsclient++
> seems easiest.
>
> Thanks,
> ==ml
>
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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