Translations of this page:

Osmius

Osmius agent for JBOSS
Agent name: osm_ag_JBOSS001 Agent code: JBOSS001
Subject: JBOSS Osmius agent User manual
Date: 26/03/2010 Revision date:

General Information

This agent can monitor several parameters of JBOSS Applications server. It has been tested hardly with a lot of JBOSS Application servers. However, we recommend checking its functionality before implanting it in a production environment.

JBOSS agent has been developed using functionalities and enhancements of Osmius framework and ACE libraries, so it is necessary to install the ACE libraries for the proper deployment and operation of JBOSS agent. See chapter: installation.

JBOSS001 provides up to 24 basic events with configuration parameters to allow scaling of a very simple way.

All events are remote, so not intrusive. Monitoring is done through the network connection, by this reason you have to provide some connection information, see connection info for this agent. Events are based on JMX queries, so you need jre at least installed where agent will run.

Also, this Agent can use two interfaces: SNMP Interface: monitoring through an OID of a MIB and Process Interface : monitoring through a script. See here user defined events.

JBOSS Instance

As a general rule each Osmius agent can monitor one instance type. If you are not familiar with these concepts check out the glossary. Each instance is individually defined in the configuration file (if you want further information go to agents and instances); depending on agent type is the instance type and depending on instance is the connection info.

CONNECTION_INFO

The connection information or connection_info is data that the agent needs to know to connect to the instance. (See more about the connection_info)

For JBOSS agent the connection_info prototype would be:

CONNECTION_INFO= -i JBOSS_IP -p JMX_PORT [-j JMX_TECH]

Replace the following:

  • JBOSS_IP: JBOSS server IP address. Mandatory.
  • JMX_PORT: open port to perform JMX queries. Mandatory.
  • JMX_TECH: JMX querying technology. You can choose between “jmxconnector” and “jmxrmi” (jmxrmi by default). Optional.

Examples:

CONNECTION_INFO = -i 127.0.0.1 -p 1099
CONNECTION_INFO = -i 192.168.3.241 -p 1099 -j jmxconnector
CONNECTION_INFO = -i myjboss.mydomain.com -p 9965 -j jmxrmi

TYPE

The type defines the instance type to be monitored. Every declared instance must be associated with a type as you can see here

For JBOSS:

TYPE= JBOSS001

Event summary table for JBOSS

Here is briefly the capabilities of this agent, further down on this page each event is described in more detail.

EVENT DESCRIPTION c w a tseconds Extra parameters / Remarks
JBINFSRV JBOSS availability through JMX and Server information 0 1 1 600 None
JBINFJVM Operating System information 0 1 1 86400 None
JBUPTIME Uptime in seconds 1 900 300 600 Ninguna
JBPRCMEM Free Memory porcentage from the maximum memory 1 25 10 1800 Silent mode ( -s) recommmended
JBPROCRS CPUs detected by JVM 1 2 1 172800 Silent mode ( -s) recommmended
JBLIVTHR Threads counter 0 100 200 600 Silent mode ( -s) recommmended
JBPENOBJ Pending objects counter 0 2 5 600 Modo silencioso ( -s) recomendado
JBTIMCPU Spent time in seconds executing Java 0 600 3600 86400 Silent mode ( -s) recommmended
JBAPPRUN Checks the running state of a list of webapps 0 1 1 300 -L “webapp1[,webapp2,webappN]”
Silent mode ( -s) recommmended
JBUSRQ00 a JBUSRQ14 JMX Query user defined 0 1 1 600 ”-d domain -n name -b attributes”
The list of attributes can only be of type int, long, or String. The value returned by the query is the number of MBeans found for the query, or the first attribute value if it finds a single MBean or 0 if none are found.

JBOSS agent events

JBINFSRV

JBINFSRVL event checks JMX connection to JBOSS server.
The meaning of this event is the availabilty of JBOSS server from the user side.

Return values:

VALUE MEANING
-1 Error
0 No connection
1 Connection OK

Recommended parameters:

Comparison type Inverse. The lower value the higher severity (-c 1)
Monitoring interval 1 second – 1 hour –> depends on instance importance
Warning threshold 0
Alert threshold 0

