We have a Windows Server 2003 R2 machine running an LPD service for us as part of an ERP implementation. I use Nagios to monitor the network and have this host set up already. I am now trying to set up a service to monitor the Windows LPD service which runs on this host and ensure nothing sits in the queue too long. I found http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_lpstat/details but I feel like I am losing my mind trying to configure it!
Nagios runs on ubuntu 10.04. I needed a package with lpstat, so I tried cups-client.
lpstat -h [servername] just returned
lpstat: transport endoint is not connected, and google gave me nothing on the error message except sparse bug reports for unrelated situations (install related mainly) so I tried lprng, which wanted me to first generate
/etc/printcap, but I am not interested in the Nagios box offering print services so I abandoned that too. I started looking for another option and installed the lpr package hoping to make use of the
lpq command I had seen in some of my google searches. Unfortunately, what I had seen must have been for a different implementation because it wouldn't accept the -H option (or anything else I could see to specify a remote host).
Obviously I am not going down the right track here. I know I can just
telnet [servername] 515 and make sure I make a connection, but that is just going to tell me the port is open, right? That could return success and still there be an error holding a queue, right? (seriously, because if I am assuming wrong on those last two counts then I am making this needlessly hard).