All Apps and Add-ons

Monitoring Glassfish/JVM using "Monitoring of Java Virtual Machines with JMX" - fails to fetch database connection pool sttributes

torustad
Path Finder

Hi all,

I have started to test the "Monitoring of Java Virtual Machines with JMX"-application to monitor a Glassfish-instance.
It seems to work fine; i get data from the java.lang-mbeans, but from the amx-mebean domain for JDBC connection pools I get nothing.

This is perhaps not the correct place to ask this question; but I am only curious as to whether anyone of you has experienced the same?

I am trying to retrieve attributes from this mbean:

MBean Information Item Value
    MBean Name  amx:type=jdbc-connection-pool-app-mon,pp=/mon/server-mon[server],name=resources/JobRepositoryConnectionPool/eAdmin-16.3.0.2
    Properties in creation order    pp=/mon/server-mon[server],type=jdbc-connection-pool-app-mon,name=resources/JobRepositoryConnectionPool/eAdmin-16.3.0.2
       MBean domain amx
       type jdbc-connection-pool-app-mon
       pp   /mon/server-mon[server]
       name resources/JobRepositoryConnectionPool/eAdmin-16.3.0.2
    MBean Java Class    jdbc-connection-pool-app-mon
    MBean Description   JDBC Connection pool Application based Statistics

with this template:

    <mbean domain="amx" properties="pp=/mon/server-mon[server],type=jdbc-connection-pool-mon,name=resources/JobRepositoryConnectionPool">
        <attribute name="Name" outputname="navn"/>
        <attribute name="numconncreated" outputname="AntBrukt"/>
    </mbean>

from which I get no events.

From this template, however, I get what I want:

    <mbean domain="java.lang" properties="type=Compilation">

    <!-- simple attributes -->
    <attribute name="TotalCompilationTime" outputname="TotalCompilationTime"/>

    </mbean>

    <mbean domain="java.lang" properties="type=ClassLoading">

    <!-- simple attributes -->
    <attribute name="TotalLoadedClassCount" outputname="total"/>
    <attribute name="LoadedClassCount" outputname="current"/>
    <attribute name="UnloadedClassCount" outputname="unloaded"/>

    </mbean>
    ...

Have any of you seen this before?

We are on GlassFish Server Open Source Edition 4.1 (build 13) and
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Maybe this is the reason: https://java.net/jira/browse/GLASSFISH-21272

And, by theway, I can read connection pool attributes by means of the REST-API.

I am very grateful for any help.

Kind regards,
Bård Tørustad

0 Karma

Damien_Dallimor
Ultra Champion

At a quick glance I can see you have not copied the properties correctly into your config file.

From the MBean info:

type=jdbc-connection-pool-app-mon,pp=/mon/server-mon[server],name=resources/JobRepositoryConnectionPool/eAdmin-16.3.0.2

You entered :

type=jdbc-connection-pool-mon,pp=/mon/server-mon[server],name=resources/JobRepositoryConnectionPool
0 Karma

torustad
Path Finder

Hi all,

Thank you for the promtp response Damien.

I have now managed to retrieve some attributes form a connection pool, but when I try to retrieve an attribute tagged with "[N/A]" (not available) in the mbean-browser as described below no events are indexed (ie not found by search).

So the question is whether any of you have experienced anything like that?

The following XML-element yields a result.

<mbean domain="amx" properties="type=jdbc-connection-pool-mon,pp=/mon/server-mon[server],name=resources/JobRepositoryConnectionPool">
    <attribute name="Name" outputname="namn5"/>
    <attribute name="averageconnwaittime" outputname="gjennomsnitt5"/>
    <attribute name="numconnnotsuccessfullymatched" outputname="matchet5"/>
    <attribute name="waitqueuelength" outputname="koelengde5"/>
</mbean>

returns this:

{"namn5":"resources/JobRepositoryConnectionPool","gjennomsnitt5":{"count":68,"description":"Average wait-time-duration per successful connection request","lastSampleTime":1455744439833,"name":"AverageConnWaitTime","startTime":1455729117451,"unit":"millisecond"},"matchet5":{"count":0,"description":"Number of connections rejected during matching","lastSampleTime":-1,"name":"NumConnNotSuccessfullyMatched","startTime":1455729117451,"unit":"count"},"koelengde5":{"count":0,"description":"Number of connection requests in the queue waiting to be serviced.","lastSampleTime":-1,"name":"WaitQueueLength","startTime":1455729117451,"unit":"count"},"jvmDescription":"ATM eAdmin Glassfish","mbean_domain":"amx","mbean_property_name":"resources/JobRepositoryConnectionPool","mbean_property_pp":"/mon/server-mon[server]","mbean_property_type":"jdbc-connection-pool-mon"}

However, if I try with the following element with the additional

<attribute name="numconnacquired" outputname="numconnacquired6"/>

nothing is returned by a search.

<mbean domain="amx" properties="type=jdbc-connection-pool-mon,pp=/mon/server-mon[server],name=resources/JobRepositoryConnectionPool">
    <attribute name="Name" outputname="namn6"/>
    <attribute name="averageconnwaittime" outputname="averageconnwaittime6"/>
    <attribute name="numconnnotsuccessfullymatched" outputname="numconnnotsuccessfullymatched6"/>
    <attribute name="waitqueuelength" outputname="waitqueuelength6"/>
    <attribute name="numconnacquired" outputname="numconnacquired6"/>
</mbean>

When I copy from the mbean-browser i Java Mission Control, the element is tagged with "[N/A]":

Name Value Type Display Name Update Interval Description
numconnacquired [N/A] CompositeData numconnacquired -1 No description available for getNumConnAcquired

I have also tried the following XML to retrieve all data from the "java.lang"-domain:

but only he following is returned:

event1:

{"Valid":true,"Name":"Metaspace Manager","MemoryPoolNames":["Metaspace","Compressed Class Space"],"ObjectName":"java.lang:type=MemoryManager,name=Metaspace Manager","jvmDescription":"ATM eAdmin Glassfish","mbean_domain":"java.lang","mbean_property_name":"Metaspace Manager","mbean_property_type":"MemoryManager"}

event2:

{"CommittedVirtualMemorySize":2661863424,"FreePhysicalMemorySize":4962947072,"FreeSwapSpaceSize":5793099776,"ProcessCpuLoad":0.0,"ProcessCpuTime":917750000000,"SystemCpuLoad":0.015635532699800114,"TotalPhysicalMemorySize":8589463552,"TotalSwapSpaceSize":9931640832,"Name":"Windows Server 2012 R2","Version":"6.3","AvailableProcessors":2,"Arch":"amd64","SystemLoadAverage":-1.0,"ObjectName":"java.lang:type=OperatingSystem","jvmDescription":"ATM eAdmin Glassfish","mbean_domain":"java.lang","mbean_property_type":"OperatingSystem"}

Thanks for any help,
Kind regards
Bård Tørustad

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...