Automate notes_url and event_handler for services

Support requests, bug reports, questions etc.
Automate notes_url and event_handler for services

Post by rapatel » Thu Apr 09, 2009 19:40

After some initial efforts in understanding how best to leverage nconf to generate/manage configurations, I have discovered various mechanisms to work out methods to meet our needs, however there is one area that seems to need some work. While I like that the service entries are automatically generated for hosts and you can modify any values you wish at the time of adding the host (or after), there does not seem to be a way to indicate in a host template, specific attributes to be filled in and with default values. These are related to items we add - a notes URL to invoke /nagiosgraph/show.cgi... and an event handler function for each service. I realize that using the Advanced -> multiple-modify lets someone easily add the values after selecting all the applicable host-service entries, however it would be much less effort to manage if we can add the attributes automatically some how depending on the service and use default values for the attributes that can be changed if necessary.


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

Re: Automate notes_url and event_handler for services

Post by agargiulo » Wed Apr 22, 2009 14:25


It is correct that using host-templates you cannot define default values for all host attributes. Host-templates currently have the following functions:
- define the host-alive check for a host
- define what default services should be added to a host

There is a possibility to define default values for each host attribute using the "Attributes" > "Modify" > "predefined value" + "possible values" fields (comma-separated list). These default values will apply to all any new host though, and are not dependent on the selected host template.

If I understand correctly, what you would like to do is extend the host-templates to contain other attributes as well, such as "notification_period", "notes_URL" etc. and to fill out these values from the template, when adding a new host. That would be a one-time only thing, right?

You see, the host-templates we have today are physically linked to the hosts, so that if you modify the host-alive check for example, this will affect all hosts who use that template. If we would keep the current link, this would mean removing the template attributes from the hosts, and storing them centrally in the template.

Which feature is it that you are requesting exactly?

Regards, Angelo