Hi,
We're running Nagios Core 3.2.3 on Ubuntu 12.04 LTS. We currently need some mechanism to check if a concrete service is defined in the Nagios configuration file. For example, from some client host (let's call it 'mailserv') I want to check if there's some service definition for 'mailserv' that has 'My passive check' as the service description. Is there some way to achieve this? If not natively, is there a way we could easily emulate this behavior?
Thanks.
Checking if a service definition exists
Re: Checking if a service definition exists
I might not be understanding fully what you want, but a good place to start might be the objects.cache file in the .../nagios/var/ directory. It has full definitions for all objects in your running Nagios environment. It also takes all the template options and compiles them, sort of "flattening out" the object so to speak, so there is no need to look at the template an object may be using.
Former Nagios employee