proper performance counter check syntax?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

proper performance counter check syntax?

Post 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>
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: proper performance counter check syntax?

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: proper performance counter check syntax?

Post by emartine »

Thank you! This was very helpful!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: proper performance counter check syntax?

Post by abrist »

Do you have any further related questions emartine?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: proper performance counter check syntax?

Post by emartine »

Nope. We are good with this one. Please feel free to lock this.
Locked