Re: [Nagios-users] notification_interval from the serviceescalation is ignored?

2007-09-04 Thread Richard Mohr
(Ilya: I have added the nagios-users mailing list back into the CC list.
Always make sure to include the mailing list so that others can follow
the discussion and possibly learn from it.)

On Sat, 2007-09-01 at 09:35 +0200, [EMAIL PROTECTED] wrote:
 
  On Fri, 2007-08-31 at 09:56 +0200, Ilya Ruprecht wrote:
  
   Ok, i understand. But netherless, something is wrong -
   look at my posting:
   
   the notification_interval of SSH is set to 60, but i became
   ALL notifications in 10 minute interval.
  
  In your original post, you said you defined this escalation:
  
  define serviceescalation{
  hostgroup_name  vpn-server
  service_description SSH
  first_notification  1
  last_notification   5
  notification_interval   3
  contact_groups  linux-admins
  }
  
  That escalation takes effect on the first notification, and thus
  notification_interval gets changed to 3.  With the two escalations you
  defined, the notification_interval  60 line from your service
  definition never takes effect.

 Exactly! That's what i mean! Neither the notification_interval from the 
 service-definition, nor
 the notification_interval from the serviceescalation-definition was 
 considered.

Yes, they are both considered.  It's just that the notification_interval
from your escalation overrides the value from the service definition.

 But where then the 10-minutes interval came from? from the check_interval 
 from service-definition?

Yes.  That is what happens when you have a check_interval that is
greater than the notification_interval.  A notification_interval of 3
does not guarantee that notifications will be sent every 3 minutes.  It
only guarantees that consecutive notifications will be 3 or more minutes
apart.  If the check_interval is 10, then you will get notifications
every 10 minutes.

-- 
Rick Mohr
Systems Developer
Ohio Supercomputer Center


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


[Nagios-users] notification_interval from the serviceescalation is ignored?

2007-08-30 Thread Ilya Ruprecht
Hi admins!


Following situation: Debian 4.0 + Nagios 3.0b1.


I defined a service-template SSH:


define service{
namecheck-ssh-service ; The 
'name' of this service template
check_command   check_ssh
service_description SSH
active_checks_enabled   1   ; Active 
service checks are enabled
passive_checks_enabled  1   ; Passive 
service checks are enabled/accepted
parallelize_check   1   ; Active 
service checks should be parallelized (disabling this can lead to major 
performance problems)
obsess_over_service 1   ; We should 
obsess over this service (if necessary)
check_freshness 0   ; Default is to 
NOT check service 'freshness'
notifications_enabled   1   ; Service 
notifications are enabled
event_handler_enabled   1   ; Service event 
handler is enabled
flap_detection_enabled  1   ; Flap 
detection is enabled
failure_prediction_enabled  1   ; Failure 
prediction is enabled
process_perf_data   1   ; Process 
performance data
retain_status_information   1   ; Retain status 
information across program restarts
retain_nonstatus_information1   ; Retain 
non-status information across program restarts
is_volatile 0   ; The service 
is not volatile
check_period24x7; The service 
can be checked at any time of the day
max_check_attempts  3   ; Re-check the 
service up to 3 times in order to determine its final (hard) state
normal_check_interval   10  ; Check the 
service every 10 minutes under normal conditions
retry_check_interval1   ; Re-check the 
service every two minutes until a hard state can be determined
contact_groups  linux-admins; Notifications 
get sent out to everyone in the 'admins' group
notification_optionsw,u,c,r ; Send 
notifications about warning, unknown, critical, and recovery events
notification_interval   60  ; Re-notify 
about service problems every hour
notification_period 24x7; Notifications 
can be sent out at any time
register0   ; DONT REGISTER 
THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}



Then i defined a hostgroup, for which i use the SSH service


define hostgroup{
hostgroup_name  vpn-server
alias   VPN-Gateways
members vpn-gw1-remote,vpn-gw1-local
}



Now i defined a service that uses the SSH-template and
is applied to the group vpn-server


define service{
use check-ssh-service
notes   SSH auf Linux-Servern
hostgroup_name  vpn-server
service_description SSH
}



And at last i defined two service-escalations for SSH

