Monitoring Webapps .. part 2

In my previous blog, I discussed how to monitor web applications in GlassFish. I discussed the use of asadmin CLI, but had forgotten to mention the new VisualVM GlassFish plugin that can be used for this purpose. Masoud Kalali has a a good article, Monitoring GlassFish Application Server's HTTP Service Using VisualVM, on how to use the GlassFish ViusalVM plugin. The plugin is easy to use and provides good time based charts (the response time graph for a Servlet is pretty cool).

One of my customers recently asked how they could monitor the throughput of their web container in real time. They wanted real time graphs for their production environment that displayed how many requests were processed per second in addition to the overall average response time (for all the requests including static pages, Servlets and JSPs). VisualVM can be used to get the response time data for the various Servlets individually. However, it falls short in getting the throughput information (even though it provides the number of requests processed which increases monotonically).

I have been using my own AMX client for tracking web container performance in real time (the screen shot is shown below). It is an effective monitoring tool even though the graphics and a few other items can definitely be improved. It serves my purpose, may be it will work for for you as well.

The type field is used to select either the http-listener or an application. The filter field is required to identify the component of interest (type in the listener or Servlet name). Set type = HTTPlistener and filter = http-listener-1 if you want to monitor all requests on the default listener.

In case you want to try it out, you can get the binaries here. The GlassFish related jar files are not included in the bundle to reduce the size. To use it, follow these steps.

  1. Download the bundle to a local directory.
  2. Unzip the downloaded bundle (should have the following files/dirs: MonitoringAMXClient.jar, run.sh, and lib/\*).
  3. Set the environment variable GLASSFISH_HOME to the root directory of the installation. The lib directory should be under the GLASSFISH_HOME location.
  4. Execute run.sh. 

If you want to run in the graphical mode, execute run.sh without any arguments.

There is also a command line mode (it can get pretty ugly if you decide to set all the arguments :-)). To find out the usage execute run.sh --usage.

If the visualvm plug-in suits your needs, I would encourage you to stick to it. However, if you think my tool would help, feel free to use it. I can provide the source code in case anyone is interested.
Comments:

Post a Comment:
Comments are closed for this entry.
About

binu

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today