Schedule service downtime with cmd.cgi from external host
Posted: Thu May 12, 2011 12:39 am
Hi,
I am trying to schedule service downtime from external using cmd.cgi but it kept complaint about "Start or end time not valid". I have been trying different format but no luck. What is a valid start_time and end_time format? ( my nagios.cfg has date_format as "us" )
here is the curl command I used but none of them work
curl -d "cmd_typ=56&cmd_mod=2&start_time=05ᆠ񮖫ಀᚨᚨ&stop_time=05ᆠ񮖫ಁᚨᚨ&host=myhost01&com_data=blahblah&service=check_total_procs&fixed=1&childoptions=0&btnSubmit=Commit" "http://localhost/nagios/cgi-bin/cmd.cgi"
curl -d "cmd_typ=56&cmd_mod=2&start_time=05-12-2011 00:00:00&stop_time=05-12-2011 02:00:00&host=myhost01&com_data=blahblah&service=check_total_procs&fixed=1&childoptions=0&btnSubmit=Commit" "http://localhost/nagios/cgi-bin/cmd.cgi"
curl -d "cmd_typ=56&cmd_mod=2&start_time=2011-05-12 00:00:00&stop_time=2011-05-12 02:00:00&host=myhost01&com_data=blahblah&service=check_total_procs&fixed=1&childoptions=0&btnSubmit=Commit" "http://localhost/nagios/cgi-bin/cmd.cgi"
I am trying to schedule service downtime from external using cmd.cgi but it kept complaint about "Start or end time not valid". I have been trying different format but no luck. What is a valid start_time and end_time format? ( my nagios.cfg has date_format as "us" )
here is the curl command I used but none of them work
curl -d "cmd_typ=56&cmd_mod=2&start_time=05ᆠ񮖫ಀᚨᚨ&stop_time=05ᆠ񮖫ಁᚨᚨ&host=myhost01&com_data=blahblah&service=check_total_procs&fixed=1&childoptions=0&btnSubmit=Commit" "http://localhost/nagios/cgi-bin/cmd.cgi"
curl -d "cmd_typ=56&cmd_mod=2&start_time=05-12-2011 00:00:00&stop_time=05-12-2011 02:00:00&host=myhost01&com_data=blahblah&service=check_total_procs&fixed=1&childoptions=0&btnSubmit=Commit" "http://localhost/nagios/cgi-bin/cmd.cgi"
curl -d "cmd_typ=56&cmd_mod=2&start_time=2011-05-12 00:00:00&stop_time=2011-05-12 02:00:00&host=myhost01&com_data=blahblah&service=check_total_procs&fixed=1&childoptions=0&btnSubmit=Commit" "http://localhost/nagios/cgi-bin/cmd.cgi"