Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Monitoring jboss

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?



 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
vignesh Thamarai
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
vignesh Thamarai
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .





 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Wanna see my flashlight? How about this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic