<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:x="urn:schemas-microsoft-com:office:excel" 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 11 (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>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 66.25pt 1.0in 66.25pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hello,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I’m monitoring about 30 machines using Nagios with
SNMP checks.  I also have a DHCP server casting each machine on the
network their IP address on start-up.  Some machines stay on the majority
of the time, others for only 4-8 hours a day.  The machines generally
maintain their same IP address over time as DHCP is designed to try and give a
machine back it’s same IP, so long as it’s available.  However,
there have been times when a machine has changed its IP addresses as a result
of using DHCP on this LAN.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Question:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>When I write the host macro for a given machine, e.g:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>define host{<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        host_name      random_machine <o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        address        <font
color=red><span style='color:red'>192.168.1.100</span></font><o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        check_command  check_ping<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        }<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Is there a way to have nagios use a variable to read its address rather than keep the address static?  This would allow me to have a script scan the network, and assign IPs to a given variable which is then read by the host’s *.cfg file in the /etc/objects directory.<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Any and all advice is appreciated.<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Thank you,<o:p></o:p></span></font></pre>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><i><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial;font-style:italic'>---</span></font></i><font face=Arial><span
style='font-family:Arial'><o:p></o:p></span></font></p>

<p class=MsoNormal><i><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial;font-style:italic'>Matt Lozier</span></font></i><o:p></o:p></p>

<p class=MsoNormal><i><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial;font-style:italic'>Network Administrator</span></font></i><o:p></o:p></p>

<p class=MsoNormal><i><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial;font-style:italic'>972.644.2581, ext. 248</span></font></i><o:p></o:p></p>

<p class=MsoNormal><i><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial;font-style:italic'>972.661.2701  fax<o:p></o:p></span></font></i></p>

<p class=MsoNormal><i><font size=3 face=Arial><span style='font-size:12.0pt;
font-family:Arial;font-style:italic'><o:p> </o:p></span></font></i></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><a href="http://www.spindletopoil.com/"><span style='text-decoration:
none'><img border=0 width=145 height=73 id="_x0000_i1025"
src="cid:image001.jpg@01C82A8B.CF52A5E0"></span></a><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=black face=Arial><span style='font-size:
8.0pt;font-family:Arial;color:black;text-transform:uppercase'>The information
contained in this message or any attached document is confidential and intended
only for the individual(s) or entity to which it is addressed.   The
information should be considered privileged and confidential. </span></font><font
size=1 color=black face="Courier New"><span style='font-size:8.0pt;font-family:
"Courier New";color:black;text-transform:uppercase'> </span></font><font
size=1 color=black face=Arial><span style='font-size:8.0pt;font-family:Arial;
color:black;text-transform:uppercase'>If you are not the intended recipient,
you are hereby notified that any unauthorized use of the information contained
in or transmitted with the communication, or dissemination, distribution, or
copying of this communication is strictly prohibited by law.  If you have
received this communication in error, please inform the sender by immediately
returning this communication to the sender and then deleting the original
message and any copy of it in your possession.</span></font><font color=black><span
style='color:black;text-transform:uppercase'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

</body>

</html>