public class Mon
extends javax.servlet.http.HttpServlet
Servlet that enables the ability to take advantage of jamon by passing arbitrary strings to this servlet which subsequently calls start/stop/add on the MonitorFactory. The distribution comes with some bash scripts which should work on mac/linux/unix that allow you to take advantage of jamon facilities from your scripts. This can be used to track nightly running processes such as backups to name just one. The scripts simply take arguments and reformat them to calls to this servlet via either curl or wget whichever is installed. See them as well as jamon_readme.txt in the distribution zip in the directory osmon for more info.
Note if the calls was unsuccessful (to add/start/stop/get) then the error message is returned which starts with the keyword: Error. OK will be returned by add/start/stop if they are successful, but not get. get simply returns the value or error if there was a problem. script calls to jgetdata.sh don't call this servlet and so they don't return error if they fail, however you can check to see if they contain data.
Happy monitoring!
put this in web.xml fileConstructor and Description |
---|
Mon() |
Modifier and Type | Method and Description |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException