Java Application Server management with System Center Operations Manager has been available since 2010, and with the latest Management Pack update http://www.microsoft.com/en-us/download/details.aspx?id=44576 JBoss Application Server 7 support is finally available.
JBoss Application Server 7 can be booted in two distinct operating modes: standalone and domain mode. Standalone mode is the most familiar to past JBoss Application Server users, and consists of an independent process. The second operating mode is the newly introduced domain mode. Domain mode allows multiple JBoss Application Server instances to be managed from a single domain controller spanning the same or different servers. For more information on operating modes refer to the following JBoss documentation https://docs.jboss.org/author/display/AS7/Operating+modes
The latest Java EE Management Pack update allows for both of these operating modes to be monitored on Linux* and Windows.
*Linux platforms are limited to those that are supported by System Center Operations Manager. Refer to the JBoss Management Pack guide for a complete list of platform and version support.
This blog series details managing a JBoss AS 7 application server running in first standalone mode and then domain modes on a CentOS Linux machine. This first blog post goes through a guided setup of a JBoss AS 7 running in standalone mode.
My environment consists of a clean CentOS 7 64-bit Linux machine without JBoss Application Server 7 installed. My CentOS 7 64-bit machine is already managed by Operations Manager 2012 R2 with Update Rollup 4 installed. For more details on managing a Linux machine with System Center Operations Manager please refer to the following http://blogs.technet.com/b/kevinholman/archive/2012/03/18/deploying-unix-linux-agents-using-ops...
In addition we also need the UNIX/Linux UR4 Management Packs http://www.microsoft.com/en-us/download/details.aspx?id=29696 and the new Management Packs for Java EE - linked above
Go online and download the MSI and the Management Pack Guide
Once the download is complete run the MSI and then navigate to the installation directory. The files are installed in “C:\Program Files (x86)\System Center Management Packs\System Center 2012 R2 Management Packs for Java EE” by default.
After verifying that the management packs are present, begin importing the following management packs to manage JBoss Application Server
Once imported switch to the Linux machine to set up JBoss Application Server.
mkdir /jboss |
cd /jboss |
wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.0.Final/jboss-as-7.1.0.Final.zip |
unzip jboss-as-7.1.0.Final.zip |
cd /jboss/jboss-as-7.1.0.Final/bin |
One of the selling points of JBoss AS 7 is quick setup and launch, and with these steps completed we can go ahead and kick the server off. Within the bin directory issue the following command.
./standalone.sh -b <ip-address> |
The basic JBoss Application Server monitoring is useful if you only want to monitor the availability of the server; Operations Manager allows for much more meaningful metrics through a setting known as “deep monitoring”. Deep monitoring, at its core, consists of a monitored Java Application Server running a lightweight Microsoft developed Java component known as BeanSpy.
BeanSpy is a Java application that utilizes Java Management Extensions (JMX) to gather useful statistics from Managed Beans (MBeans). MBeans are object representations of resources running inside the Java virtual machine and can contain valuable data attributes and operations. BeanSpy can retrieve data from attributes, and invoke operations based on server permissions granted to the application.
BeanSpy is included the Management Packs for Java EE through a management pack task, or can be locally built from source located here https://github.com/MSFTOSSMgmt/BeanSpy . Once deep monitoring is enabled Operations Manager communicates directly with the BeanSpy running on the application server over HTTP/HTTPS.
A JBoss management user has full access to the JBoss web management console, and can perform all the required configuration operations for deploying BeanSpy. The management user is only needed if using the JBoss web management console for configuration. This blog details configuring the JBoss application server with the included JBoss command line utility. Important Note : this is not the same user we monitor our MBeans with.
./add-user.sh |
In order to monitor the application server's jvm metrics we need to add a monitoring user who has monitoring and invoke privileges with BeanSpy.
cd /jboss/jboss-as-7.1.0.Final/standalone/configuration |
After adding the OpsMgr monitoring user proceed to configuring the security domain. this configuration can be done through the JBoss web management console, http://localhost:9990 by default , or by a JBoss command line program (jboss-cli.sh) installed with the server. This walkthrough uses jboss-cli to set up the needed security domains.
./jboss-cli.sh -c |
[standalone@localhost:9999 /] /subsystem=security/security-domain=opsmgr:add(cache-type=default) |
[standalone@localhost:9999 /] ./subsystem=security/security-domain=opsmgr/authentication=classic:add(login-modules=[{"code"=>"org.jboss.security.auth.spi.UsersRolesLoginModule","flag"=>"required","module-options"=>[("usersProperties"=>" file:${jboss.server.config.dir}/opsmgr-users.properties "),("rolesProperties"=>" file:${jboss.server.config.dir}/opsmgr-roles.properties ")]}]) |
Now that the server is correctly configured, deploy BeanSpy and enable deep monitoring on the server.
BeanSpy can be retrieved through a management pack task, or by building from source located here https://github.com/MSFTOSSMgmt/BeanSpy . This blog uses the management pack task to retrieve the file.
/jboss/jboss-as-7.1.0.Final/bin/jboss-cli.sh -c |
[standalone@localhost:9999 /] deploy ~/BeanSpy.war |
Join me in part two where will manage a JBoss Application Server instances running in domain mode across multiple machines. Coming Soon ....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.