Nagios Downtime using Ansible

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Nagios Downtime using Ansible

Postby nagiosbeginner » Wed Jun 24, 2020 6:50 am

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
nagiosbeginner
 
Posts: 1
Joined: Thu Jan 30, 2020 6:09 am

Re: Nagios Downtime using Ansible

Postby scottwilkerson » Mon Jul 06, 2020 3:09 pm

Is "Ansible" a valid user that is authorized to run commands for this host/service?

https://assets.nagios.com/downloads/nagioscore/docs/externalcmds/cmdinfo.php?command_id=119
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 18663
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Community Support

Who is online

Users browsing this forum: remedsys and 17 guests