Custom variable not returning any values

Ayotunde Itayemi Ayotunde.Itayemi at zain.com
Thu Jul 9 14:22:11 CEST 2009


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: itayemi.a at ng.celtel.com <mailto:ronald.mcdonald at zain.com>   

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"

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090709/0fa964ac/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 5337 bytes
Desc: image001.png
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090709/0fa964ac/attachment.png>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
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