Nagios event creation from API rest
Posted: Sat Nov 04, 2017 6:53 am
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,
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,