3

We have Nagios for all our server, but just for some of them we want to send notifications. I thought that if I set notifications_enabled to 0 for particular hosts, this will not happen anymore.

define host{
        use                     linux-server
        host_name               dev1
        alias                   dev1 Server
        address                 100.100.100.205
        notifications_enabled   0
        }

However, this was ignored. What works is enable_notifications=0 in nagios.cfg, but we need have it more fine tuned.

According to some materials, use_retained_program_state=0 should do the trick, but it seemed to have no effect.

Thanks for help.

1
  • Did you restart the nagios application after making these .cfg file changes? It absolutely works (disables notifications) on my system.
    – Jim Black
    Aug 24, 2016 at 15:41

2 Answers 2

3

Nagios has a distinct notification setting for hosts and services.

You need to tune service notification settings in order to disable it for your case.

Same goes for downtimes, you need to set the downtime for host+services to have an effect.

0

You should verify the default template of yours hosts and services. It's possible to have notifications_enabled 1 specified in those templates which are applied (by default) on yours services and hosts.

It explains why notifications_enabled 0 in nagios.cfg doesn't work. The priority is done in this order :

  1. service/host
  2. template
  3. nagios.cfg

If you want to deactivate the notifications to all yours deveices. You can modify directly yours templates with notifications_enabled 0. And for yours hosts with notifications you put le propriety in his configuration or create a specific template.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .