Atreides78
Atreides78

Reputation: 577

Nagios: Disable Host notifcation but enable service notification for local printers

Is it possible to enable notifications for services in NAGIOS but to disable hosts notifications? I have a lot of local printers which don't have a impact when they are down but I want to have a service notification e.g. for "no paper" or "low toner cartridge".

Any experiences? Thank you

Upvotes: 1

Views: 3614

Answers (2)

J. Delgado
J. Delgado

Reputation: 146

There are a couple of options, you can create a new host template to use for printers that inherits from your generic-host template, but turn off the setting to enable host notifications with:

notifications_enabled           0 

E.g.

define host{
    name                    generic-printer
    use                     generic-host
    notifications_enabled   0
    register                0
}

Then each printers host definition could include the line

use                     generic-printer

in its definition.

Alternately, you could create a brand new printer template similar to the one for generic-host with notifications_enabled disabled and also not including any entry for check_command (which is where the command used to determine if a host is OK is chosen).

Upvotes: 2

Umut Uzun
Umut Uzun

Reputation: 807

Default checks like ping or ssh can be disabled by deleting the service definition in the corresponding machine's .cfg file in the monitoring host. nrpe or nrdp services can be used for checks like low toner cartrige or no paper.

Steps to remove the ping check for printer1:

1- Open the printer1.cfg file in the nagios server to edit. (Usually under .../nagios/configurations/objects/)

2- Find the service definition in printer1.cfg where service_description value is PING and delete this definition.

3- Restart NagiOS. After this, the ping check should not be visible from the nagios web interface too.

Upvotes: 0

Related Questions