Page 1 of 1

where is a contact assigned to?

Posted: Wed Oct 16, 2024 9:29 am
by JohnFLi
Is it possible to find all the services/host a particular contact is attached to?
The reason being is that this one particular contact sends out a text message. a handful of servers no longer need that style of contacting and I would like to remove it from the services we no longer need to be texted about.

Re: where is a contact assigned to?

Posted: Wed Oct 16, 2024 9:51 am
by sgardil
JohnFLi wrote: Wed Oct 16, 2024 9:29 am Is it possible to find all the services/host a particular contact is attached to?
The reason being is that this one particular contact sends out a text message. a handful of servers no longer need that style of contacting and I would like to remove it from the services we no longer need to be texted about.
Thanks for reaching out @JohnFLi

Do you have an enterprise version of XI? If so you can go to the ccm->tools->bulk modification tools. In this page click remove contact and on that page you can select the contact in question and find the hosts and services it is attached too.

Re: where is a contact assigned to?

Posted: Wed Oct 16, 2024 10:00 am
by JohnFLi
No, i do not have the Enterprise Version :(

But I did just notice if I click fast enough, it will show me the list of places that I can then copy and paste into excel.....

this will be good enough,

thank you

Re: where is a contact assigned to?

Posted: Wed Oct 16, 2024 10:41 am
by snapier3
This can be done with the API.
A GET to config/host or config/service will give you the contacts filed.

Code: Select all

curl -XGET "https://<you nagiosxi ip/fqdn>/nagiosxi/api/v1/config/host?apikey=<your-api-key>&filter=active&pretty=1"
or

Code: Select all

curl -XGET "https://<you nagiosxi ip/fqdn>/nagiosxi/api/v1/config/service?apikey=<your-api-key>&filter=active&pretty=1"
Output is in JSON but you can fix that pretty quick.

Happy Monitoring,
--SN