Thursday, March 28, 2013

Monitoring of JBOSS using JAVAMELODY



Java Melody is a Application server Monitoring tool to measure and calculate statistics on real operation of an application depending on the usage of the application by users.It provide different monitoring aspects like no. of threads, requests, memory parameters and other.

* Java-melody works at application level rather server level.  

JBOSS 4.X- JAVAMELODY CONFIGURATION:-



         Add following two jars WEB-INF/lib folder of war file which you want to monitor:-



1.   javamelody.jar preferably use 1.17.x jar for jboss 4.x as higher version of jar give   compatibility issue and



2.     jrobin-x.jar




Or we can add following maven dependency :-

       
      <dependency>


         
                <groupId>net.bull.javamelody</groupId>

                <artifactId>javamelody-core</artifactId>

               <version>1.17.0</version>

      </dependency>






    Then add following filter mapping in corresponding web.xml :-

               

<filter>

               <filter-name>monitoring</filter-name>

               <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>

</filter>

<filter-mapping>

                  <filter-name>monitoring</filter-name>

                  <url-pattern>/*</url-pattern>

</filter-mapping>

<listener>

                   <listener-class>net.bull.javamelody.SessionListener</listener-class>

</listener>




   Then start the server.

      Type url in following format :-http://<host>/<context>/monitoring



We’ll get interface as follows:-


 



             Java-melody for generating report in pdf format :-


    • Only Need to add - “itext-2.1.7.jar” to the lib folder
    • Then we get a link of pdf at top of the page , on clicking on that we can download pdf report.

            Java-Melody provide information about:-

    •   All Threads in war, their information like priority, Current state, CPU time, user time.
    •   All jar which java melody is monitoring.
    •   Memory statistics.
    •   Warning and errors.
    •   Requests and time taken by that requests.
    •   Can choose a time duration to get report of monitoring.  
IQ Test
IQ Test

1 comment:

  1. Hi,

    I have added JavaMelody 1.49.0 to Jboss 5.1. When I open javamelody monitoring page, it displays following error in the log. Please help me to resolve this.

    org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection)

    Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

    Thanks,
    Nelka

    ReplyDelete