Page 1 of 1

Print Queue Checks Fails

Posted: Wed Mar 01, 2017 9:27 pm
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

Re: Print Queue Checks Fails

Posted: Thu Mar 02, 2017 1:50 pm
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.

Re: Print Queue Checks Fails

Posted: Thu Mar 02, 2017 8:00 pm
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