where is a contact assigned to?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

where is a contact assigned to?

Post 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.
Everybody is somebody else’s weirdo
sgardil
Posts: 355
Joined: Wed Aug 09, 2023 9:58 am

Re: where is a contact assigned to?

Post 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.
User avatar
JohnFLi
Posts: 559
Joined: Mon Jun 17, 2013 3:11 pm

Re: where is a contact assigned to?

Post 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
Everybody is somebody else’s weirdo
snapier3
Posts: 144
Joined: Tue Apr 23, 2019 7:12 pm

Re: where is a contact assigned to?

Post 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
Post Reply