
...what exactly did you do differently? I used your exact command to test.


Thanks for the nudge I hadn't forgotten I just hadn't got round to doing it yet.
I've posted it up on my blog plextech
Thanks.
Ben
RabbieBurns (6th November 2009)

Thankfully I cant access work from home, so ill need to give it a try on Monday... Thanks in advance though


OK this seems to be working.. But how now do I implement it into nagios??
Code:root@nagios:/usr/local/nagios/libexec# php check_hp2600.php -H 10.0.5.101 -c 10 -w 15 TONER OK C:32 M:99 Y:32 K:22

Got it sorted!
I had to add this to commands.cfg
And then in printers.cfg i made a new group called 2600-printers which calls the previous commandCode:# 'check_hp2600' command definition define command{ command_name check_hp2600 command_line php /usr/local/nagios/libexec/check_hp2600.php -H $HOSTADDRESS$ -c 10 -w 15 }
And then just specified all the printers in host declarationsCode:define service{ use generic-service ; Inherit values from a template hostgroup_name 2600-printers ; The name of the host the service is associated with service_description Printer Status ; The service description # check_command check_hpjd!-C public ; The command used to monitor the service check_command check_hp2600 ; The command used to monitor the service normal_check_interval 10 ; Check the service every 10 minutes under normal conditions retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined }
I hope this helps someone elseCode:define host{ use generic-printer ; Inherit default values from a template host_name 10.0.5.101 ; The name we're giving to this printer alias 10.0.5.101 ; A longer name associated with the printer address 10.0.5.101 ; IP address of the printer hostgroups 2600-printers ; Host groups this printer is associated with notifications_enabled 0 ; disable emails for this check }![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)