Page 1 of 1

No notification when state changes :Warning to Critical

Posted: Mon Jun 10, 2013 2:36 am
by Amarnath
My Alert has been ,configures this way.

My alert uses a generic service template , with the following options:

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_information 1 ; Retain non-status information across program restarts
notification_interval 0 ; Only send notifications on status change by default.
is_volatile 0
check_period 24x7
normal_check_interval 5
retry_check_interval 1
max_check_attempts 4
notification_period 24x7
notification_options w,u,c,r
contact_groups infra-team, oncall, smsoncallworkhours


Now I also have service Escalations for the servicegroup I am using here.

define serviceescalation{
servicegroups oncall-monitored
first_notification 1
last_notification 1
notification_interval 180
contact_groups oncall,smsoncallworkhours
escalation_options w
}

define serviceescalation{
servicegroups oncall-monitored
first_notification 1
last_notification 0
notification_interval 180
contact_groups only-oncall-grp
escalation_options w
}

define serviceescalation{
servicegroups oncall-monitored
first_notification 1
last_notification 1
notification_interval 30
contact_groups oncall
escalation_options c,u
}

define serviceescalation{
servicegroups oncall-monitored
first_notification 1
last_notification 0
notification_interval 30
contact_groups only-oncall-grp,smsoncallworkhours
escalation_options c,u


I need to send a mail to the my ticketing service (oncall) everytime there is a state change, [Even from warning to Critical]. But I am not getting mail to my ticketing service in that case.

I suspect that the Notification number which the escalation checks is not set to '1' when the state changes from warning to critical. Please help me figure out the issue. Please give me some solutions , if any.

Thank you

Re: No notification when state changes :Warning to Critical

Posted: Mon Jun 10, 2013 12:26 pm
by abrist
Amarnath wrote: define serviceescalation{
servicegroups oncall-monitored
first_notification 1
last_notification 1
notification_interval 30
contact_groups oncall
escalation_options c,u
}
This is the escalation that is not working, correct? Have you tried increasing the last_notification value as a test?

Re: No notification when state changes :Warning to Critical

Posted: Wed Jun 12, 2013 1:29 pm
by Amarnath
No increasing the last_notification value doesn't work. I would like to know a way to reset the notification number when the state changes from WARNING to CRITICAL. This number is displayed in the dashboard page of the alert. I observe that when it goes from WARNING to CRITICAL, the displayed number in the parenthesis doesn't change. Please tell me a way to reset the number in case of such a state change .

Thanks in Advance

Re: No notification when state changes :Warning to Critical

Posted: Wed Jun 12, 2013 2:52 pm
by slansing
Do you have a dashlet displaying this? These numbers do change normally see "Host details, and Service details" pages. It is possible the refresh rate of the dashlet is higher than the state changes occurring.

Re: No notification when state changes :Warning to Critical

Posted: Thu Jun 13, 2013 1:15 am
by Amarnath
No , I do not have Dashlets. I am talking about the Normal page for the alert in the Nagios Dashboard, Which shows details like these.
------------------------------------------------------------------------
Check Type: ACTIVE
Check Latency / Duration: 0.041 / 0.008 seconds
Next Scheduled Check: 2013-06-13 11:44:45
Last State Change: 2013-06-12 23:49:31
Last Notification: 2013-06-13 11:39:50 (notification 74)
Is This Service Flapping? N/A
------------------------------------------------------------------------

The number (notification 74) 74 , the notification count for the alert. This doesn't reset when the state changes from WARNING to CRITICAL. I want to reset this number, so that My escalation for the first notification works and it sends a mail to my Ticketing service to create a Ticket for a CRITICAL alert. [The ticket for my WARNING alert already exists.].

Thanks

Re: No notification when state changes :Warning to Critical

Posted: Thu Jun 13, 2013 2:13 am
by Amarnath
I find this Patch here.
http://article.gmane.org/gmane.network. ... evel/7083/

Can any one tell me how to use it . If i am using a Nagios installtation , installed via apt-get ?

Re: No notification when state changes :Warning to Critical

Posted: Thu Jun 13, 2013 1:09 pm
by sreinhardt
You would need to install via source, you cannot patch an already compiled binary. Have you looked into the install from source.