(i've set the intervals so short only for testing purposes)

define serviceescalation{
hostgroup_name  vpn-server
service_description SSH
first_notification  1
last_notification   5
notification_interval   3
contact_groups  linux-admins
}

define serviceescalation{
hostgroup_name  vpn-server
service_description SSH
first_notification  5
last_notification   0
notification_interval   10
contact_groups  linux-admins
}


interval_length is set to 60 seconds in nagios.cfg.

So far, so good.



1. PROBLEM:
===

Now, i get following notifications (these here are the syslog-entries):


Aug 30 13:05:38 unicorn nagios: SERVICE ALERT: 
vpn-gw1-local;SSH;CRITICAL;SOFT;1;CRITICAL - Socket timeout after 10 seconds 
Aug 30 13:06:38 unicorn nagios: SERVICE ALERT: 
vpn-gw1-local;SSH;CRITICAL;SOFT;2;CRITICAL - Socket timeout after 10 

Re: [Nagios-users] notification_interval from the serviceescalation is ignored?

2007-08-30 Thread Ilya Ruprecht
Hi all again!

I installed Nagios 3.0b2 and tested the serviceescalations with it - with
the same result:

notification_interval is ignored if i enter a value another then 0(zero).
If i enter a zero - or even nothing - then i see in the webgui -
Notify Only Once (No Re-notification) in the Notification Interval-column 
for
these hosts.
Even if I enter an clearly nonsense, like jsdfjfsdakjl - the value is ignored 
and
the pre-flight-check dont brings an error.


It's a BUG! Isn't it?


Ilya

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] notification_interval from the serviceescalation is ignored?

2007-08-30 Thread Andreas Ericsson
Ilya Ruprecht wrote:
 Hi all again!
 
 I installed Nagios 3.0b2 and tested the serviceescalations with it - with
 the same result:
 
 notification_interval is ignored if i enter a value another then 0(zero).
 If i enter a zero - or even nothing - then i see in the webgui -
 Notify Only Once (No Re-notification) in the Notification Interval-column 
 for
 these hosts.
 Even if I enter an clearly nonsense, like jsdfjfsdakjl - the value is 
 ignored and
 the pre-flight-check dont brings an error.
 
 
 It's a BUG! Isn't it?
 

It certainly appears to be, yes.

-- 
Andreas Ericsson   [EMAIL PROTECTED]
OP5 AB www.op5.se
Tel: +46 8-230225  Fax: +46 8-230231

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] notification_interval from the serviceescalation is ignored?

2007-08-30 Thread Richard Mohr
On Thu, 2007-08-30 at 14:12 +0200, Ilya Ruprecht wrote:

 Furthermore, the notification_interval in the service-part is described as 
 Re-notify about service problems every XXX.
 Note: about service problems.
 Now, if i set the notification_interval to a lower value then a 
 normal_check_interval, i.e. 9, i get following warning-message
 at nagios pre-flight-check:
[snip]
 But, hell, what the normal_check_interval have to do with 
 notification_interval?!
 These two are completely different things! Or have i misunderstood something?

Perhaps this will help clear things up.  The notification_interval
option sets an upper limit on how often notifications are sent.  The
normal_check_interval options controls how often the check is run.  

If notification_interval=10 and normal_check_interval=5, you can get a
situation like this one (I'll use t=XX to try and convey the timeline
when events occur).

[t=0] Check runs.
[t=0] Check fails.
[t=0] Nagios sends notification.
[t=5] Check runs
[t=5] Check fails
[t=5] Time since last notifications is 5 which is less than
notification_interval=10.  Nagios prevents notification.
[t=10] Check runs.
[t=10] Check fails.
[t=10] Time since last notification is 10 which is greater than or equal
to notification_interval=10. Nagios sends notification.

However if notification_interval=5 and normal_check_interval=10, you get
this.

[t=0] Check runs.
[t=0] Check fails.
[t=0] Nagios sends notification.
[t=10] Check runs.
[t=10] Check fails.
[t=10] Time since last notification is 10 which is greater than or equal
to notification_interval=10. Nagios sends notification.

Nagios only sends notifications immediately after a check (it won't
resend an old value).  So if normal_check_interval =
notification_interval, you effectively have notification_interval =
normal_check_interval.  That is why Nagios prints the warning message:

Warning: Service 'SSH' on host 'vpn-gw1-local'  has a notification
interval less than its check interval!  Notifications are only re-sent
after checks are made, so the effective notification interval will be
that of the check interval.

That seems to be what is happening in your case.

-- 
Rick Mohr
Systems Developer
Ohio Supercomputer Center


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null