Hi,
By using a NRPE plugin which sends timely based events whose status is always O.K.
but attached datas are modified , I want to list them by using curl API such as :
curl -XGET "http://x.x.x.x/nagiosxi/api/v1/objects/ ... x&pretty=1
By using this request I retrieve only the newest one ..
How may in change this request in order to get all the events ?
Thx for help.
Regards,
J.P. Ribeauville
Retrieve all events related to a service via curl
Re: Retrieve all events related to a service via curl
You would want to use the objects/statehistory endpoint for this, see here on your system:
Code: Select all
http://YOURXISERER/nagiosxi/help/api-object-reference.php#objects-statehistoryCode: Select all
curl -k -L 'http://YOURXISERVER/nagiosxi/api/v1/objects/statehistory?apikey=YOURAPIKEY&pretty=1&host_name=YOURHOSTNAME&service_description=YOURSERVICEDESC'