Groups in services...

John P. Rouillard rouilj at cs.umb.edu
Sat Oct 15 00:18:01 CEST 2005


In message <5DC5085B189C5449A59F658D5F6A9EDF03970081 at busxis1.ad.santarosa.edu>,
"Johnson Steven" writes:
>I just installed Nagios 2.x (Whatever the current beta is), and I was
>wondering in stead of adding each host to a service definition, can you
>add a group name, so that everyone in that group will run that service check?

Yes.

>If it is possible, I can not see how to do this.

It's in the manual just not where you expect it to be.

>From the table of contexts/index for the nagios 2.0 doc look at 

  Advanced topics/Time-saving tips for object definitions

Synopsis:

define service{
		hostgroup_name		HOSTGROUP1,HOSTGROUP2,...,HOSTGROUPN
		service_description	SOMESERVICE
		other service directives ...
		}

Definitely got to fix the documentation and add the hostgroup_name to
the template explanations.

>I would like it if all I had to do to add a new server to nagios was to add 
>its host definition, and then add that hostname to the proper groups, based
>on what services need to be monitored.

That's precisely what I am doing. Works well. Rather than changing the
hostgroups, use the "hostgroups" keyword in the host definition. See
the main template docs xodtemplate.html. Its buried under

   Index/Object configuration file options/How Is Object Data Defined?/
   "Click here".

Bookmark it.

>But as it is, it seems I have to
>add that new host name to each service on its host_name line.

Nope. You can do it just like you want to.

				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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