Check Cups Queue
Check Cups Queue
I must be tired. I've done this for many of our Linux-based print queues, but cannot add a queue to be monitored. Within the Linux Servers Host Groups I have a server which contains several print queues. I'm simply monitoring whether or not the various queues are up.
From Nagios Server:
[root@asf-nagios libexec]# ./check_nrpe -H 10.0.10.1 -c check_queue_status -a PDFprinter
OK - PDFprinter is ready
[root@asf-nagios libexec]# ./check_nrpe -H 10.0.10.1 -c check_queue_status -a checkprinter
ERROR -
From App Server (where the queues reside):
[root@App-Server libexec]# ./check_queue_status PDFprinter
OK - PDFprinter is ready
[root@App-Server libexec]# ./check_queue_status checkprinter
OK - checkprinter is ready
From Nagios Server:
[root@asf-nagios libexec]# ./check_nrpe -H 10.0.10.1 -c check_queue_status -a PDFprinter
OK - PDFprinter is ready
[root@asf-nagios libexec]# ./check_nrpe -H 10.0.10.1 -c check_queue_status -a checkprinter
ERROR -
From App Server (where the queues reside):
[root@App-Server libexec]# ./check_queue_status PDFprinter
OK - PDFprinter is ready
[root@App-Server libexec]# ./check_queue_status checkprinter
OK - checkprinter is ready
Re: Check Cups Queue
Could you post your nrpe.cfg file from your remote system?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check Cups Queue
log_facility=daemon
pid_file=/var/run/nrpe.pid
server_port=5666
#server_address=127.0.0.1
nrpe_user=nagios
nrpe_group=nagios
allowed_hosts=127.0.0.1
dont_blame_nrpe=1
debug=0
command_timeout=60
connection_timeout=300
command[check_queue_status]=/usr/local/nagios/libexec/check_queue_status $ARG1$
pid_file=/var/run/nrpe.pid
server_port=5666
#server_address=127.0.0.1
nrpe_user=nagios
nrpe_group=nagios
allowed_hosts=127.0.0.1
dont_blame_nrpe=1
debug=0
command_timeout=60
connection_timeout=300
command[check_queue_status]=/usr/local/nagios/libexec/check_queue_status $ARG1$
Re: Check Cups Queue
Is there any chance the issue is with the fact the printer is actually named check_printer as in a printer used to print checks, not a command that has something to do with checking the printer.
Re: Check Cups Queue
I don't think the name of the printer, it might be a permission problem. Try running this on the remote system logged in as the user nagios.
Code: Select all
su nagios
/usr/local/nagios/libexec/check_queue_status checkprinter
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check Cups Queue
That command, run from the remote computer, returns; OK - checkprinter is ready
Re: Check Cups Queue
Access your remote host and make a command definition in nrpe.cfg:
After adding the above command, restart xinetd:
Run the following from Nagios:
Does the above work?
Code: Select all
command[check_queue_status_checkprinter]=/usr/local/nagios/libexec/check_queue_status checkprinter
Code: Select all
service xinetd restart
Code: Select all
./check_nrpe -H 10.0.10.1 -c check_queue_status_checkprinter
Re: Check Cups Queue
[root@asf-nagios libexec]# ./check_nrpe -H 10.0.10.1 -c check_queue_status -a PDFprinter
OK - PDFprinter is ready
[root@asf-nagios libexec]# ./check_nrpe -H 10.0.10.1 -c check_queue_status -a checkprinter
ERROR -
Just to show that it works fine for another printer.
OK - PDFprinter is ready
[root@asf-nagios libexec]# ./check_nrpe -H 10.0.10.1 -c check_queue_status -a checkprinter
ERROR -
Just to show that it works fine for another printer.
Re: Check Cups Queue
MilesDeep,
Please follow the instructions that I've posted. Let me know if you need help with any of the steps - basically we're adding a 'hard check' to your print servers nrpe.cfg and then we're calling that check from your nagios server. This is to see if the problem has anything to do with the arguments you're specifying.
Please follow the instructions that I've posted. Let me know if you need help with any of the steps - basically we're adding a 'hard check' to your print servers nrpe.cfg and then we're calling that check from your nagios server. This is to see if the problem has anything to do with the arguments you're specifying.
Re: Check Cups Queue
Yes. Command by command. When running the following command, I get the error.
./check_nrpe -H 10.0.10.1 -c check_queue_status_checkprinter
Error -
This obviously comes from this bit of code, still don't know why it's getting an error, then not returning what the error is in the $INFO part.
if [ $QUEUE -gt $ERROR ]; then
echo "ERROR - $INFO"
./check_nrpe -H 10.0.10.1 -c check_queue_status_checkprinter
Error -
This obviously comes from this bit of code, still don't know why it's getting an error, then not returning what the error is in the $INFO part.
if [ $QUEUE -gt $ERROR ]; then
echo "ERROR - $INFO"