Parameter setting example:

JBINFSRV = -t 600 -c 0 -w 1 -a 1 -T "Availabilty JBOSS server1"

Remarks: The event text will show connection JBOSS server information.

JBINFJVM

JBINFJVM event returns operating system information of the JBOSS server.

Return values:

VALUE MEANING
-1 Error
0 No connection
1 Connection OK

Recommended parameters:

Comparison type Inverse. The lower value the higher severity (-c 1)
Monitoring interval 1 second – 1 hour –> depends on instance importance
Warning threshold 0
Alert threshold 0

Parameter setting example:

JBINFJVM = -t 86400 -c 0 -w 1 -a 1 -T "Operating System information"

Remarks:

JBUPTIME

JBUPTIME event returns the time in seconds since last (re)boot.

Return values:

VALUE MEANING
-1 Error
N Uptime in seconds

Recommended parameters:

Comparison type Inverse. The lower value the higher severity (-c 1)
Monitoring interval 1 second – 1 hour –> depends on instance importance
Warning threshold 900
Alert threshold 300

Parameter setting example:

JBUPTIME = -t 600 -c 1 -w 900 -a 300 -T "Uptime JBOSS server1"

Remarks: The event text will show uptime in human readable format: Days [X] Hours[Y] Mins[Z] [IP:PORT]

JBPRCMEM

JBPRCMEM returns JBOSS server memory usage percentage.

Return values:

VALUE MEANING
-1 Error
0 - 100 % Free memory

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 1 second – 1 hour –> depends on instance importance
Warning threshold 25 - Consult on administrator
Alert threshold 10 - Consult on administrator

Parameter setting example:

JBPRCMEM = -t 600 -c 0 -w 25 -a 10 -T "Free memory percentage"

Remarks: None

JBPROCRS

JBPROCRS returns number of processors detected by Java Virtual Machine.

Return values:

VALUE MEANING
-1 Error
N # CPU

Recommended parameters:

Comparison type Inverse. The lower value the higher severity (-c 1)
Monitoring interval 1 day – 1 week –> depends on instance importance
Warning threshold X - Consult on administrator
Alert threshold Y - Consult on administrator

Parameter setting example:

JBPROCRS = -t 172800 -c 1 -w 2 -a 1 -T "Number of processors detected"

Remarks: None

JBLIVTHR

JBLIVTHR returns number of live threads in JBOSS server.

Return values:

VALUE MEANING
-1 Error
N Live threads

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 1 second – 1 hour –> depends on instance importance
Warning threshold X - Consult on administrator
Alert threshold Y - Consult on administrator

Parameter setting example:

JBLIVTHR = -t 600 -c 0 -w 100 -a 200 -T "Live Threads"

Remarks: None

JBPENOBJ

JBPENOBJ event returns number of pending objects in JBOSS server.

Return values:

VALUE MEANING
-1 Error
N Number of pending objects

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 1 second – 1 hour –> depends on instance importance
Warning threshold X - Consult on administrator
Alert threshold Y - Consult on administrator

Parameter setting example:

JBPENOBJ = -t 600 -c 0 -w 2 -a 5 -T "Pending Objects"

Remarks: None

JBTIMCPU

JBTIMCPU event returns seconds spent in java execution.

Return values:

VALUE MEANING
-1 Error
N java execution seconds

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 1 second – 1 week –> depends on instance importance
Warning threshold X - Consult on administrator
Alert threshold Y - Consult on administrator

Parameter setting example:

JBTIMCPU = -t 86400 -c 0 -w 600 -a 3600 -T "seconds of CPU"

Remarks:

JBAPPRUN

JBAPPRUN checks the running state of an application list.

Extra parameters:
This event need an extra parameter to work:

