check_nrpe IIS connections Output Query

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
FTL
Posts: 72
Joined: Fri Oct 21, 2011 7:23 am

check_nrpe IIS connections Output Query

Post by FTL »

Hi,

Im using check_nrpe to check the Current connections in IIS

It dumps the status information into Nagios as "OK all counters within bounds."

It outputs the readings in the Performace Data so It graphs the connections ok in pnp4nagios, in the graphs i can see actual numbers.

Is it possible for it to actually dump the status information into Nagios showing the actual connections it read at that check?

eg - rather than "OK all counters within bounds" it shows "OK all counters within bounds - X conenctions"

Thanks in advance
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: check_nrpe IIS connections Output Query

Post by mcapra »

Can you share both the full check command and it's corresponding output executed from the CLI of your Nagios Core machine?

If a custom plugin is being used, can you also share a physical copy of it?

If you are using the native counters functionality within NSClient++, various syntax options are available for modifying your status outputs.
Former Nagios employee
https://www.mcapra.com/
FTL
Posts: 72
Joined: Fri Oct 21, 2011 7:23 am

Re: check_nrpe IIS connections Output Query

Post by FTL »

Code: Select all

define service{
use service-server,srv-pnp
host_name IISWEB1
service_description IIS CURRENT CONNECTIONS
check_command check_iis_performance!"\\Web Service(Default Web Site)\\Current Connections"!20!30
}

Code: Select all

define command{
command_name check_iis_performance
comamnd_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckCounter -a $ARG1$ MaxWarn=$ARG2$ MaxCrit=$ARG3$
}

Command output from the cli

Code: Select all

root@nagiossrv:/usr/local/nagios/libexec# ./check_nrpe -H 10.0.15.10 -p 5666 -c CheckCounter -a "\\Web Service(Default Web Site)\\Current Connections" MaxWarn=20 MaxCrit=30
OK all counters within bounds.| '\Web Service(Default Web Site)\Current Connections'=3;20;30

From the Nagios GUI

Code: Select all

Status Information:	OK all counters within bounds.
Performance Data:	'\Web Service(NpowerSME)\Current Connections'=3;20;30
kyang

Re: check_nrpe IIS connections Output Query

Post by kyang »

Thanks @mcapra!

What version of NSClient++ are you running?

You could use check_pdh for parsing the output in scripts.

https://nsclient.org/blog/2013/08/13/ch ... -in-0-4-2/