Notiffications - I receive one to much


#1

Hi All .
I have small issue with nagios. I don’t why, when a service goes to HARD state, nagios sends two notifications even when I have notification_interval set to 0.

First notification makes perfect sense - service went to hard state so nagios notifies users.
Second notification is sent after 20seconds (I have retry_check_interval=20seconds but perhaps it is just a coincidence ) and I don’t have a clue why this notification is generated.
third,fourth etc notifications are sent properly ( depending on time set for notification_interval config).

This second notification is just out of the blue for me.

Actually it is third not second notification because I send also one notification during a soft state with event handler and send_custom_svc_notification with parameter 4 which bumps a $SERVICENOTIFICATIONNUMBER$ but it shouldn’t mater.

I am sure that I am missing something, perhaps you know where my problem is.


#2

first check the notifications page, see who nagios sent the notification to, maybe you have an extra user involved?


#3

Thanks for suggestions.
It doesn’t look like that I made any mistake in contact definitions.

But I did some experiments and I see that it has something to do with escalations.
I’ve forgotten to mention that second message is escalated to mobile phone (separate contact which is not in any of groups).
So it is like this

  1. Custom message from handler
  2. Standard message when service goes to hard state + escalated message to mobile
  3. Standard message which shouldn’t be there ,20 seconds after message nr 2

When I turn off escalation I get only
1 Custom message from handler
2. Standard message when service goes to hard state ,
which is fine

So, escalation does something weird. It is defined like this :

define serviceescalation{
host_name host1
service_description dummy-service
first_notification 2 (because number one is the custom one, right? )
last_notification 2
notification_interval 5
contacts Gregory }

And Gregory conntact is :

define contact{
contact_name Gregory
use pager-contact
alias Gregory
email 303XXXXXX@txt.att.net

And pager-contact is standard template with service_notification_commands = notify-service-by-pager ,where n-s-by-pager is just a shorter,mobile
version of n-s-by-email .

Does it give you any thoughts ?
Regards


#4

how many notifications do you see in the notifications page? are htere three or four? what i’m trying to understand is if it’s nagios sending one too much or if it’s coming from somewhere else… is the text in some way different than the other notifications or is it the same as one of the others?


#5

Sorry for delay in our discussion, I was on my vacation.
So anyway, I get total 4 messages. Here is what I see on notifications page :

host1 dummy-service CRITICAL 05-10-2011 13:07:34 nagiosadmin notify-service-by-email File doesnt exist
host1 dummy-service CRITICAL 05-10-2011 13:07:14 Gregory notify-service-by-pager File doesnt exist
host1 dummy-service CRITICAL 05-10-2011 13:07:14 nagiosadmin notify-service-by-email File doesnt exist
host1 dummy-service CUSTOM (CRITICAL) 05-10-2011 13:06:15 nagiosadmin notify-service-by-email File doesnt exist

First one I get (last on above list) is the one custom which is generated during soft state by event handler. Then at 13:07:14 is message number 2 which is sent to nagiosadmin and escaleted user. And then at 13:07:34 is this spooky message. Message includes same information as message number 2.