Hello!

I've noticed an odd behaviour of the macro $NOTIFICATIONRECIPIENTS$ on one of 
our Icinga servers. I wanted to ask if anyone has similar experience and knows 
if this is a configuration error on my side or wether this might be a bug.

We are using $NOTIFICATIONRECIPIENTS$ in eMail- and XMPP-Notification, where 
the lenght of the notification is not an issue (or hasn't been until now). It's 
a useful way of knowing to whom notifications have been sent, i.e. if wether 
they have been sent to a costumer who might ask about it and so on.

What's happening is this:

- On the first notification about a host or service the macro contains the list 
of all contacts to whom this particular notification has been sent. This is as 
expected. It is usually a short list of 4 to 8 contacts. Every contact receives 
one notification. (In some cases, a person might have multiple contacts, but 
that's not the issue here.)
- On every further notification for that host or service the macro contains the 
list of contacts from the previous round, plus the list of all contacts to whom 
this new notification is sent. So if my list where "a,b,c", it would be 
"a,b,c,a,b,c" on the second round, then "a,b,c,a,b,c,a,b,c" on the third and so 
on. Luckily, Icinga is smart enough to notify each contact only once.

A similar result would be accieved in a shell script by using something like 
"LIST="foobar:$LIST" over and over again.

This particular server is running Icinga 1.4.0.

We're having the same notification setup on another server, which is still 
running Icinga 1.3.1. On this machine, this odd behaviour of 
$NOTIFICATIONRECIPIENTS$ does not occur.

I've attached parts of our config files and an example. If you need to see more 
of the configuration, just ask.

I'm a little worried what will happen once the $NOTIFICATIONRECIPIENTS$ reaches 
a length that doesn't fit into this server's memory. :-)

Best wishes,

Christopher
# Command definitions:

define command{
        command_name    notify-host-by-mail
        command_line    /usr/bin/printf "%b" "***** Icinga@ike 
*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: 
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: 
$LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ 
is $HOSTSTATE$ **" $CONTACTEMAIL$
        }

define command{
        command_name    notify-service-by-mail
        command_line    /usr/bin/printf "%b" "***** Icinga@ike 
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: 
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: 
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** 
$NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ 
**" $CONTACTEMAIL$
        }
define command{
        command_name    notify-host-by-sendxmpp
        command_line    /usr/bin/printf "%b" "Icinga@ike: 
$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: 
$HOSTSTATE$\nInfo: $HOSTOUTPUT$\nNotification send to: 
$NOTIFICATIONRECIPIENTS$\nAuthor: $NOTIFICATIONAUTHOR$\nComment: 
$NOTIFICATIONCOMMENT$\nHost problem id: $HOSTPROBLEMID$\nLast host problem id: 
$LASTHOSTPROBLEMID$\nDate/Time: $LONGDATETIME$" | 
/package/host/localhost/sendxmpp-0.0.8-1/bin/sendxmpp -f 
/var/icinga/.sendxmpprc -s "$NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is 
$HOSTSTATE$" $CONTACTEMAIL$
        }
define command{
        command_name    notify-service-by-sendxmpp
        command_line    /usr/bin/printf "%b" "Icinga@ike: 
$NOTIFICATIONTYPE$\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: 
$HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $SERVICEOUTPUT$\nNotification send 
to: $NOTIFICATIONRECIPIENTS$\nAuthor: $NOTIFICATIONAUTHOR$\nComment: 
$NOTIFICATIONCOMMENT$\nService problem id: $SERVICEPROBLEMID$\nLast service 
problem id: $LASTSERVICEPROBLEMID$\nDate/Time: $LONGDATETIME$" | 
/package/host/localhost/sendxmpp-0.0.8-1/bin/sendxmpp -f 
/var/icinga/.sendxmpprc -s "$NOTIFICATIONTYPE$ Service Alert: 
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTEMAIL$
        }

# Example of results, taken from a mail:

Subject: ** PROBLEM Service Alert: ernie/Linux-RAID is CRITICAL **

***** Icinga@ike *****

Notification Type: PROBLEM

Service: Linux-RAID
Host: ernie
Address: XXX.XXX.XXX.XXX
State: CRITICAL

Info: CRITICAL md0 status=[UU]. md1 status=[UU]. md2 status=[UU]. md3 status=[_
U].

Notification send to: jonas-mail,jonas-jabber,boni-mail,matthias-mail,christoph
er-mail,christopher-jabber,jonas-mail,jonas-jabber,boni-mail,matthias-mail,chri
stopher-mail,christopher-jabber,jonas-mail,jonas-jabber,boni-mail,matthias-mail
,christopher-mail,christopher-jabber,jonas-mail,jonas-jabber,boni-mail,matthias
-mail,christopher-mail,christopher-jabber,jonas-mail,jonas-jabber,boni-mail,mat
thias-mail,christopher-mail,christopher-jabber,jonas-mail,jonas-jabber,boni-mai
l,matthias-mail,christopher-mail,christopher-jabber,jonas-mail,jonas-jabber,bon
i-mail,matthias-mail,christopher-mail,christopher-jabber,jonas-mail,jonas-jabbe
r,boni-mail,matthias-mail,christopher-mail,christopher-jabber,jonas-mail,jonas-
jabber,boni-mail,matthias-mail,christopher-mail,christopher-jabber,jonas-mail,j
onas-jabber,boni-mail,matthias-mail,christopher-mail,christopher-jabber,jonas-m
ail,jonas-jabber,boni-mail,matthias-mail,christopher-mail,christopher-jabber,jo
nas-mail,jonas-jabber,boni-mail,matthias-mail,christopher-mail,christopher-jabb
er,jonas-mail,jonas-jabber,boni-mail,matthias-mail,christopher-mail,christopher
-jabber,jonas-mail,jonas-jabber,boni-mail,matthias-mail,christopher-mail,christ
opher-jabber,jonas-mail,jonas-jabber,boni-mail,matthias-mail,christopher-mail,c
hristopher-jabber,jonas-mail,jonas-jabber,boni-mail,matthias-mail,christopher-m
ail,christopher-jabber,jonas-mail,jonas-jabber,boni-mail,matthias-mail,christop
her-mail,christopher-jabber
Author: 
Comment: 

Service problem id: 227
Last service problem id: 95

Date/Time: Sun Jun 19 07:01:21 CEST 2011
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to