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/
Calling the Ansible REST API from Nagios xi
-
- Posts: 5
- Joined: Sun Jul 17, 2022 3:15 am