Get Downtime ID For Specific Service
Posted: Fri Jan 22, 2021 2:00 pm
I can use the below command to get a list of downtime ids for a specific host, but how do I get the downtime id for a specific service on a host?
curl -XGET 'http://xxxxxx:xxxxx@<nagios server>/nagios/cgi-bin/statusjson.cgi?query=downtimelist&formatoptions=whitespace&hostname=<hostname>&downtimeobjecttypes=service&downtimetimefield=starttime' -o down-id-list
curl -XGET 'http://xxxxxx:xxxxx@<nagios server>/nagios/cgi-bin/statusjson.cgi?query=downtimelist&formatoptions=whitespace&hostname=<hostname>&downtimeobjecttypes=service&downtimetimefield=starttime' -o down-id-list