Cannot Delete Downtime by Hostname from CGI
Posted: Tue May 17, 2016 5:04 am
Hi
I am using Nagios core 4.x and I can Schedule a downtime for a host using CGI cmd_type=55.
But when I am trying to delete the downtime for a host using following curl cmd it is not working:
DEL_DOWNTIME_BY_HOST_NAME = 170
The cgi is returning an error "Sorry, but you are not authorized to commit the specified command."
am i missing any argument? The command DEL_DOWNTIME_BY_HOST_NAME works from shell script thought but i want to work it through CGI.
Is there also a way to find downtime_id of a host from CGI so then i can use cmd_type=78 which uses a downtime id?
I am using Nagios core 4.x and I can Schedule a downtime for a host using CGI cmd_type=55.
But when I am trying to delete the downtime for a host using following curl cmd it is not working:
Code: Select all
curl --silent --show-error --data cmd_typ=170 --data cmd_mod=2 --data host=myhostname --data btnSubmit=Commit --insecure http://localhost:80/nagios/cgi-bin/cmd.cgi -u "nagiosadmin:xxxxxxx"The cgi is returning an error "Sorry, but you are not authorized to commit the specified command."
am i missing any argument? The command DEL_DOWNTIME_BY_HOST_NAME works from shell script thought but i want to work it through CGI.
Is there also a way to find downtime_id of a host from CGI so then i can use cmd_type=78 which uses a downtime id?