Page 1 of 1

Query Service DisplayName

Posted: Tue May 25, 2021 11:54 pm
by FCC_Nagios_Support
Good Morning,
How can I query the service displayname by api
Thks
KR

Re: Query Service DisplayName

Posted: Wed May 26, 2021 5:46 pm
by ssax
This should do it:

Code: Select all

yum install jq
curl --silent -k -L 'http://YOURXISERVER/nagiosxi/api/v1/objects/servicestatus?apikey=YOURAPIKEY&pretty=1&host_name=localhost&service_description=SSH' | jq -r '.servicestatus[] .display_name'

Re: Query Service DisplayName

Posted: Thu May 27, 2021 1:04 am
by FCC_Nagios_Support
Many thanks I am gonna try
KR

Re: Query Service DisplayName

Posted: Thu May 27, 2021 5:12 pm
by benjaminsmith
Hi,

Sounds good. Let us know that works for you.

Re: Query Service DisplayName

Posted: Thu May 27, 2021 5:43 pm
by ssax
Locking thread, ticket received, we will continue support through the ticket.

Thank you!