-
1. Re: Monitoring datasource connection pool on JBoss AS7.1
heiko.braun Feb 28, 2012 3:21 AM (in response to suman.ganta)the console picks the values from here:
[INFO] {
[INFO] "address" => [
[INFO] ("subsystem" => "datasources"),
[INFO] ("data-source" => "ExampleDS"),
[INFO] ("statistics" => "pool")
[INFO] ],
[INFO] "operation" => "read-resource",
[INFO] "include-runtime" => true
[INFO] }
-
2. Re: Monitoring datasource connection pool on JBoss AS7.1
suman.ganta Feb 28, 2012 8:58 AM (in response to heiko.braun)What is this structure? Is this input to some mbean? If so, which mbean has the operation "read-resource"?
-
4. Re: Monitoring datasource connection pool on JBoss AS7.1
suman.ganta Feb 28, 2012 9:56 AM (in response to heiko.braun)Thanks Heiko. I tried with jboss-cli.bat with the input structure you mentioned above. However, I'm still getting the statistics structure in output as follows:
statistics
pool=n/a
jdbc=n/a
I did this -
After connecting to my standalone server,
> cd /subsystem=datasources/data-source=MyDS_Pool/statistics=pool
> data-source read-resource --name=MyDS_Pool --include-runtime=true
It dumps all other static attributes correctly except the statistics attribute.
Do you know which MBean it uses to get this info? Could you point me to the source that renders this runtime info on console? I can dig in from there.
-
5. Re: Monitoring datasource connection pool on JBoss AS7.1
heiko.braun Feb 28, 2012 10:04 AM (in response to suman.ganta)is the DS enabled? did it receive invocation yet?
here's an example taken from the ExampleDS:
[standalone@localhost:9999 /] /subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(include-runtime=true)
{
"outcome" => "success",
"result" => {
"ActiveCount" => "2",
"AvailableCount" => "20",
"AverageBlockingTime" => "0",
"AverageCreationTime" => "62",
"CreatedCount" => "2",
"DestroyedCount" => "0",
"MaxCreationTime" => "64",
"MaxUsedCount" => "2",
"MaxWaitTime" => "0",
"TimedOut" => "0",
"TotalBlockingTime" => "0",
"TotalCreationTime" => "124"
}
}
-
6. Re: Monitoring datasource connection pool on JBoss AS7.1
heiko.braun Feb 28, 2012 10:06 AM (in response to heiko.braun)1 of 1 people found this helpfulbtw, you can do the same thing via HTTP:
{"ActiveCount" : "2", "AvailableCount" : "20", "AverageBlockingTime" : "0", "AverageCreationTime" : "62", "CreatedCount" : "2", "DestroyedCount" : "0", "MaxCreationTime" : "64", "MaxUsedCount" : "2", "MaxWaitTime" : "0", "TimedOut" : "0", "TotalBlockingTime" : "0", "TotalCreationTime" : "124"}
-
7. Re: Monitoring datasource connection pool on JBoss AS7.1
suman.ganta Feb 29, 2012 9:38 AM (in response to heiko.braun)Thanks a lot Heiko. both cli and json response worked now. So, is this the only way to get this info? Is there any mbean to get this info? I want to avoid http layer if possible as my app which collects these metrics would be deployed on the same jboss as instance in which the datasource is deployed.
Update: I was able to do this with Native Management API of JBoss 7.1. Thanks for all the information.
-
8. Re: Monitoring datasource connection pool on JBoss AS7.1
heiko.braun Mar 1, 2012 3:01 AM (in response to suman.ganta)no, mbeans have been replaced by the native management API.
-
9. Re: Monitoring datasource connection pool on JBoss AS7.1
thinksteep Aug 2, 2012 11:06 AM (in response to heiko.braun)Hi Heiko, I am having similar issue and understood that Native Management API is the solution. My question is more on JBoss team direction about JMX Beans for stats. So, MBeans (for stats) will be completely replaced/unsupported in future releases and Native Management API will be primary methodology? Any input will be really appreciated. As well as could you point me to any resources on JBoss Native Management API? Thanks for your time and help.
-
10. Re: Monitoring datasource connection pool on JBoss AS7.1
heiko.braun Aug 3, 2012 4:23 AM (in response to thinksteep)thinksteep thinksteep wrote:
So, MBeans (for stats) will be completely replaced/unsupported in future releases and Native Management API will be primary methodology?
yes.
a good example how to work with the data at hand can be found here:
https://community.jboss.org/wiki/AdvancedCLIScriptingWithGroovyRhinoJythonEtc
-
11. Re: Monitoring datasource connection pool on JBoss AS7.1
thinksteep Aug 3, 2012 10:13 AM (in response to heiko.braun)Hi Heiko, Thanks for quick response. Unfortunately I can't use scripting (or) cli. I may need to use "ModelControllerClient", my guess is this is java version of Management API, is that correct? Thanks for your time and help Thank you,
-
12. Re: Monitoring datasource connection pool on JBoss AS7.1
rgosdal Nov 7, 2012 3:58 PM (in response to heiko.braun)Hi, Heiko
I'm trying to integrate JBoss 7.1 to a remote monitoring tool (HP SiteScope) which has JSR 160 JMX support. It has worked till version 6, but as far as I undestood, RMI has been replaced by remoting-jmx in version 7.1 (which is a JBoss specific protocol, requiring some jboss jars in client's classpath, which is complicated if you can't change/configure the tool). I think supporting RMI allowed to integrate more easily with available monitoring tools.
I also tried jboss-cli, but it seems I don't have all statistics sofar available through Mbeans, or am I wrong? Which is JBoss strategy for getting monitoring data?
Thanks
-
13. Re: Monitoring datasource connection pool on JBoss AS7.1
ulrich-scholz Jan 17, 2013 10:57 AM (in response to heiko.braun)I tried the given URL and exchanged ExampleDS with SmartiDS, a name of an existing data source.
I got the following error. What to do?
Thanks
{
- "outcome": "failed",
- "failure-description": "JBAS010850: No handler for operation read-resource at address [\n (\"subsystem\" => \"datasources\"),\n (\"data-source\" => \"SmartiDS\"),\n (\"statistics\" => \"pool\")\n]",
- "rolled-back": true
}
-
14. Re: Monitoring datasource connection pool on JBoss AS7.1
nickarls Jan 18, 2013 1:22 AM (in response to ulrich-scholz)Well, if it gives the stats for ExampleDS but not for your own, perhaps the name is not really SmartiDS? Have you checked with the web console that you don't have any JNDI prefix etc in the name also?
(and please start new threads for new questions, especially continuing on threads marked 'Answered' yield few responses)