Nagios has a extensive documentation online. See if this helps.<br><br><a href="http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#hostgroup">http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#hostgroup</a><br>
<br>regards<br>Matej Vesel<br><br><br><div class="gmail_quote">On Fri, Jul 24, 2009 at 4:29 PM, Dayo Adewunmi <span dir="ltr"><<a href="mailto:contactdayo@gmail.com">contactdayo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
How do I specify the hostgroup in a separate file?<br>
<br>
Matej wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
linux-server, is the default host definition template. I think you cant use the same name for a template and a hostgroup. When adding host you specify a host template to use with a line like this<br>
<br>
use linux-server<br>
<br>
I specify the hostgroup in a seperate file, where I state the name of the group and its members. I never do it with host definitions.<br>
<br>
later<br>
Matej<br>
<br>
<br>
<br>
<br></div><div class="im">
On Fri, Jul 24, 2009 at 1:12 PM, Dayo Adewunmi <<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a> <mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a>>> wrote:<br>
<br>
This is what I got: <a href="http://pastebin.com/m761159a1" target="_blank">http://pastebin.com/m761159a1</a><br>
<br>
So, in ebola.cfg I commented out<br>
<br>
hostgroup_name linux-servers ; The name of the hostgroup<br>
<br>
And now it works. How come?<br>
<br>
<br>
<br>
Matej wrote:<br>
<br>
start nagios with<br>
nagios -v nagios.cfg<br>
<br>
You have a error in you config file. The above command will<br>
provide you with a detailed output, and you will see in what<br>
line the error is .. Go and fix it and retry.<br>
<br>
<br>
<br>
On Fri, Jul 24, 2009 at 12:44 PM, Dayo Adewunmi<br>
<<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a> <mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a>><br></div><div><div></div><div class="h5">
<mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a> <mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a>>>><br>
wrote:<br>
<br>
Hi<br>
<br>
I tried adding either of these lines to nagios.cfg:<br>
<br>
cfg_file=/usr/local/nagios/etc/objects/ebola.cfg<br>
cfg_dir=/usr/local/nagios/etc/objects/desktops<br>
<br>
And when I restart nagios this is what happens:<br>
<br>
"Running configuration check... CONFIG ERROR! Restart aborted.<br>
Check your Nagios configuration."<br>
<br>
<br>
Matej wrote:<br>
<br>
Check the Configuration tab in nagios web interface,<br>
there it<br>
shows the "live" config aka. what it read and loaded.<br>
You probably need to add the new config to your nagios.cfg<br>
file, so Nagios can read it. You also have a parameter in<br>
nagios.cfg, that you can set to a folder, and it reads all<br>
*.cfg files in that folder, thaat way you dont need to<br>
specify<br>
all config files seperatly.<br>
<br>
On Fri, Jul 24, 2009 at 11:52 AM, Dayo Adewunmi<br>
<<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a> <mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a>><br>
<mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a> <mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a>>><br>
<mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a><br>
<mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a>> <mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a><br>
<mailto:<a href="mailto:contactdayo@gmail.com" target="_blank">contactdayo@gmail.com</a>>>>><br>
<br>
wrote:<br>
<br>
Hi all<br>
<br>
I copied localhost.cfg to create an object<br>
definition for a<br>
new host:<br>
<a href="http://pastebin.com/f21c9df1c" target="_blank">http://pastebin.com/f21c9df1c</a><br>
<br>
No matter how often I restart nagios, the new host<br>
isn't being<br>
monitored.<br>
<br>
Best regards<br>
<br>
Dayo Adewunmi<br>
<br>
------------------------------------------------------------------------------<br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><br>
<mailto:<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>><br>
<mailto:<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><br>
<mailto:<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>>><br>
<mailto:<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><br>
<mailto:<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>><br>
<mailto:<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><br>
<mailto:<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>>>><br>
<br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version<br>
(-v) and<br>
OS when<br>
reporting any issue.<br>
::: Messages without supporting info will risk being<br>
sent<br>
to /dev/null<br>
<br>
<br>
<br>
<br>
-- lp<br>
Matej<br>
<br>
<br>
<br>
<br>
<br>
-- lp<br>
Matej<br>
<br>
<br>
<br>
<br>
<br>
-- <br>
lp<br>
Matej<br>
</div></div></blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>lp<br>Matej<br>