-
1. Re: Storing monitoring informations in database
peterj Jun 1, 2010 9:03 AM (in response to ssroy73)Roy, welcome to the forum!
There is nothing that does this automatically, but you should be able to write it easily yourself. You could either wrtie a script that uses twiddle to access the data you want, and have the script put the data in Oracle, and then run the script on a timer. Or you can write a simple Java app to access the mbean and store the results in Oracle; out the code in a loop with a wait time.
-
2. Re: Storing monitoring informations in database
ssroy73 Jun 2, 2010 11:06 AM (in response to peterj)Thanks a lot Peter for the response.
Is there any tool/script readily available which can be used to generate static graph from the informations stored in database.
Thanks a lot again.
Best Regards,
Roy
-
3. Re: Storing monitoring informations in database
ssroy73 Jun 4, 2010 8:26 AM (in response to peterj)Hi Peter,
I was searching some documentation around your suggestion to access MBean from java code but of no avail. Can you please point me some documentation around this.
Thanks a lot.
Best Regards,
Roy
-
4. Re: Storing monitoring informations in database
dimitris Jun 4, 2010 9:04 AM (in response to ssroy73)Why not setting up Jopr?
-
5. Re: Storing monitoring informations in database
peterj Jun 4, 2010 12:47 PM (in response to ssroy73) -
6. Re: Storing monitoring informations in database
ssroy73 Jun 7, 2010 12:11 PM (in response to peterj)Thanks a lot Peter. I really appreciate your help. These links are very useful.
I could run my client successfully under windows environment.
But while running the same client in Linux I am getting javax.management.InstanceNotFoundException.
I am getting the above exception from following code snippet
ObjectName objName = new ObjectName("jboss.web:type=ThreadPool,name=ajp-<Domain Name>%2F<IP>-<port>"); //Error is coming here - copy and pasted the object name from web-console
Object obj = null;
while(true) {
obj = server.getAttribute(objName, "currentThreadsBusy");
System.out.println(obj);
Thread.sleep(1000);
}
I copied the object name after hitting the browser with "http://IP:8080/web-console. Same works in windows.
But instead of the above object name if I use "java.web:type=Host,host=localhost" and print its attribute, it gives me output.
I am not sure what I am missing.
I will really appreciate your input on this.
Thanks and Best Regards,
Roy
-
7. Re: Storing monitoring informations in database
peterj Jun 7, 2010 2:00 PM (in response to ssroy73)You lost me - you are mentioning both Windows and Linux, yet not saying which one you got the data from when it failed in Linux. Your best bet is to use jmx-console again the Jboss AS runnign on Linux and getting the MBean name from that. Also, try it out with twiddle first to verify the name.
Finally, what JDK are you using on Linux?
-
8. Re: Storing monitoring informations in database
ssroy73 Jun 8, 2010 10:23 AM (in response to peterj)Hi Peter,
Sorry for creating confusion.
I was getting "currentThreadsBusy" value while running Jboss in Windows but not in Linux.
Anyway, I could figure out the problem. We have Apache infront of JBoss in Linux (Apache and Jboss are installed in 2 different box). I directly used the IP of Jboss machine while accessing web-console yesterday and picked up the object name. But today when I accessed the web-console via web server, I could see a different object name. Not sure why though!!. But my client program is running successfully now in Linux as well.
Thanks a lot once again for all your help.
Best Regards,
Roy