Application Diagnostics Agent for Java, for monitoring Applications based on Oracle Glassfish server.

Version 1
    Share This:

    Hello all,

     

    I had an opportunity to deploy AD java agent for Monitoring Oracle Glassfish instances, but I observed BMC docs has configuration list for the following servers.

     

    1. Oracle Weblogic.
    2. Apache Tomcat.
    3. IBM WebSphere Application Server.
    4. Jboss.

     

    But there are many other application servers in the market and has different configuration methods. One of which is Oracle Glassfish.

     

    The Environment I worked on had 3 Servers based on Microsoft Windows 2008 R2.

     

    1. First, the main server (or a load balancer server) where the Glassfish UI was accessible through web browser using https://localhost:4848 (name for example: Server 1)
    2. The second Server is where the Glassfish instance was deployed (Server 2)
    3. The Third, is the HA of the second server (Server 3)

     

    Directing right on how you install and configure AD agent for java on a Glassfish server.

     

    Step 1) Installation: Install the ad app visibility agent for java using the interactive or silent installation procedure whichever is suitable as per the customer requirement on the servers where the actual application instances are deployed and running, in my case it was the server 2 and Server 3. The (Server 1) is the only load balancer and nothing was going to be discovered there, hence we didn’t installed any agents there))

     

    Step 2) Configuration Part 1: adding -javaagent jvm option: Login to Oracle Glassfish Web UI (https://localhost:4848

    Capture 1.PNG

     

    • Navigate to Configuration on the left side menu (aka TREE) and then Cluster Config or Server Configuration (depending on which manner the servers are planned or deployed), in my case the server was in a cluster.

    Capture 2.PNG

     

    • Click on JVM Settings

    Capture3.PNG

     

    • Further click on JVM option TAB

    Capture4.PNG

     

    • Click on Add JVM option button and then add the jvm option. -javaagent:<Installation directory>/ADOPsInstall/adops-agent.jar. Then click on save. (DO NOTE: the slashes (/,\) for oracle Glassfish is unix style i:e '/')

     

    Step 3) Restarting the Server instance (part 1): The applications deployed on Glassfish runs as a command prompt and not as a Windows Service. Hence in order to bring down the running application instance the command used was asadmin server -stop (command or sequence of commands may differ, I don't have an idea of steps on how to start or stop the instance) and similar is the command that is used to start the instance.

     

    Step 4) Restarting the Server Instance (part 2): On restarting the Instance, the application instance now tries to find the adops-agent.jar which was passed as a jvm option in the Glassfish Web UI. in the above step (Do Note: if there is any glitch in the -javaagent parameter, like incorrect Drive or missing or incorrect slashes (/,\) the application server won't start up and will throw an error of missing java manifest adops-agent.jar)

     

    Step 5) Restarting the Server Instance (part 3): On successful restart of the application instance, you will now be able to find an agent that is visible in your Presentation server (Administration>App Visibility Agents) or you can also check the Agents inside APM support console with the server name which you have passed on while installation of that agent. And later you will also get to see the applications that were discovered one by one in Presentation Server monitoring > applications

     

    Screenshot showing agents visible in TrueSight Presentation Server

     

    Screenshot showing agents visible in BMC-APM console (APM Support Console)