I am sorry for opening an old issue, but I have a question in regard to
this style of config, and this is the closest thread I have found to my
issue.  I am using Nagios 2.0b6, and want to completely do away
with the hostgroup definitions in favor of defining it in the host
definition, but am having problems.  I am using the object
inheritance templates like you, but when I run nagios -v I get <br>
<br>
Error: Could not find hostgroup 'Core_Monitors' specified in host
'cacti' definition (config file '/opt/nagios/etc/core/core_hosts.cfg',
starting on line 83)<br>
<br>
Am I allow to do this?  According to the documentation I can use
just the hostgroups line in the host definition as an alternative to a
hostgroups definition.  As a fix I tried making a hostgroup
definition, but without the members line, since all my members will be
defined in the host definition, this just changed the error to <br>
<br>
Error: Hostgroup has no members (config file '/opt/nagios/etc/corenap/corenap_hostgroups.cfg', starting on line 1)<br>
<br>
which I expected.  So, to sum up my question.  Is nagios at a
point where I don't have to define a hostgroup and can just use the
hostgroup line in the hosts definition.  Thanks for your response.<br>
<br>
-Zac Israel<br><br><div><span class="gmail_quote">On 8/12/05, <b class="gmail_sendername">Todd Barbera</b> <<a href="mailto:todd_barbera@wgbh.org">todd_barbera@wgbh.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks Marc,<br><br>This did the trick. I was able to clean up my config files considerably<br>using the templates.<br><br>Todd<br><br>-----Original Message-----<br>From: <a href="mailto:nagios-users-admin@lists.sourceforge.net">
nagios-users-admin@lists.sourceforge.net</a><br>[mailto:<a href="mailto:nagios-users-admin@lists.sourceforge.net">nagios-users-admin@lists.sourceforge.net</a>] On Behalf Of Marc Powell<br>Sent: Friday, August 12, 2005 3:32 PM
<br>To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>Subject: RE: [Nagios-users] Building Hostgroups using Host Config Files<br><br><br><br>> -----Original Message-----<br>
> From: <a href="mailto:nagios-users-admin@lists.sourceforge.net">nagios-users-admin@lists.sourceforge.net</a> [mailto:<a href="mailto:nagios-users-">nagios-users-</a><br>> <a href="mailto:admin@lists.sourceforge.net">
admin@lists.sourceforge.net</a>] On Behalf Of Todd Barbera<br>> Sent: Friday, August 12, 2005 2:06 PM<br>> To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>> Subject: [Nagios-users] Building Hostgroups using Host Config Files
<br>><br>> Hi,<br>><br>> I just installed Nagios 2.0 using Apache in an SSL setup. In my<br>> configuration, I decided not to use a single hosts.cfg file, but<br>instead<br>> break down my host entries via directories (
i.e.,<br>> etc/servers/sunservers.cfg, etc/servers/windows.cfg). My question is<br>can I<br>> create a hostgroup entry that references an individual config file as<br>it's<br>> input as opposed to having a "members" entry line that contains 50
<br>hosts<br>> or more? Thanks for the feedback.<br><br>No you can't. A suitable alternative for you might be using the<br>"hostgroups" directive in each of your host definitions.<br><br><a href="http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#host">
http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#host</a><br><br><br>You could even simplify that further by using a per-file template.<br>Presuming you already have a generic global host template defined you<br>could do the following in etc/servers/sunservers.cfg -
<br><br>define host {<br>        use generic-host<br>        name sunservers<br>        hostgroups sunservers<br>        register 0<br>}<br><br>define host{<br>        use                    
sunservers<br>        host_name              
Sun_Host_1<br>        alias                  
This is my Sun Host.<br>        address                
<a href="http://127.0.0.1">127.0.0.1</a><br>        }<br><br>define host{<br>        use                    
sunservers<br>        host_name              
Sun_Host_2<br>        alias                  
This is my Second Sun Host.<br>        address                
<a href="http://127.0.0.2">127.0.0.2</a><br>        }<br><br>I haven't actually done this myself but I expect the template<br>inheritance to allow it.<br><br>--<br>Marc<br><br><br>-------------------------------------------------------
<br>SF.Net email is Sponsored by the Better Software Conference & EXPO<br>September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices<br>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
<br>Security * Process Improvement & Measurement * <a href="http://www.sqe.com/bsce5sf">http://www.sqe.com/bsce5sf</a><br>_______________________________________________<br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net">
Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting
<br>any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<br><br><br><br>-------------------------------------------------------<br>SF.Net email is Sponsored by the Better Software Conference & EXPO
<br>September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices<br>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA<br>Security * Process Improvement & Measurement * 
<a href="http://www.sqe.com/bsce5sf">http://www.sqe.com/bsce5sf</a><br>_______________________________________________<br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net
</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
<br>::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>