Scheduled downtime command line

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
npolite
Posts: 7
Joined: Fri Sep 02, 2016 9:39 am

Scheduled downtime command line

Post by npolite »

Hello All,

I have an issue with setting up scheduled downtime at one of our newest sites. The command that our sript is using is (I have changed the password for the post)

Code: Select all

wget --user=restart --password=test -T 5 -O - "http://${NAGIOS}/nagios/cgi-bin/cmd.cgi?cmd_typ=22&cmd_mod=2&
host=${HOST}&service=${CHECK}&btnSubmit=Commit"
This works at one of our existing setups. I checked to see if there is a restart user in the .htaccess file and there is not at the site that this command currently works on. So I am confused as to where else to check to see where this user may be located. I see the commands in the nagios.log on the server that this is not working on but I don't see any errors.

Is there be some configuration variable that I need to look at?

Thanks
Last edited by tmcdonald on Fri Sep 02, 2016 10:47 am, edited 1 time in total.
Reason: Please use [code][/code] tags around code or terminal commands
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Scheduled downtime command line

Post by scottwilkerson »

I think you are confused with the commands.

Code: Select all

cmd_typ=22&cmd_mod=2
would be used to enable notification.

To schedule downtime you would need cmd_typ=56 and a whole bunch more variables

To see what is required visit the following URL on your server

Code: Select all

http://${NAGIOS}/nagios/cgi-bin/cmd.cgi?cmd_typ=56&host=${HOST}&service=${CHECK}
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked