Hi All, I use a custom variable _primary_contact in my host definitions (below). I then modified the notification commands to include the variable but it's not being set (no values are returned). What am I doing wrong? Thanks.
define host {
host_name
alias
display_name
address
parents
use linux-server
contacts
contact_groups unix-admins
notification_period 24x7
notification_options d,u,r
notifications_enabled 1
icon_image sun.gif
_primary_contact 1001, 2145, 7134, 7207
register 1
}
/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type:
$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
$HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
$LONGDATETIME$\n\nPrimary Contact: $_primary_contact$\n" | /bin/mail -s
"** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **"
$CONTACTEMAIL$
Ayotunde Itayemi
IT Projects Implementation
Zain
Zain House,
Plot 1664 Victoria Island, Lagos
M: NG +234 8022225919
O: NG +234 8021905919
F: NG +234 8022221000
E: [email protected] <mailto:[email protected]>
www.zain.com
<https://mail.mtc.com.lb/exchweb/bin/redir.asp?URL=http://www.zain.com/>
"Enjoy free midnight calls from 12.30am - 4.30am on the new TRU Talk
package by registering with *141*708#. Zain ... A Wonderful World"
<<inline: image001.png>>
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge
_______________________________________________ Nagios-users mailing list [email protected] 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
