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"
Schedule service downtime with cmd.cgi from external host
-
- Posts: 2
- Joined: Thu May 12, 2011 12:24 am
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Schedule service downtime with cmd.cgi from external hos
I believe you want seconds from the Unix epoch, as you get in the output of `date +%s`.
-
- Posts: 2
- Joined: Thu May 12, 2011 12:24 am
Re: Schedule service downtime with cmd.cgi from external hos
I tried that too but same result.
curl -d "cmd_typ=56&cmd_mod=2&host=myhost01&service=check_total_procs&com_data=blahblah&trigger=0&start_time=1305417600&stop_time=1305424800&fixed=1&btnSubmit=Commit" "http://localhost/nagios/cgi-bin/cmd.cgi"
curl -d "cmd_typ=56&cmd_mod=2&host=myhost01&service=check_total_procs&com_data=blahblah&trigger=0&start_time=1305417600&stop_time=1305424800&fixed=1&btnSubmit=Commit" "http://localhost/nagios/cgi-bin/cmd.cgi"