Printers not responding

Hello all, yet another Nagios noob here. I’ve spent some time lurking and have gotten my install fully running and operational, but I’ve come across a problem I can’t seem to find an answer to.

I have a number of printers which I would like to monitor (most HP, plus a few others), and an completely unable to from within the interface. The check commands run properly from the command line, as user nagios, but always fail when run automatically.

check_ping, _hpjd, and _http all fail.

I have a number of other hosts and services set up - servers and switches - and everything works properly there. It’s only the printers that do not work.

The event log shows “HOST ALERT: 00pr04;DOWN;SOFT;9;CRITICAL - Plugin timed out after 10 seconds”.
Nagios 2.0b3

Does anyone have any suggestions?
Thanks!

did you configure a different command for the printers and for the hosts? possibly an error in the checkcommands file.

Luca

The printers are all set in hosts.cfg to use check_host_alive, which the other hosts also use. I have not modified that command.
They’re also set in services.cfg to use check_ping!100.0,20%!500.0,60% which is exactly the same as the other hosts.

Running the same command from the command line works fine:
-bash-3.00$ ./check_ping -H 00pr01 -w 100.0,20% -c 500.0,60%
PING OK - Packet loss = 0%, RTA = 6.82 ms

As does check_hpjd:
-bash-3.00$ ./check_hpjd 00pr01
Printer ok - (“READY”)

if you run them as user nagios from command line (as you told) i’ve got no idea… seems like it shouldn’t be a timeout problem (the answer is quite fast)… possibly missing something…

Luca

nagios does not utilize the /etc/hosts file. In your command liine execution, it would, but when nagios attempts to run the command, it is going to use whatever IP addy you have in the hosts.cfg file. So please check your IP in the hosts.cfg file for that printer and then try the command line using that IP. I’m guessing that perhaps your host.cfg file has a name, instead of an IP. I might be wrong though, perhaps nagios will use the /etc/hosts if you define a name, instead of an IP in the hosts.cfg.

Thank You! It was due to incorrect ip addresses in the hosts.cfg file. I’m such a noob. :cry:

Thank you very much, Jakkedup and Luca.

OH boy, you are going to have to pay for that one. Mistakes are not allowed you know, hehe.

uhm welllll Jakkedup, if you say so…
i’ll take a beer should you ever come to Milan :smiley: (i’ll offer one in return… hehe)

Ciao, Luca