Page 1 of 1

check_cups_queue plugin 'not executable by nagios user'

Posted: Thu Mar 02, 2017 7:57 am
by Lmac
I have a CUPS server and I want to use nrpe to check the printer queue and be notified when it stalls. I have NRPE working for other items for this server (just the sample tasks) , but I can't get the check_cups_queue to work. Here are the error message I receive when I execute the plugin on the CUPS server and from the Nagios server (same error).

This is what I tried to run on the CUPS server and here are the results:

./check_cups_queue -H x.x.x.x -T s -w 50 -c 100
lpstat not found or is not executable by the nagios user

the nagios user has been added to the following groups: lpadmin, sudo, lp

I can execute the lpstat command without an error.

Thanks for any suggestions!

Re: check_cups_queue plugin 'not executable by nagios user'

Posted: Thu Mar 02, 2017 2:45 pm
by tmcdonald
I'm assuming you got the plugin from here: https://github.com/lusis/old-one-offs/b ... s_queue.sh

If that is the case, the test would fail if your lpstat was not in /usr/bin/ - can you run which lpstat and post the output? That will show us where the binary is located.

Re: check_cups_queue plugin 'not executable by nagios user'

Posted: Fri Mar 03, 2017 8:33 am
by Lmac
I used the one located here https://exchange.nagios.org/directory/P ... ue/details which looks similar, but doesn't have the .sh extension.

I download the one you linked to and now I no longer have the error! Sorry to waste your time!

Thank you! :D

Re: check_cups_queue plugin 'not executable by nagios user'

Posted: Fri Mar 03, 2017 10:08 am
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!