utilizing pager/email in single contact

Terry td3201 at gmail.com
Wed May 24 19:31:55 CEST 2006


Good afternoon,

I am sure I am not seeing the big picture here but I want to have a
single contact and have nagios use the pager for critical/ok and email
for warning/ok messages.  It doesnt appear that the default
notification commands allow for this.  Here is a contact example:

define contact{
        contact_name    joe
        alias   Joe
        host_notification_period        24x7
        service_notification_period     24x7
        host_notification_options       d,u,r
        service_notification_options    w,u,c,r
        host_notification_commands      host-notify-by-email
        service_notification_commands notify-by-email
        email   joe at domain.com
        pager   7162351234 at vtext.com
}

Here is a notification command:

define command{
command_name    host-notify-by-email
command_line    /usr/bin/printf "%b" "***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost:
$HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/sendEmail -q
-s "10.7.7.2" -f  nagios at foo.net -t $CONTACTEMAIL$ -u  "Host
$HOSTSTATE$ alert for $HOSTNAME$!"
}


Do I need to write a new notification command that determines if the
alert is warning, critical, etc. and use the appropriate macro at that
point?

Also, sourceforge search appears to be broke, so I apologize if this
is one of many duplicates there.


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
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