Calling the Ansible REST API from Nagios XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
SharphSonirak
Posts: 5
Joined: Sun Jul 17, 2022 3:15 am

Calling the Ansible REST API from Nagios XI

Post by SharphSonirak »

Has anyone been able to figure out how to have Nagios XI call an external Ansible Playbook for self-healing of a server. This works with a curl command. Is there anyway to create an event handler for calling Ansible Tower REST API? My working curl command looks like this -

curl -k -X POST \

-H "Authorization: Bearer TOKEN" \

-H "Content-Type: application/json" \

--data '{"extra_vars": "{\"target_fqdn\": \"server1.domain.com\"}"}' \

https://192.xxx.xx.xxx/api/v2/job_templates/76/launch/
Post Reply