<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<a class="moz-txt-link-abbreviated" href="mailto:lennart.kvam@softronic.se">lennart.kvam@softronic.se</a> wrote:
<blockquote
cite="mid308D3417BAD2104895AE72D879B815B6029891AE@stsstomail01.softronic.se"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.2802" name="GENERATOR">
<div dir="ltr" align="left"><span class="625291913-31082006"><font
color="#0000ff" face="Arial" size="2">no, that did not work:( Now i
get mail every 4:th minute:) I only want one... someone ?</font></span></div>
<div dir="ltr" align="left"><span class="625291913-31082006"></span> </div>
<div dir="ltr" align="left"><span class="625291913-31082006"><font
color="#0000ff" face="Arial" size="2">Regards</font></span></div>
<div dir="ltr" align="left"><span class="625291913-31082006"><font
color="#0000ff" face="Arial" size="2">Lelle</font></span></div>
<br>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="sv">
<hr tabindex="-1"><font face="Tahoma" size="2"><b>Från:</b>
<a class="moz-txt-link-abbreviated" href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net</a>
[<a class="moz-txt-link-freetext" href="mailto:nagios-users-bounces@lists.sourceforge.net">mailto:nagios-users-bounces@lists.sourceforge.net</a>] <b>För </b><a class="moz-txt-link-abbreviated" href="mailto:lennart.kvam@softronic.se">lennart.kvam@softronic.se</a><br>
<b>Skickat:</b> den 31 augusti 2006 13:38<br>
<b>Till:</b> <a class="moz-txt-link-abbreviated" href="mailto:hpsekhon@googlemail.com">hpsekhon@googlemail.com</a><br>
<b>Kopia:</b> <a class="moz-txt-link-abbreviated" href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
<b>Ämne:</b> Re: [Nagios-users] Number of Notifications!?<br>
</font><br>
</div>
<div dir="ltr" align="left"><span class="218312711-31082006"><font
color="#0000ff" face="Arial" size="2">Hi!</font></span></div>
<div dir="ltr" align="left"><span class="218312711-31082006"><font
color="#0000ff" face="Arial" size="2">thanks for a fast answer!</font></span></div>
<div dir="ltr" align="left"><span class="218312711-31082006"><font
color="#0000ff" face="Arial" size="2">Here are the configfiles i`m
using</font></span></div>
<div dir="ltr" align="left"><span class="218312711-31082006"></span> </div>
<div dir="ltr" align="left"><span class="218312711-31082006"><font
color="#0000ff" face="Arial" size="2"># Plugin commands (service and
host check commands)<br>
# Arguments are likely to change between different releases of the<br>
# plugins, so you should use the same config file provided with the<br>
# plugin release rather than the one provided with Nagios.<br>
cfg_file=/usr/local/nagios/etc/checkcommands.cfg</font></span></div>
<div> </div>
<div dir="ltr" align="left"><span class="218312711-31082006"><font
color="#0000ff" face="Arial" size="2"># Misc commands (notification
and event handler commands, etc)<br>
cfg_file=/usr/local/nagios/etc/misccommands.cfg</font></span></div>
<div> </div>
<div dir="ltr" align="left"><span class="218312711-31082006"><font
color="#0000ff" face="Arial" size="2"># You can split other types of
object definitions across several<br>
# config files if you wish (as done here), or keep them all in a<br>
# single config file.</font></span></div>
<div> </div>
<div dir="ltr" align="left"><span class="218312711-31082006"><font
color="#0000ff" face="Arial" size="2"><strong>cfg_file=/usr/local/nagios/etc/minimal.cfg</strong><br>
cfg_file=/usr/local/nagios/etc/escalations.cfg</font></span></div>
<div> </div>
<div dir="ltr" align="left"><span class="218312711-31082006"><font
color="#0000ff" face="Arial" size="2">#cfg_file=/usr/local/nagios/etc/contactgroups.cfg<br>
#cfg_file=/usr/local/nagios/etc/contacts.cfg<br>
#cfg_file=/usr/local/nagios/etc/dependencies.cfg<br>
#cfg_file=/usr/local/nagios/etc/hostgroups.cfg<br>
#cfg_file=/usr/local/nagios/etc/hosts.cfg<br>
#cfg_file=/usr/local/nagios/etc/services.cfg<br>
#cfg_file=/usr/local/nagios/etc/timeperiods.cfg</font></span></div>
<div> </div>
<div dir="ltr" align="left"><span class="218312711-31082006"><font
color="#0000ff" face="Arial" size="2"># Extended host/service info
definitions are now stored along with<br>
# other object definitions:<br>
cfg_file=/usr/local/nagios/etc/hostextinfo.cfg<br>
cfg_file=/usr/local/nagios/etc/serviceextinfo.cfg</font></span></div>
<div> </div>
<div><span class="218312711-31082006"></span><font face="Arial"><font
color="#0000ff"><font size="2">I<span class="218312711-31082006"> will
try this now....i`ll let you know if it works:)</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span
class="218312711-31082006"></span></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span
class="218312711-31082006">Thanks</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span
class="218312711-31082006">Lelle</span></font></font></font></div>
<div><br>
</div>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="sv">
<hr tabindex="-1"><font face="Tahoma" size="2"><b>Från:</b> Hari
Sekhon [<a class="moz-txt-link-freetext" href="mailto:hpsekhon@googlemail.com">mailto:hpsekhon@googlemail.com</a>] <br>
<b>Skickat:</b> den 31 augusti 2006 13:06<br>
<b>Till:</b> Kvam Lennart<br>
<b>Kopia:</b> <a class="moz-txt-link-abbreviated" href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
<b>Ämne:</b> Re: [Nagios-users] Number of Notifications!?<br>
</font><br>
</div>
go and look in your nagios.cfg file for which config files it's
actually using, I don't think most people use minimal, but you won't
know until you look there.<br>
<br>
then find the service definition and change line <br>
<br>
<font face="Arial" size="2"><span class="234544310-31082006">notification_interval
0<br>
<br>
to <br>
<br>
</span></font><font face="Arial" size="2"><span
class="234544310-31082006">notification_interval 60<br>
<br>
to have it email you once an hour when a service is down (assuming you
haven't changed the default interval length in nagios.cfg)<br>
<br>
<br>
That should sort it<br>
<br>
</span></font><br>
<br>
<a class="moz-txt-link-abbreviated"
href="mailto:lennart.kvam@softronic.se">lennart.kvam@softronic.se</a>
wrote:
<blockquote
cite="mid308D3417BAD2104895AE72D879B815B6029891AA@stsstomail01.softronic.se"
type="cite">
<meta content="MSHTML 6.00.2900.2802" name="GENERATOR">
<div><font face="Arial" size="2"><span class="234544310-31082006">Hello
all Nagios gurus!</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006">I
have a irritating problem, when a service goes down/critical i get a
notification every second minute! Thats irritating:)</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006">I`w
also read the docs on notifications but still ì havent solved it! Can
anyone help me please?:)</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006">Here
are som of my config: snip</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006">Nagios.cfg:</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006">command_check_interval=-1</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006">log_notifications=1</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006">interval_length=60</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006">enable_notifications=1</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006">status_update_interval=15</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006">Minimal.cfg:</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006">define
host{<br>
name generic-host ; The name of
this host template<br>
notifications_enabled 1 ; Host notifications
are enabled<br>
event_handler_enabled 1 ; Host event handler is
enabled<br>
flap_detection_enabled 1 ; Flap detection is
enabled<br>
failure_prediction_enabled 1 ; Failure prediction is
enabled<br>
process_perf_data 1 ; Process performance
data<br>
retain_status_information 1 ; Retain status
information across program restarts<br>
retain_nonstatus_information 1 ; Retain non-status
information across program restarts<br>
register 0 ; DONT REGISTER THIS
DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!<br>
}</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006">define
service{<br>
name generic-service ; The 'name' of this
service template<br>
active_checks_enabled 1 ; Active service checks
are enabled<br>
passive_checks_enabled 1 ; Passive service
checks are enabled/accepted<br>
parallelize_check 1 ; Active service checks
should be parallelized (disabling this can lead to major performance
problems)<br>
obsess_over_service 1 ; We should obsess over
this service (if necessary)<br>
check_freshness 1 ; Default is to NOT
check service 'freshness'<br>
notifications_enabled 1 ; Service notifications
are enabled<br>
event_handler_enabled 1 ; Service event handler
is enabled<br>
flap_detection_enabled 1 ; Flap detection is
enabled<br>
failure_prediction_enabled 1 ; Failure prediction is
enabled<br>
process_perf_data 1 ; Process performance
data<br>
retain_status_information 1 ; Retain status
information across program restarts<br>
retain_nonstatus_information 1 ; Retain non-status
information across program restarts<br>
register 0 ; DONT REGISTER THIS
DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!<br>
}</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006">define
host{<br>
use generic-host ; Name of host
template to use<br>
host_name STSSTOSIG<br>
alias STSSTOSIG<br>
address 111.111.111.111<br>
check_command check-host-alive<br>
max_check_attempts 10<br>
notification_interval 0<br>
notification_period 24x7<br>
notification_options d,u,r,<br>
notifications_enabled 1<br>
contact_groups admins<br>
}</span></font></div>
<div> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006"><br>
define service {<br>
use generic-service ; check_ping<br>
host_name STSSTOSIG<br>
service_description PING<br>
is_volatile 1<br>
max_check_attempts 5<br>
normal_check_interval 2<br>
retry_check_interval 1<br>
active_checks_enabled 1<br>
passive_checks_enabled 1<br>
check_period 24x7<br>
parallelize_check 1<br>
obsess_over_service 1<br>
check_freshness 1<br>
freshness_threshold 420<br>
event_handler_enabled 1<br>
low_flap_threshold 0<br>
high_flap_threshold 0<br>
flap_detection_enabled 1<br>
process_perf_data 1<br>
retain_status_information 1<br>
retain_nonstatus_information 0 <br>
contact_groups oas-hd,admins<br>
notification_interval 0<br>
notification_period 24x7<br>
notification_options w,u,c,r<br>
notifications_enabled 1<br>
register 1<br>
check_command check_ping!100.0,20%!500.0,60%<br>
} </span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006">This
is what i have in my minimal:) Something should be wrong...or?</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006"></span></font> </div>
<div><font face="Arial" size="2"><span class="234544310-31082006">Thanks</span></font></div>
<div><font face="Arial" size="2"><span class="234544310-31082006">Lelle</span></font></div>
<div> </div>
<div align="left"><font face="Arial" size="2">
__\/__ <br>
. / ^ ^ \ . <br>
</font></div>
</blockquote>
</blockquote>
<br>
as someone suggested, investigate flap detection. I haven't looked at
this myself since I have always had this working consistently, unless
the thing times out or the service is rebooted or something.<br>
<br>
you may also want to look at the timeout option that most plugins
provide, perhaps it doesn't get a response in the time and this flags
critical, which may appear as flapping and may explain why you get
emails every few mins instead of once every hour or two...<br>
<br>
you could try running the check manually a lot of times and finding if
it does occasionally fail for any reason. You can script this in Bash
(I love that) or in something else you know, Perl or Python.... save
the results to a log file to see what the returns are over time. If you
timestamp each log entry then you can compare the emails you're getting
against the log to see if the check was succeeding at that point. Or
you could try the nagios history first off to compare.<br>
<br>
If the service really is flapping then you need to fix that, not nagios.<br>
<br>
food for thought. <br>
<br>
<br>
Hari Sekhon<br>
</body>
</html>