PARAMETER MEANING Mandatory
-L -L “webapp1[,webapp2,webappN]” - Web applications list to monitor. (Don't use blanks between ,) Yes.

Return values:

VALUE MEANING
-1 Error
0 All webapps are running
1 At least one webapp is stopped

Recommended parameters:

Comparison type Direct. The higher value the higher severity (-c 0)
Monitoring interval 1 second – 1 hour –> depends on instance importance
Warning threshold 1
Alert threshold 1

Parameter setting example:

JBAPPRUN = -t 300 -c 0 -w 1 -a 1 -L "jmx-console,osmius" -T "checking running status"

Remarks: The event text will show the name of first found stopped webapp.

JBOSS prerequisites

In order to compile, this agent requires a set of prerequisites, which are generic to compile any Osmius agent, you can see these prerequisites.

JBOSS Osmius agent can monitor a remote JMX able JBOSS server without authentication.

You have to install JDK and groovyc if you want to compile OsmiusJMXConnector.groovy and get several *.class, OsmiusJMXConnector class will be called by JBOSS Osmius agent to get server data, for that you have to create an *.jar. Steps:

1) groovyc OsmiusJMXConnector.groovy

2) Create Manifiest.txt with:

Main-Class: OsmiusJMXConnector Class-Path: ../lib/groovy-1.5.2.jar ../lib/asm2.jar

3) jar cvfm OsmiusJMXConnector.jar Maniefiest.txt *.class

4) Copy OsmiusJMXConnector.jar in $OSM_ROOT/lib

5) Copy asm2.jar and groovy-1.5.2.jar (groovy jars) in $OSM_ROOT/lib

JBOSS agent makefiles and compilation

  • Make Project Creator (MPC) is used by Osmius, so creating Makefiles is a trivial task. If you want to learn more about MPC and Osmius check out the section of Makefiles on Osmius.
  • For JBOSS Osmius agent you can generate Makefile in this way:

From the agent directory using console or terminal.

Linux:

$ACE_ROOT/bin/mpc.pl -type make osm_ag_jboss.mpc

HP-UX / Solaris:

$ACE_ROOT/bin/mpc.pl -type gnuace osm_ag_jboss.mpc

Windows and Visual C 8:

%ACE_ROOT%\bin\mpc.pl -type vc8 osm_ag_jboss.mpc
  • Now that you have created the Makefile, agent compiling is extremely simple.

Linux:

make -f Makefile.Osm_Ag_Jboss_Osmius

HP-UX:

gmake -f Makefile.Osm_Ag_Jboss_Osmius

Windows:

Open Osm_Ag_Jboss_Osmius.vcproj with Visual Studio.
Select Release in solution configuration
Press Rebuild to compile.

Binaries are automatically installed in the bin directory of OSM_ROOT base directory.

Running JBOSS agent

JBOSS Osmius agent have the same running features of the other Osmius agents. You can check it out int he section Start and Stop Agents.

To execute JBOSS Osmius agent without Osmius web console:

osm_ag_JBOSS001[.exe]1) -c osm_ag_JBOSS001.ini -m MASTERAG -p 1950 -d [>> osm_ag_jboss001.log]2)

Running in standalone mode

JBOSS Osmius agent, like the others Osmius agents, allows the execution in standalone mode. This option may be particularly useful when developing a new agent or to perform specific agent tests.

Basically you have to add a new value, called SNDCMD, to JBOSS Osmius agent configuration file (osm_ag_JBOSS001.ini) as shown here.

Then run JBOSS Osmius agent setting Master Agent communications port to zero, for example:

osm_ag_JBOSS001[.exe] -c osm_ag_JBOSS001.ini -m 00000000 -p 0 -d

Tests list

Test performed to JBOSS Osmius agent.

Date: 29/03/2010
Test Result Remarks
Creating an instance with all its events in silent mode OK N/A
Creating an instance with all its events with custom text OK N/A
Creating an instance with all its events but no custom text OK N/A
Declaration of 3 instances with all its events to 5 seconds and keep it
running for 48 hours
OK, minimum time for this instance is 5 seconds No memory leaks
Declare 2 instances, cause a disconnect and then reconnectOK Correct reconnection
Declare 1 instance and test each event OK N/A
Elimination of general parameter and check unbootable OK N/A
Elimination of instance CONN_INFO and check unbootable OK N/A
1) On Windows platforms add .exe extensions
2) Optional, to store agent messages in a file
 
en/agentes/jboss001.txt · Last modified: 2012/12/12 09:34 by osmius
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki