Print Queue Checks Fails

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.
Locked
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Print Queue Checks Fails

Post by kwhogster »

Trying out your Print Queue Tests

I have to Printers defined on my Windows 2012 R2 server

Printers CananMF6 and HP 4550N

root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H TGCS013 -t 30 -c CheckCounter -a 'Counter=\Print Queue(CanonMF6)\Jobs' Maxwarn=5 Maxcrit=15 Showall

ERROR: Failed to get counter value: Maxwarn|'\Print Queue(CanonMF6)\Jobs'=0

root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H TGCS013 -t 30 -c CheckCounter -a 'Counter=\Print Queue(HP 4550N)\Jobs' Maxwarn=5 Maxcrit=15 Showall

ERROR: Failed to get counter value: Maxwarn|'\Print Queue(HP 4550N)\Jobs'=0

followed this
http://sites.box293.com/nagios/guides/c ... s/printers

Thanks
Tom


Update

If I removed the "Maxwarn=5 Maxcrit=15 Showall" from the command line it works
root@tgcs017:~# /usr/lib/nagios/plugins/check_nrpe -H TGCS013 -t 30 -c CheckCounter -a 'Counter=\Print Queue(CanonMF6)\Jobs'
OK all counters within bounds.|'\Print Queue(CanonMF6)\Jobs'=0
root@tgcs017:~# /usr/lib/nagios/plugins/check_nrpe -H TGCS013 -t 30 -c CheckCounter -a 'Counter=\Print Queue(HP 4550N)\Jobs'
OK all counters within bounds.|'\Print Queue(HP 4550N)\Jobs'=0


Thoughts
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Print Queue Checks Fails

Post by mcapra »

All these directives:

Code: Select all

Maxwarn=5 Maxcrit=15 Showall
Tend to shift between NSClient++ versions. However, looking at the documentation on the page it looks like case may be a factor. From the doc you mentioned, MaxWarn, MaxCrit, ShowAll have caps for the 2nd word:

Code: Select all

check_nrpe -H win2008r2-01 -c CheckCounter -a 'Counter=\Print Queue(Microsoft XPS Document Writer)\Jobs' MaxWarn=5 MaxCrit=15 ShowAll
Where as your example uses Maxwarn, Maxcrit, Showall with lowercase on the second word.
Former Nagios employee
https://www.mcapra.com/
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: Print Queue Checks Fails

Post by kwhogster »

Good Call

That was it Upper Lower Case OH MY

root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H TGCS013 -t 30 -c CheckCounter -a 'Counter=\Print Queue(HP 4550N)\Jobs' MaxWarn=5 MaxCrit=15 ShowAll
OK: \Print Queue(HP 4550N)\Jobs: 0|'\Print Queue(HP 4550N)\Jobs'=0;5;15
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H TGCS013 -t 30 -c CheckCounter -a 'Counter=\Print Queue(CanonMF6)\Jobs' MaxWarn=5 MaxCrit=15 ShowAll
OK: \Print Queue(CanonMF6)\Jobs: 0|'\Print Queue(CanonMF6)\Jobs'=0;5;15
root@tgcs017:/usr/local/nagios/etc/objects#

Thanks for a quick fix

This can now be locked
Locked