Custom variable not returning any values

Ayotunde Itayemi Ayotunde.Itayemi at zain.com
Thu Jul 9 15:30:22 CEST 2009


Hi Kevin, thanks it worked!

"This mail is from a Gimper"


-----Original Message-----
From: Kevin Keane [mailto:subscription at kkeane.com] 
Sent: Thursday, July 09, 2009 1:56 PM
Cc: Nagios Users Mailinglist
Subject: Re: [Nagios-users] Custom variable not returning any values

I think in your printf line, you need to reference it as 
$_HOSTPRIMARY_CONTACT$.

Ayotunde Itayemi wrote:
>
> 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$
>
> cid:image004.png at 01C975B0.97B49D20
>
> 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"
>
>
------------------------------------------------------------------------
>
>
------------------------------------------------------------------------
------
> 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
> 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


-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to
Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or
proprietary information. Please be advised that the unauthorized use or
disclosure of the information is strictly prohibited. The information
herein is intended only for use by the intended recipient(s) named
above. If you have received this transmission in error, please notify
the sender immediately and permanently delete the e-mail and any copies,
printouts or attachments thereof.


------------------------------------------------------------------------
------
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
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

------------------------------------------------------------------------------
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
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