<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hi All,<o:p></o:p></p>
<p class=MsoNormal>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.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>define host {<o:p></o:p></p>
<p class=MsoNormal>
host_name
<o:p></o:p></p>
<p class=MsoNormal>
alias
<o:p></o:p></p>
<p class=MsoNormal>
display_name
<o:p></o:p></p>
<p class=MsoNormal>
address
<o:p></o:p></p>
<p class=MsoNormal>
parents
<o:p></o:p></p>
<p class=MsoNormal>
use
linux-server<o:p></o:p></p>
<p class=MsoNormal>
contacts
<o:p></o:p></p>
<p class=MsoNormal> contact_groups
unix-admins<o:p></o:p></p>
<p class=MsoNormal>
notification_period
24x7<o:p></o:p></p>
<p class=MsoNormal>
notification_options
d,u,r<o:p></o:p></p>
<p class=MsoNormal>
notifications_enabled
1<o:p></o:p></p>
<p class=MsoNormal>
icon_image
sun.gif<o:p></o:p></p>
<p class=MsoNormal>
_primary_contact
1001, 2145, 7134, 7207<o:p></o:p></p>
<p class=MsoNormal>
register
1<o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>/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$<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New";
color:black'><img width=43 height=60 id="Picture_x0020_1"
src="cid:image001.png@01CA0093.AC07B820"
alt="cid:image004.png@01C975B0.97B49D20"></span><span style='font-family:"Tahoma","sans-serif";
color:black'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Tahoma","sans-serif";color:#8A27A9'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Arial","sans-serif"'>Ayotunde
Itayemi</span><span style='font-size:9.0pt;font-family:"Arial","sans-serif"'><br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>IT
Projects Implementation<br>
<br>
Zain<br>
Zain House,<br>
Plot 1664 Victoria Island, Lagos</span><span style='font-size:9.0pt;font-family:
"Arial","sans-serif"'><br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><br>
M: NG +234 8022225919<br>
O: NG +234 8021905919 <br>
F: NG +234 8022221000<br>
E: </span><a href="mailto:ronald.mcdonald@zain.com"><span style='font-size:
10.0pt;font-family:"Arial","sans-serif";color:blue'>itayemi.a@ng.celtel.com</span></a><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <br>
<br>
</span><a
href="https://mail.mtc.com.lb/exchweb/bin/redir.asp?URL=http://www.zain.com/"><span
style='font-size:10.0pt;font-family:"Arial","sans-serif";color:blue'>www.zain.com</span></a><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='color:black'>“Enjoy
free midnight calls from 12.30am - 4.30am on the new TRU Talk package by
registering with *141*708#. Zain ... A Wonderful World”<o:p></o:p></span></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>