What is the easiest way to obtain a report of the current services that includes:1) service name2) service description3) service state (i.e., active or not)4) associated hosts5) notification contacts6) other info is helpful but not necessary

I've looked in the objects.cache file and all the info I need is there but each service is defined for each host so with the 65 services we have there are 360 "define service" entries in the file.

if you could give me these 4 fields (service_description|host_name|contacts|contact_groups), separated by the pipe char (|) for each "define service" that would be perfect. Thanks very much for your help -- Tom

It's worth mentioning that objects.cache only contains the configuration directives that are absolutely necessary; IE it won't "auto fill" unecessary directives. If there's no contacts or contact_groups assigned/inherited (bequeathed?) to a service, they won't show up.

The first 4 results only have a contact_groups directive in their config file. The last 4 results have both a contacts and contact_groups directive in their config file. You could do more clever things with sed than I have to get it into CSV (or pipe-delimited format) I imagine.

Who is online

Users browsing this forum: No registered users and 13 guests

Nagios, the Nagios logo, and Nagios graphics are the servicemarks, trademarks, or registered trademarks owned by Nagios Enterprises. All other servicemarks and trademarks are the property of their respective owner.