Page 1 of 1

Nagios Downtime using Ansible

Posted: Wed Jun 24, 2020 6:50 am
by nagiosbeginner
Hi,

I tried to schedule downtime using ansible for nagios core. But I'm getting

Error: External command failed -> SCHEDULE_SVC_DOWNTIME;localhost;httpd;1592999244;1592999544;1;0;300;Ansible;test

---
- name: Nagios Downtime
hosts: localhost
become: true
tasks:
- name: Downtime for swap
nagios:
action: downtime
minutes: 5
service: httpd
host: '{{ inventory_hostname }}'
cmdfile: /usr/local/nagios/var/rw/nagios.cmd
comment: test


Can somebody help me to resolve this

Re: Nagios Downtime using Ansible

Posted: Mon Jul 06, 2020 3:09 pm
by scottwilkerson
Is "Ansible" a valid user that is authorized to run commands for this host/service?

https://assets.nagios.com/downloads/nag ... and_id=119