Nagios Downtime using Ansible

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
nagiosbeginner
Posts: 3
Joined: Thu Jan 30, 2020 6:09 am

Nagios Downtime using Ansible

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Downtime using Ansible

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked