<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:st1="urn:schemas-microsoft-com:office:smarttags" 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]--><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceType" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceName" /><o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place" /><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]--><style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Monotype Corsiva";
panose-1:3 1 1 1 1 2 1 1 1 1;}
/* 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;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal;
font-family:Arial;
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<div>
<p class="MsoNormal"><font size="3" color="navy" face="Times New Roman"><span style="font-size:12.0pt;color:navy"> </span></font><o:p></o:p></p>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">
<hr size="2" width="100%" align="center" tabindex="-1">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;
font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma"> nagios-users-bounces@lists.sourceforge.net
[mailto:nagios-users-bounces@lists.sourceforge.net] <b><span style="font-weight:
bold">On Behalf Of
</span></b>Michael Egan<br>
<b><span style="font-weight:bold">Sent:</span></b> Wednesday, December 05, 2007 12:04 PM<br>
<b><span style="font-weight:bold">To:</span></b> nagios-users@lists.sourceforge.net<br>
<b><span style="font-weight:bold">Subject:</span></b> [Nagios-users] Adding a CFG file for virtual machines</span></font><o:p></o:p></p>
</div>
<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="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">I would like to add a separate group within Nagios for my virtual machines. I created a file called virtual.cfg and changed the HOST GROUP DEFINITION to the
following:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Define hostgroup {<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> hostgroup_name virtual-servers ; the name of the hostgroup<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> alias Virtual Servers ; long name of the group<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"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">For each host definition, the ‘use’ statement is as follows:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Use virtual-servers ; Inherit default values from a template<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">In the nagios.cfg file, I have added the following statement:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Cfg_file=/usr/local/nagios/etc/objects/virtual.cfg<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 verify the configuration files, I get the following error:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Error: Template ‘virtual-servers’ specified in host definition could not be not found (config file ‘/usr/local/nagios/etc/objects/virtual.cfg’. starting on line
39<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 think I am missing a step or two to include this new cfg file. Any help would be appreciated.<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">Thanks,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Mike<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><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Mike Egan<br>
Enterprise Network Engineer</span></font> <br>
<font size="2" color="black" face="Arial"><span style="font-size:10.0pt;font-family:
Arial;color:black">Capital Safety</span></font> <br>
<font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">3833 Sala Way</span></font>
<br>
<font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Red Wing, MN 55066</span></font>
<br>
<font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">651-385-6254 Office</span></font>
<br>
<font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">651-247-5719 Cell</span></font>
<br>
<font size="5" face="Monotype Corsiva"><span style="font-size:18.0pt;font-family:
"Monotype Corsiva""><a href="blocked::mailto:michaele@capitalsafety.com" title="mailto:michaele@capitalsafety.com"><font size="2" face="Arial" title="mailto:michaele@capitalsafety.com"><span style="font-size:10.0pt;
font-family:Arial"><span title="mailto:michaele@capitalsafety.com">michaele@capitalsafety.com</span></span></font></a></span></font>
<o:p></o:p></p>
<p><font size="2" face="Arial"><span style="font-size:10.0pt;font-family:Arial">Home of DBI-Sala and Protecta Brands. Visit us on the web at
<a href="blocked::http://www.capitalsafety.com/" title="http://www.capitalsafety.com/">
www.capitalsafety.com</a></span></font> <o:p></o:p></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">If I understand what you are trying to do:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">I am putting hosts into hostgroups in the host definitions like this:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy">#HOST DEFINITION<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy">define host{<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy"> use linux-server ; Name of host template to use<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy"> ; This host definition will inherit all variables that are defined<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy"> ; in (or inherited by) the linux-server host template definition.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy"> host_name sparky<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy"> alias Oracle RAC<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy"> address 1.2.4.4<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy"> hostgroups linux-servers<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Courier New"><span style="font-size:10.0pt;font-family:"Courier New";color:navy"> }<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Note that ‘linux-server’ is a host template, and ‘linux-servers’ is a hostgroup.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="3" color="navy" face="Times New Roman"><span style="font-size:12.0pt;color:navy"> <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" color="navy" face="Times New Roman"><span style="font-size:12.0pt;color:navy"> <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Robert C. Cipriani</span></font><font color="navy"><span style="color:navy"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Senior Network Administrator</span></font><font color="navy"><span style="color:navy"><o:p></o:p></span></font></p>
<p class="MsoNormal"><st1:place w:st="on"><st1:PlaceName w:st="on"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:navy">Tampa</span></font></st1:PlaceName><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">
<st1:PlaceType w:st="on">Bay</st1:PlaceType></span></font></st1:place><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;
color:navy"> Division IT</span></font><font color="navy"><span style="color:navy"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">Bright House Networks</span></font><font color="navy"><span style="color:navy"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">W: (727) 329-2000 x74264</span></font><font color="navy"><span style="color:navy"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy">M: (727) 365-1231</span></font><font color="navy"><span style="color:navy"><o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" color="navy" face="Times New Roman"><span style="font-size:12.0pt;color:navy"> <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:navy"><o:p> </o:p></span></font></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="-2">CONFIDENTIALITY NOTICE: This e-mail may contain information that is privileged, confidential or otherwise protected from disclosure. If you are not the intended recipient of this e-mail, please notify the sender immediately
by return e-mail, purge it and do not disseminate or copy it.<br>
</font>
</body>
</html>