Variations in monitored services (inheritance question?)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
peterg
Posts: 12
Joined: Wed Oct 07, 2015 11:13 am

Variations in monitored services (inheritance question?)

Post by peterg »

We have an estate of approximately 60 Nagios monitored servers which are not identical. By that I mean some have devices and services present that are missing on on others.

The configuration file is structured such that there is a template service{} definition that all our other specific checks inherit. At the moment these are all simple things (disk, load, user, etc) that every server can support. I want to extend this to check specific things on certain systems but I can't figure out the correct way to set this up in the configuration file. If I add these to the configuration file every server will try to check them and many will fail.

The structure of the configuration file is like this:

Generic host{} definition followed by a list of host definitions that inherit it.

A hostgroup{} definition which lists all 60+ hosts.

Generic service{} definition as mentioned at the top and a collection of services that inherit it.

I've looked at the Object inheritance page in the manual but I can't see how to apply it to this problem.

If someone has an example of host specific checks that would be a good start.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Variations in monitored services (inheritance question?)

Post by benjaminsmith »

Hi @peterg,

Perhaps you have already considered this but you can inherit templates from multiple sources. So if you already have a generic template for your services, then you can create another template for specific checks.

Local values in the service definition will take precedent over template values, and in the case of using multiple templates, the first template specified will take priority over the previews templates.

Object Inheritance With Templates

Let me know if that answers your question or not.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
peterg
Posts: 12
Joined: Wed Oct 07, 2015 11:13 am

Re: Variations in monitored services (inheritance question?)

Post by peterg »

@benjaminsmith I should have said, I'm still on Nagios 3, does that support multiple inheritance? If so that should work. If not, I can migrate to 4.

Peter
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Variations in monitored services (inheritance question?)

Post by benjaminsmith »

Hi Peter,

Yes. Nagios 3 supports object inheritance.

Nagios 3 Core Documentation
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked