Page 1 of 1

NagiosXI API servicestatus gather only Critical Status

Posted: Mon Apr 08, 2019 9:18 pm
by imadc
Hello Team

We would like to gather all the critical status services from about 3700 service that we are currently monitoring over 400 hosts

Can you advise what filters we can add to the REST API call to the nagiosxi server so that we don't get all the running 3700 servicestatus.

http://X.X.X.X/nagiosxi/api/v1/objects/ ... x&pretty=1"

Thanks,
Insurity

Re: NagiosXI API servicestatus gather only Critical Status

Posted: Tue Apr 09, 2019 11:33 am
by lmiltchev
You could add "&current_state=2" at the end of the URL, e.g.

Code: Select all

http://x.x.x.x/nagiosxi/api/v1/objects/servicestatus?apikey=xxxx&pretty=1&current_state=2
This should display only the services that are in Critical state.

Re: NagiosXI API servicestatus gather only Critical Status

Posted: Tue Apr 09, 2019 2:11 pm
by imadc
Thanks this exactly what we were looking for

Case will be closed

Insurity