Open source Available tools which can be used for monitoring are Zabbix, Nagios and Zennos. In this blog, I have used Zabbix (Low cost effective solution) Open source distributed monitoring tool for Jboss and Linux System monitoring. Zabbix supports both polling and trapping techniques to collect data from monitored hosts. A flexible notification mechanism allows easy and quickly configure different types of notifications for pre-defined events.

Jboss Application server monitoring is logically divided into two sections:

Java, which include JBoss and JVM Monitoring.

Hardware & Operating System Monitoring.

Jboss and JVM monitoring

JMX stands for Java Management Extensions, and is a facility to allow for remote clients to connect to a JVM, and manage/monitor running applications in that JVM. This management is typically done through MBeans. MBeans are the heart of the JMX specification.

In Jboss, JMX is being configured by enabling the JVM setting in"$JBOSS_HOME/bin/run.conf"file with the below mentioned options (stated JMX on 9999 port):

In order to monitor the Jboss information, JMX defines a method for Java developers to integrate their applications with existing network management software by dynamically assigning Java objects with management attributes and operations.

In Jboss there are two ways that can grab the jmx attribute values.

Jboss Twiddle utility: A simple command line tool that allows for interaction with a remote JMX server instance. This tool is called twiddle (for twiddling bits via JMX) and is located in the bin directory of the Jboss distribution. The only issue with this tool is it provides very basic information which is not sufficient for monitoring all Jboss parameters.

I have used Skajla-JMX command line utility (Open Source JMX command line utility specially designed for monitoring Jboss application ) allows the administrator to instrument their Java application with a Zabbix agent. Below mentioned is the monitoring architecture.

To capture JVM parameter, first check all available message bean parameters which user can capture using this JMX command line utility, below mentioned is the command:

JMX Server IP : IP Address of the jmx server JMXPORT: Port on which JMX service is running JMX USER: Username required to connect to the JMX JMX PASSWORD: Password required to connect to the JMX MESSAGE BEAN: Target Bean for which attribute Value is required COMMAND: Operation to run or attribute to fetch, Attributes begin witha capital letter. ATTRIBUTE: Optional, require in the cases when command output into multiple values

Note: The advantage of using skajla-jmxclient is that it gives only the required value of queried MBean parameter, which eases to capture the information for monitoring.

You can easily get other parameter values which you want to monitor by just replacing values of ”java.lang:type=MemoryPool,name=PS Perm Gen with required parameters” in above mentioned userParameter configuration

Step-2: Restart the Zabbix agentd

Step-3: Configuration of Zabbix frontend

Step-A: Add monitoring items

Login the zabbix frontend

|_ Configuration

|_ Host

|_ Select monitored server

|_ Items->Create Item

To Configure the item, the key point which you have to take care is that,you must set the item key same as set in UserParameter in zabbix_agentd.conf and item type must be Zabbix agent

Sunday, May 16, 2010

skajla-JMXClient is a open source, command-line based JMX client, which provides a centralized console for managing application clusters and distributed-application environments. The skajla-JMXClient mission is to provide an open source management platform, which can be used to manage and monitor complete production environment using open source monitoring tools like Zabbix, Naggios.

skajla-JMXClient can be used to connect to the SUN JVM JDK 1.5.0 JMX Agent to set logging levels remotely and to get information on the running JVM. It is specially designed to return only the output value, which can be easily monitored using monitoring tools.

Requirement:
JDK1.6,If connecting to a SUN 1.5.0 JDK JMX Agent, remote side must be started with
system properties such as the following:
-Dcom.sun.management.jmxremote.port=
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false