Page 1 of 1
Need to pull services list with contacts
Posted: Fri Aug 06, 2021 7:31 am
by manimurugesan
Hi Team,
I need list of services with contacts assigned to it .
Is there any way to get each services with contacts from nagiosxi console or cmd prompt(putty) ?
Re: Need to pull services list with contacts
Posted: Fri Aug 06, 2021 12:52 pm
by pbroste
Hello @naminurugesan
Thanks for reaching out, found others that had similar requests.
Code: Select all
{yourserveraddress}/nagios/cgi-bin/config.cgi
You can view the data in a format but if you would like to parse the data then you would need to run something like this, for example:
Code: Select all
{yourserveraddress}/nagios/cgi-bin/objectjson.cgi?query=service&hostname={hostname]&servicedescription=Disk+Usage
Example:
"contact_groups": [
],
"contacts": [
"nagiosadmin"
],
Thanks,
Perry