aspose file tools*
The moose likes JBoss/WildFly and the fly likes Monitoring jboss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Monitoring jboss" Watch "Monitoring jboss" New topic
Author

Monitoring jboss

vignesh Thamarai
Ranch Hand

Joined: Mar 10, 2009
Posts: 31
hi friends,

i had devoloped a application to monitor jboss apllication server and retrieve the information in the form of charts and graphs, That application is working properly. i hav some security issues regarding deploying the war file in client system.

is it possible to monitor jboss application server without deploying any war file?

how to acess http.invoker.sar ?



Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1282

Hi Vignesh,

I don't know what exactly you have to monitor but I think JBoss offers lots of relevant data via JMX. So I think it should be possible to use the standard transport via JMX to connect your monitoring application to JBoss without deploying a WAR file.

Marco
vignesh Thamarai
Ranch Hand

Joined: Mar 10, 2009
Posts: 31
thanks for reply my friend,
my application is like jmx console, it list all mbean names,attributes and its values from jboss application server and represent in the form of charts and graphs. is it any way to read mbeans from jboss without deploying war file?
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1282

Of course there is ;-) JMX can be used for local or remote access! You may find useful information here. You can remotely monitor any Java application with JMX remote support enabled.

Additionally you may have to search the JBoss documentation for information on how to enable remote JMX in JBoss.

Marco
Vikram Saxena
Ranch Hand

Joined: Dec 16, 2008
Posts: 53
Hello,

There is a script names twiddle.sh which is present in the $JBOSS_HOME/bin directory (JBOSS_HOME : is the root directory of JBoss)

I am using the script for getting the Heap size and the Free and used memory along with the Active Thread Counts in the following manner :

./twiddle.sh --server=jnp://$HOST:$PORT get "jboss.system:type=ServerInfo" FreeMemory | grep FreeMemory
./twiddle.sh --server=jnp://$HOST:$PORT get "jboss.system:type=ServerInfo" MaxMemory | grep MaxMemory
./twiddle.sh --server=jnp://$HOST:$PORT get "jboss.system:type=ServerInfo" ActiveThreadCount | grep ActiveThreadCount

The PORT here is the RMI port which is 1099 by default.


Vikram
SCJP 5 , SCBCD [Prep Started ] , WLS 8.1 Server Admin
vignesh Thamarai
Ranch Hand

Joined: Mar 10, 2009
Posts: 31
thanks for reply saxena,
i know this script twiddle.sh already it is the inbuild utility in jboss to get mbean attributes from jboss. i cant use this utility, i had already developed an application using jmx to get mbean attributes from jboss application server, it is working by deploying the war file in jboss on any machines(Remote Systems),my problem is how to access jboss mbeans without deploy any war/sar/ear file? is it possible to access?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10222
    
166

vignesh Thamarai wrote:my problem is how to access jboss mbeans without deploy any war/sar/ear file? is it possible to access?


Marco and Vikram mentioned a couple of ways through which you can access the JBoss MBeans without needing any additional war/sar/ear files. Are you looking for something else? Feel free to tell us more details.

[My Blog] [JavaRanch Journal]
vignesh Thamarai
Ranch Hand

Joined: Mar 10, 2009
Posts: 31
thanks jaikiran,

i want to know about is it anyway to access http.invoker.sar thru jmx program ? please give some article how to read jboss mbeans thru jmx without using jconsole or twiddle.
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1282

Hi Vignesh,

unfortunately I still don't understand what's the problem. As you said, your application is JMX enabled and can read information from any MBean?!? So it works exactly the same way from outside JBoss as it works from a web application inside JBoss. You just have to enable REMOTE JMX support in JBoss and you have to modify your application to be able to connect to a REMOTE JMX provider like JBoss.

I guess the only part you don't understand here is, that JMX clients (your application) can connect via JMX to some local MBeans on the same computer OR you can even access remote JMX destinations in a JVM running on another computer. This remote end (JBoss server) just have to be configured to allow remote access!

Still unclear?

Marco
vignesh Thamarai
Ranch Hand

Joined: Mar 10, 2009
Posts: 31
thanks marco
but my problem is my apllication is monitoring jboss application server only when i deploy the war file in my system or client system. when i deploy the war file in client system make some security issue .so i cant deploy or drop any war file in client systems. is it anyway to access jboss mbeans without deploy any war file ?
vignesh Thamarai
Ranch Hand

Joined: Mar 10, 2009
Posts: 31
for example ,

i hav deployed a "hello world" app war file in my system. then when i run jboss,i get this page on www.localhost:8080/hello world.

at the same time i need to view this page on other system means i will deploy this war file on other system too. then only i`am able to see this hello world page. without deploy that war file it will show error hello world app is not available.

my problem is i had devoloped one application to monitor jboss, it has the capablity to monitor other systems too it works by deploying my war file on other systems. but this will raise some security issues. is it any other way to access jboss mbeans on other systems without deploy any war file on that system ? please help me to solve my problem .





Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

I think I understand your question. You do not have to have anything deployed in JBoss to access its MBeanServer. If you look at the JMX api you will see that you can find any MBeanServer yourself and then get the list of MBeans it has.

Something like this
http://download-uk.oracle.com/docs/cd/B25221_02/web.1013/b14433/mbeans.htm#CIHCCAFJ

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Monitoring jboss