contact emails

Tony Heal theal at pace2020.com
Mon Apr 18 22:39:35 CEST 2005


I have a Debian (woody) 2.01b system and I need to get notifications sent to
several email addresses for the same contact.

$CONTACTADDRESSn$
Address of the contact being notified. Each contact can have six different
addresses (in addition to email address and pager number). The macros for
these addresses are $CONTACTADDRESS1$ - $CONTACTADDRESS6$. This value is
taken from the addressx directive in the contact definition.

After reading the docs it looks like I have to use addressx where x is a
number 1-6 in my contact def and (although it is not stated) set up a
definition in misccommands.cfg to use this.

This setup passes the check, but still does not email both email addresses.
Only the address for email (not address1). I actually need to get notified
on at least 3 email addresses.

# 'notify-by-address-1' command definition
define command{
        command_name    notify-by-address-1
        command_line    /usr/bin/printf "%b" "***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "$HOSTALIAS$/$SERVICEDESC$ is
$SERVICESTATE$ - $NOTIFICATIONTYPE$ alert" $CONTACTADDRESS1$
        }

contact defined in contacts.cfg
# 'theal' contact definition
define contact{
        contact_name                    theal
        alias                           Tony Heal
        contactgroups                   network-admins
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-by-email, notify-by-address-1
        host_notification_commands      host-notify-by-email,
host-notify-by-address-1
        email                           theal at pace2020.com
        address1
my-other-email-address at that-place.com
        }



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list