Page 1 of 3

check_hpjd shows warning unnesessarily

Posted: Tue Feb 02, 2016 3:40 pm
by Adam
Hi all. I am new to Nagios and have a question regarding monitoring HP printers. The status of my printer is "Ready" but Nagios is showing it as a "Warning". This should not be a "Warning" but an "OK" status. How can I adjust this?
edit: using Nagios 4.0.8

Re: check_hpjd shows warning unnesessarily

Posted: Tue Feb 02, 2016 4:47 pm
by rhassing
Is it a HP jet direct card you are monitoring?

Re: check_hpjd shows warning unnesessarily

Posted: Tue Feb 02, 2016 5:07 pm
by Adam
The printer is an HP Color LaserJet MFP M476nw. It is wired to the network. It does have a jet direct port open at 9100.

Re: check_hpjd shows warning unnesessarily

Posted: Wed Feb 03, 2016 4:18 am
by rhassing
Maybe you should give another check a try?

SNMP Printer Check
check_snmp_printer
Authored by Jason Leonard

It can be found on http://exchange.nagios.org/

Re: check_hpjd shows warning unnesessarily

Posted: Wed Feb 03, 2016 10:53 am
by rkennedy
Thanks @rhassing.

Give those plugins a look to see if they'll work for your environment.

Can you also post the full check command that you are using with check_hpjd?

Re: check_hpjd shows warning unnesessarily

Posted: Wed Feb 03, 2016 11:59 am
by Adam
Sorry guys, but I didn't post my question correctly. The issue isn't that the plugin isn't working correctly. It is reporting the status correctly. The "Warning" is "No log handling enabled - turning on stderr logging ("Ready")". But it either isn't clearing the warning about log handling or isn't actually turning it on. I guess I should have read the entire status before I posted. I appreciate the help as it has been a long time since I dabbled in any Linux systems. By the way Nagios is running on CentOS 6. So how to I manually set up log handling?

Re: check_hpjd shows warning unnesessarily

Posted: Wed Feb 03, 2016 3:24 pm
by rkennedy
What version of the plugin are you using? ./check_hpjd -V

Re: check_hpjd shows warning unnesessarily

Posted: Wed Feb 03, 2016 3:29 pm
by Adam
check_hpjd v2.0.3 (Nagios-plugins 2.0.3)

Re: check_hpjd shows warning unnesessarily

Posted: Thu Feb 04, 2016 12:27 pm
by rkennedy
Hmm, that is the current version.

Can you post the full syntax you are using with the result? I'd like to verify this is indeed a bug.

It can then be posted at our GitHub for nagios-plugins @ https://github.com/nagios-plugins/nagios-plugins/issues

Re: check_hpjd shows warning unnesessarily

Posted: Thu Feb 04, 2016 3:24 pm
by Adam
I followed the quickstart quide for fedora so basically just edited the printer.cfg file to define the printer name and ip address as the guide stated.

Code: Select all

define host{
      use                         generic printer
      hostname                ycolor
      alias                       ycolor
      address                  192.168.x.x
      hostgroups             network-printers
                      }
and the service definition

Code: Select all

define service{
      use                               generis-service
      host_name                    ycolor
      service_description       Printer Status
      check_command           check_hpjd!-C public
      normal_check_interval  10
      retry_check_interval      1
                     }