Notification problem

My nagios sends me an e-amil when a host goes down and when he comes up again.
So far so good. But when a host is down he sends me an e-mail every 5 minutes. Is there a way to tell nagios that he just has to send an e-mail when the status changes and not if the status stays the same?

check your notification_interval i think stting it to 0 will send you only 1 email BUT I’M NOT SURE so please don’t count on it…

Or was it first_notification 1 and last_notification 1 (this comes from the escalations definitions… )

Not sure… anyway check the docs on these subjects and you should find everything you need.

Luca

According to the documentation :

If you don’t like the idea of recurring notifications, set the <notification_interval> value to 0 - this prevents notifications from getting sent out more than once for any given problem.

I have done this, but it doesn’t seem to work.

Any other idea??

You restarted nagios after making the change to notification_interval 0?
Are you sure it’s a host alert and not a service alert? A service may be setup to is_volatile 1 and it will send an alert each and every failure, even if the state does not change.

Jakkedup,

It is indeed a service alert. The is_volatile is set to 0.
And yes, I have restarted the nagios already a few times.

example of defined service

Define a service to “ping” the machine

define service{
use generic-service
hostgroup_name Printers
service_description PING
is_volatile 0
check_period 24x7
retry_check_interval 1

check_command			check_ping!100.0,20%!500.0,60%
    }

notification_interval is set to what for the service giving multiple alerts?

notification_interval for the generic-service is set to 0

Nagios version is? If V2.x it may be a bug.
escalations.cfg I have all entries commented out, since I don’t want any escalations at all. How about you? Perhaps luca is right, and you are using escalations.

I have indeed installed nagios 2.0 .
Escalations.cfg is empty. Here is my service conf

define service{
name generic-service
is_volatile 0
max_check_attempts 5
normal_check_interval 5
retry_check_interval 1
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
parallelize_check 1
obsess_over_service 0
check_freshness 0
freshness_threshold 0
low_flap_threshold 0
high_flap_threshold 0
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
notification_interval 0
notification_period 24x7
notification_options w,u,c,r
notifications_enabled 1
contact_groups Admins_BE
register 0
}

Define a service to “ping” the machine

define service{
use generic-service
hostgroup_name Printers
service_description PING
is_volatile 0
check_period 24x7
retry_check_interval 1

check_command			check_ping!100.0,20%!500.0,60%
    }

set flap_detection_enabled 0 and since this is handled by retention, you must also use the cgi to enable/disable flap detection.
I see no reason to use flap detection, unless you have a particular service check that exibits this behavior.
Other than tthat, I don’t see a problem.