GlassFish version 2 monitoring capabilities

GlassFish version 2 monitoring capabilities

GlassFish version 2 provides good mentoring information about different aspects of application server and all of your applications that are deployed into GlassFish but before it can show those statistical information you need to configure its monitoring service. Figure 1.

Although this statistical and monitoring information and the way that they are presented is not as luxurious as weblog and websphere one’s but they are good enought to help you track what is going in your server.

To enable monitoring service of GlassFish you need Commence with openning administration console, Locate the configuration node and expand it now select monitoring now choose all components that you want to monitor, select high for more details and sure more overhead and low for less details and less overhead. Figure 1.

Configure your monitoring

Now you should be able to see some monitoring detailsby going to monitoring pages, monitorig pages are placed under different nodes in administration console based on your installation profile. If you are not sure about your glassfish profile, follow the developer profile item.

  • For the cluster or enterprise profile In the tree component, select Common Tasks, then click View Monitoring Data.
  • For the developer profile, in the tree component, select the Application Server node. Click the Monitor tab.

Glassfish categorize monitoring information under three categories, these categories are as follow:

Call Flow:shows you how many requests are replyed successfully or with a failure and how much time consumed for that request in different layer of application server. Figure 2

Call Flow

Runtime:this category provides information about JVM, Garbage Collection, HTTP service, Listeners (http/s), ect. for example under JMV node of these category you can use memory item to view fine grained details about your application server heap. Figure 3

Runtime

Applications:Let you select an application and view details about that application components, for example you can view how much time a servlet has called and how time its call taked. Figure 4

Applications

Resources:here you can view detailed information about all of your resources like connection pools, connectors, jms connection factories, etc. For example you can view fair amount of details about your connection pool in order to hunt possible connection leake or to tune your connection pool. Figure 5

Resources

Transactions:These allows you to view what is state of transactions that are running inside your application server.

It is my first blow entry written from my Ubuntu 7.04 installation and I am happy with my switch from OpenSuse to Feisty Fawn 🙂

How to install and use OpenSSO CLI (Command Line Administration Interface)

OpenSSO  which is open source branch of Sun Java Access Manager has several module which you should install and configure in case that you want to have similar bundle from its open source branch.

One of main components is OpenSSO itself which you can obtain from  Its nightly builds page; just make sure to select latest link which will take you to the download page with links to OpenSSO modules.
OpenSSO file name should be OpenSSO.war; this file is server side application that handle all authentication and authorization related activities. in the download page you can see several other modules, for this blog entry I will give you some details about installing OpenSSO and Administration Command Line Tools. ((It should be last row link in component download page).

To install OpenSSO, you can follow a detailed installation instruction in OpenSSO easy installation just make sure that you remember value that you determined for  Configuration directory because we will use it to install CLI (Command Line administration Interface).

Now that you have installed OpenSSO you can install its CLI package. Download amAdminTools.zip and extract it somewhere in your hard dist. after you have extracted it follow this sequence to complete its installation open a terminal (cmd)  and navigate to directory that you extract the amAdminTools.zip; execute: setup -p  <OPENSSO_CONFIGURATION_DIRECTORY>

It should echo some text indicating that installation is successful. If you want to know more, Installation is nothing more than creation of batch files that I will talk about one of  them in next step. this batch files use some files that are located in opensso configuration directory to perform their operations.

the file that I will talk about is named amadm.bat or amadm.sh this file let you manage your OpenSSO installation from a command line interface even if opensso server is running. all sub commands of this command has a set of 2 common parameter

  1. -u amAdmin : this is default administration username. you can create more users with administration privileges.
  2. -w <password> it is your password which you determined during opensso installation.

Now lets try some commands

 amadm.bat create-realm -e /realm12 -u amAdmin -w adminadmin 

This command will create a new realm and put its parent is root realm.

 amadm.bat list-realms -e / -u amAdmin -w adminadmin 

This command list all realms that are created under parentship of root realm.

 amadm.bat list-identities -e / -x "*" -t User -u amAdmin -w adminadmin 

This command list all identities of type User which are exists in root realm. you can find a list of all sub commands by calling

 amadm.bat 

By default root realm is named openSSO and your created realm will be a child of that realm, Now you can open openSSO web based administraton console and check the result of CLI with it