Hi all,
Would it be possible to create event using the REST API ?
Something like:
curl -XPOST "http://localhost/nagiosxi/api/v1/config ... T&pretty=1" -d "host_name=testapihost&address=127.0.0.1&check_command=check_ping\!3000,80%\!5000,100%&status_info=ping_is_down&status=critical&last_check_time=now"
And the same apply it the check is back up OK, get a acknowledgement of the event in NAgios:
curl -XPOST "http://localhost/nagiosxi/api/v1/config ... T&pretty=1" -d "host_name=testapihost&address=127.0.0.1&check_command=check_ping\!3000,80%\!5000,100%&status_info=ping_is_up&status=OK&last_check_time=now"
Thanks,
Rgds,
Nagios event creation from API rest
-
kyang
Re: Nagios event creation from API rest
Hello @nagit,
Are you trying to create a new host/service that specifies the status and info for ping as down and then acknowledge it?
Or are you trying to update a host/service you currently have and change its status info and state and then acknowledge it?
Can you explain your situation a bit more?
Have you taken a look at the REST API help documentation?
Nagios XI home --> help --> REST API docs
Are you trying to create a new host/service that specifies the status and info for ping as down and then acknowledge it?
Or are you trying to update a host/service you currently have and change its status info and state and then acknowledge it?
Can you explain your situation a bit more?
Have you taken a look at the REST API help documentation?
Nagios XI home --> help --> REST API docs