Page 1 of 1

proper performance counter check syntax?

Posted: Wed May 20, 2015 5:33 pm
by emartine
I am trying to get the correct synxtax for a performance counter check. The printer queues exist but apparently I am missing something... Some help would be appreciated. This is a windows 2008 Server I am dealing with.

[root@ ~]# /usr/local/nagios/libexec/check_nrpe -H <servername> -t 60 -c CheckCounter -a "\Print Queue(BIS019PR01-Cold)\Jobs" MaxWarn=4 MaxCrit=6
No counters specified: add counter=<name of counter>

Re: proper performance counter check syntax?

Posted: Wed May 20, 2015 6:50 pm
by Box293
You are missing Counter= from your command, it should be:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <servername> -t 60 -c CheckCounter -a "Counter=\Print Queue(BIS019PR01-Cold)\Jobs" MaxWarn=4 MaxCrit=6
My example:

Code: Select all

Command:
check_nrpe -H win2008r2-01 -c CheckCounter -a 'Counter=\Print Queue(Microsoft XPS Document Writer)\Jobs' MaxWarn=4 MaxCrit=6

Output:
OK all counters within bounds.|'\Print Queue(Microsoft XPS Document Writer)\Jobs'=0;4;6
Using ShowAll adds more information:

Code: Select all

Command:
check_nrpe -H win2008r2-01 -c CheckCounter -a 'Counter=\Print Queue(Microsoft XPS Document Writer)\Jobs' MaxWarn=4 MaxCrit=6 ShowAll

Output:
OK: \Print Queue(Microsoft XPS Document Writer)\Jobs: 0|'\Print Queue(Microsoft XPS Document Writer)\Jobs'=0;4;6
You can also "Name" the output to something more friendly, this is done by adding the text between Counter and = using a colon (:), for example:

Code: Select all

Command:
check_nrpe -H win2008r2-01 -c CheckCounter -a 'Counter:XPS Document Writer=\Print Queue(Microsoft XPS Document Writer)\Jobs' MaxWarn=4 MaxCrit=6 ShowAll

Output:
OK: XPS Document Writer: 0|'XPS Document Writer'=0;4;6

Re: proper performance counter check syntax?

Posted: Fri May 22, 2015 9:49 am
by emartine
Thank you! This was very helpful!

Re: proper performance counter check syntax?

Posted: Fri May 22, 2015 9:57 am
by abrist
Do you have any further related questions emartine?

Re: proper performance counter check syntax?

Posted: Sun May 24, 2015 2:03 am
by emartine
Nope. We are good with this one. Please feel free to lock this.