On Fri, May 10, 2013 at 12:06 PM, sven falempin <[email protected]>wrote:
> Through web interface it is possible to stop,
> force a test for monit, start/stop/enable or disable monitoring for a
> service.
>
> Is it possible to reload configuration through the http socket ???
>
>
> --
>
> ---------------------------------------------------------------------------------------------------------------------
> () ascii ribbon campaign - against html e-mail
> /\
>
diff -u -r ./monit-5.5/src/http/cervlet.c
./monit-5.5-patch/src/http/cervlet.c
--- ./monit-5.5/src/http/cervlet.c Thu May 10 22:52:38 2012
+++ ./monit-5.5-patch/src/http/cervlet.c Fri May 10 17:46:19 2013
@@ -530,6 +530,9 @@
"<td style='color:red;'><form method=POST
action='_runtime'>Stop Monit http server? "
"<input type=hidden name='action'
value='stop'><input type=submit value='Go'></form></td>");
StringBuffer_append(res->outputbuffer,
+ "<td><form method=POST action='_runtime'>Reload
Monit configuration <input type=hidden name='action' value='reload'>"
+ "<input type=submit
value='reload'></form></td>");
+ StringBuffer_append(res->outputbuffer,
"<td><form method=POST action='_runtime'>Force
validate now? <input type=hidden name='action' value='validate'>"
"<input type=submit value='Go'></form></td>");
@@ -713,6 +716,10 @@
send_error(res, SC_SERVICE_UNAVAILABLE,
"The Monit http server is stopped");
stop_httpd();
+ return;
+ } else if (IS(action, "reload")) {
+ LogInfo("The Monit http server stopped on user
request\n");
+ kill_daemon(SIGHUP);
return;
}
}
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general