problem with using "hostgroup_name" in service definitions: Error: Hostgroup name and/or alias is NULL

Justin Hitt hittjw at gmail.com
Fri Feb 8 17:19:48 CET 2008


Joost van Baal,

On 2/8/08, Joost van Baal <j.e.vanbaal+nagios-users at uvt.nl> wrote:
> Is it possible at all to _not_ have an explicit object (with it's own
> "define") in the nagios configuration for the number of hosts times the
> number of services on each such host?

I'm managing 2,900+ hosts on one environment and have found you do
need to define each object completely, however, you can use an object
oriented approach of inherited characteristics.

With this I create a directory for each business unit or group, then a
file in each directory for each host type (i.e. static, dynamic, core,
...), with a generic host for each file with characteristics specific
to that group.  This way I only need 4 lines for host definitions (5
if you have a 'parents' defined.)  The top of the file defines any
group specific host checks or intervals.

This is kind of like your [/etc/nagios2-test/head_hosts.cfg] example,
except I may have "hosts_network.cfg" and a "hosts_core.cfg" each with
a more expanded first definition, "lean-host" in your example,
followed by a list of all hosts associated to that definition.

The same works for services definitions and host dependencies.  Think
"monitoring groups" rather than "monitoring hosts" then layout hosts
in groups by category or purpose.  See:
http://nagios.sourceforge.net/docs/3_0/objecttricks.html

I find this also works for building host groups and when multiple
people might be updating the configuration files.

Best,

Justin

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list