hostgroup based services

Support requests, bug reports, questions etc.
Locked
taenus
hostgroup based services

Post by taenus » Thu May 07, 2009 22:13

I'm a long time Nagios user, and very interested in NConf. Nagios has needed this since day one.

My question is - what can be done in the current setup to add service checks to a hostgroup object. My current Nagios configs define most of the service check through hostsgroups to make things easier. I would recreate the host-service relationship with hostgroups, but I don't even see how services are defined to hosts at a schema level.

User avatar
agargiulo
NConf developer
NConf developer
Posts:725
Joined:Fri Mar 06, 2009 17:50
Location:Zurich, Switzerland
Contact:

Re: hostgroup based services

Post by agargiulo » Fri May 08, 2009 10:51

Hi.

It is indeed possible to link hostgroups and services within the tool. The data schema allows it, but the GUI does not make it very user-friendly. When you add a host, the services are added automatically through a host-template. This feature does not exist for hostgroups, so you would have to create all your services manually and then link them to your hostgroup.

Also, the generate_config script is currently not made to handle this. It only exports a service to the config, if the service is linked to a host, and the host is set to be monitored by a specific collector server. This is the case, because we want NConf to generate an individual configuration for each collector server. That's something that is very important for distributed Nagios platforms.

If you'd like to try it out anyway, this is what you would have to do:
Go to "Attributes" > "Show" and select the attributes of the class "service". Edit the "host_name" attr and set it to mandatory = "no".
Next, go to "Attribues" > "Add" and create your new hostgroup attribute for the class "service". Set the attribute datatype to "assign_one" and the class items to be assigned to "hostgroup".
Now you may do a "Services" > "Add". You should see your new linking attribute at the bottom of the GUI.

taenus

Re: hostgroup based services

Post by taenus » Fri May 08, 2009 18:01

Just changing the attributes allowed me to create the objects, but as you seemed to think would happen they did not get generated to the config file.

Locked