2

I would like to monitor the toner level of a network printer using nagios3.

I have everything I need to access the toner level using SNMP.

But, when the printer is off, I have an error "Host is down" reported. But I don't want this error, because it is allowed to switch off this printer.

Thus I have removed the "check command" of the host config as suggested for network printers. But then, nagios will check the toner level even if the printer is off, and reports an error because the SNMP query fails.

My question is: How to disable the SNMP check of the toner when the printer is off without raising an error of "host is down" ?

or, in a more generic way:

How to disable a service check when the host is down without raising an error of "host is down"

Blup1980
  • 123
  • 3

1 Answers1

6

NAGIOS' use of host-is-down to detect that an entire host is down, and thus to raise no individual alerts for each service-is-down, is sensible, and you should continue to use it.

But if you disable the alerting on the host-is-down check for the printer, then you'll get what you want: no notifications of any kind when the printer is turned off, but toner-is-out notifications when it's turned on. Something like:

define host{
        name                            printer
        notifications_enabled           0
        [ ... ]
        }

may be what you want.

MadHatter
  • 79,770
  • 20
  • 184
  • 232