-
15. Re: Jboss monitoring - No 'jboss' MBeanServer found!
manishdevraj Mar 15, 2013 6:43 AM (in response to sebyfrancis)You are adding dependcy at wrong level of configuration. We are using OSGI bundles and depedencies are added at OSGI subsystem. My configuration would look like below. If you have other values already just use " , " seperator.
<subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
<properties>
<property name="org.jboss.osgi.system.modules.extra">
com.jboss.jboss2nagios
</property>
<property name="org.osgi.framework.startlevel.beginning">
3
</property>
<property name="org.osgi.framework.system.packages.extra">
org.jboss.util
</property>
</properties>
-
16. Re: Jboss monitoring - No 'jboss' MBeanServer found!
sebyfrancis Mar 15, 2013 7:18 AM (in response to manishdevraj)I think, I'm doing something wrong. Here is the error I see:
07:13:16,561 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "collector.sar"
07:13:16,561 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "jndi-view-0.2.war"
07:13:16,561 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "j2ee-rest-api-app-1.5-SNAPSHOT.ear"
07:13:16,754 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.module.service."deployment.collector.sar".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.collector.sar".main: Failed to load module: deployment.collector.sar:main
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
Caused by: org.jboss.modules.ModuleNotFoundException: Module com.jboss.jboss2nagios:main is not found in local module loader @4ac194ad (roots: /home/jboss7/jboss-as-7.1.1.Final/modules)
at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.Module.addPaths(Module.java:841) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.Module.link(Module.java:1181) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1207) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:208) [jboss-modules.jar:1.1.1.GA]
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Here is the snippet from standalone.xml config file:
<subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
<properties>
<property name="org.jboss.osgi.system.modules.extra">
com.jboss.jboss2nagios
</property>
<property name="org.osgi.framework.startlevel.beginning">
3
</property>
<property name="org.osgi.framework.system.packages.extra">
org.jboss.util,org.jboss.util.StringPropertyReplacer
</property>
</properties>
<capabilities>
<capability name="javax.servlet.api:v25"/>
<capability name="javax.transaction.api"/>
<capability name="org.apache.felix.log" startlevel="1"/>
<capability name="org.jboss.osgi.logging" startlevel="1"/>
<capability name="org.apache.felix.configadmin" startlevel="1"/>
<capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
</capabilities>
</subsystem>
-
17. Re: Jboss monitoring - No 'jboss' MBeanServer found!
manishdevraj Mar 15, 2013 8:11 AM (in response to sebyfrancis)Remove org.jboss.util.StringPropertyReplacer class entry it only needs to know package. Make sure jboss module has correct permissions set. Everything else looks good to me.
-
18. Re: Jboss monitoring - No 'jboss' MBeanServer found!
sebyfrancis Mar 15, 2013 8:40 AM (in response to manishdevraj)Unfortunately I still have the error:
Caused by: org.jboss.modules.ModuleNotFoundException: Module com.jboss.jboss2nagios:main is not found in local module loader @6b081032 (roots: /home/jboss7/jboss-as-7.1.1.Final/modules)
-
19. Re: Jboss monitoring - No 'jboss' MBeanServer found!
sebyfrancis Mar 18, 2013 6:22 AM (in response to sebyfrancis)Hi Manish,
We got it fixed and was path issue with the module.
Regards,
SFK.
-
20. Re: Jboss monitoring - No 'jboss' MBeanServer found!
sebyfrancis Mar 18, 2013 8:16 AM (in response to sebyfrancis)How ever the plugins are showing the below results:
root@nagios ~]# ./check_mbean_collector -H 10.254.101.52 -p 5566 -m jboss.system:type=ServerInfo -a TotalMemory -w 1 -c 2
UNKNOWN TOTALMEMORY UNKNOWN - MBean jboss.system:type=ServerInfo could not be found
[root@noc ~]# ./heap_util -H 10.254.101.52 -p 5566 -m jboss.system:type=ServerInfo
UNKNOWN ? UNKNOWN - MBeanServer responded: ArrayIndexOutOfBoundsException 1
[root@nagios ~]#
Any clue?
-
21. Re: Jboss monitoring - No 'jboss' MBeanServer found!
manishdevraj Mar 18, 2013 8:46 AM (in response to sebyfrancis)The Mbean you are sending to Jboss is not available, It might be missing since AS 7.x . I have modified SAR to provide inforamtion about HeapUsage and it can be extended to included other objects as we want. Use following -
./check_mbean_collector -H 10.254.101.52 -p 5566 -m java.lang:type=Memory -a HeapMemoryUsage -w 60 -c 80
Cheers,
Manish
-
22. Re: Jboss monitoring - No 'jboss' MBeanServer found!
sebyfrancis Mar 21, 2013 5:41 AM (in response to manishdevraj)Hi Manish,
Got a chance to test this and got the result correctly. How ever, we need to be able to read values from JBoss for other metrics.
Thanks,
SFK.
-
23. Re: Jboss monitoring - No 'jboss' MBeanServer found!
manishdevraj Mar 21, 2013 8:05 AM (in response to sebyfrancis)Pull latest, I have updated functionality to include following. Read README document for syntaxt etc.
- HeapMemoryUsage
- Non heap memory usage
- CPU usage
- Take heap dump
Enjoy
-
24. Re: Jboss monitoring - No 'jboss' MBeanServer found!
sebyfrancis Apr 2, 2013 7:32 AM (in response to manishdevraj)Manish,
Okay.. I've updated the latest file and can read those from the jboss(HeapMemoryUsage, NonHeapMemUsage, CPU Usage and heap dump). Shall I ask you how to read the other mbean metrics as well.. For eg; I still see the following:
./check_mbean_collector -H 192.168.1.25 -p 5566 -m jboss.system:type=ServerInfo -a ActiveThreadCount -w 200 -c 400
UNKNOWN ACTIVETHREADCOUNT UNKNOWN - MBean jboss.system:type=ServerInfo could not be found
Regards,
Seby.
-
25. Re: Jboss monitoring - No 'jboss' MBeanServer found!
manishdevraj Apr 2, 2013 7:55 AM (in response to sebyfrancis)The Object 'jboss.system:type=ServerInfo' is not supported in Jboss AS 7.1.1. That is the original reason I have modified code to be compatible with new AS version. You will be able to provide support to other metrics modifying source code based on what is needed.
-
26. Re: Jboss monitoring - No 'jboss' MBeanServer found!
sebyfrancis Apr 2, 2013 9:07 AM (in response to manishdevraj)Manish,
Thank you for the information!
Best,
SFK.
-
27. Re: Jboss monitoring - No 'jboss' MBeanServer found!
helenwu Apr 26, 2013 10:56 AM (in response to manishdevraj)Hi,
I can not make jboss2nagios work in our environment.
Can you help?
Thanks.
Helen
-
28. Re: Jboss monitoring - No 'jboss' MBeanServer found!
manishdevraj Apr 29, 2013 2:12 AM (in response to helenwu)You will have to describe more in details, it is difficult to help with a very little information.
-
29. Re: Jboss monitoring - No 'jboss' MBeanServer found!
helenwu Apr 29, 2013 8:41 AM (in response to manishdevraj)Hi Manish,
I downloaded latest collector.sar, and deployed it on my jboss 7.1.1 server.
create the following folder under modules, com/jboss/jboss2nagios/main
[jboss@hfqasywmkapp1 main]$ pwd
/usr/local/jboss7.1/modules/com/jboss/jboss2nagios/main
[jboss@hfqasywmkapp1 main]$
I have jboss-common.jar module.xml under main.
[jboss@hfqasywmkapp1 main]$ ls
jboss-common.jar module.xml
In module.xml, it has
[jboss@hfqasywmkapp1 main]$ more module.xml
<?xml version="1.0" encoding="UTF-8"?><module xmlns="urn:jboss:module:1.0" name="com.jboss.jboss2nagios">
<resources>
<resource-root path="jboss-common.jar"/>
</resources>
<dependencies/>
</module>In the standalone.xml, it has
<property name="org.jboss.osgi.system.modules.extra">
com.jboss.jboss2nagios
</property>
<property name="org.osgi.framework.startlevel.beginning">
3
</property>
<property name="org.osgi.framework.system.packages.extra">
org.jboss.util
</property>
The jvm is able to start, but when we try to run test from nagio server, in jvm server.log, it complains:
10:37:42,823 ERROR [stderr] (Collector request /157.241.195.225:47218) Exception in thread "Collector request /157.241.195.225:47218" java.lang.NoClassDefFoundError: org/jboss/util/StringPropertyReplacer
Why this class can not be found? It's jobss-common.jar.
Can you please help?
Thanks.
Helen