As I had to monitor some JBoss servers and as there are some memory leaks in the program, the monitoring in Nagios of the Garbage Collector is very important. I’ve found some jmx script on JBoss wiki, but I was not happy with it. So I rewrite it to use twiddle.sh with the attributes I needed.
I had also to modify twiddle.sh to remove the logging capability (that was causing permission error) :
# diff twiddle.sh twiddleFred.sh
> # removed to avoid log file JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
Those are the nrpe test I implemented :
# check Perm Gen
command[check_jbosspem]=/usr/lib/nagios/plugins/check_jbosspem 127.0.0.1 4 jboss.system:type=ServerInfo listMemoryPools "Perm Gen" 70 90
# check Old Gen (Heap Memory)
command[check_jbossoldgen]=/usr/lib/nagios/plugins/check_jbosspem 127.0.0.1 4 jboss.system:type=ServerInfo listMemoryPools "Old Gen" 85 95
this is exactly what i’m looking for. it would be nice if you share your knowledge with me 🙂
I did release my efforts as well: http://sourceforge.net/projects/jboss2nagios/
Would that fit your needs as well?
I have 4 jboss5 servers installed in my server with diferrent directory location with different port.
1. If i deploy this collector.sar file in first jboss it will open 5566 port.
I can able to monitor that jboss in nagios.
2. If i want monitor 2,3 & 4 th jbosses also i cant keep same collector.sar file in those jboss deployment directories because 5566 port allready in use in 1st jboss.
Please help me any one how can resolve this issue.
Help is request ASAP.
For more details / quires /help write to mail on firstname.lastname@example.org
I’m not familiar with the tool of Tobias, but what you can try is to unzip collector.jar, and modify in META-INF/jboss-service.xml the port 5566.
But I also advise you to ask directly on jboss2nagios support page on sf.net or on their mailing list.
Thanx for your replay.
Do u have any idea about .sar files.
Because this nagios collecor is .sar file and can have idea about editing this .sar files.
It will help me alot.
you can just unzip it like a normal zip file and modify it.
Thanks for article,
Can somebody tell me, how i can run this script in windows jboss server
This script is written in bash and won’t work on Windows, However you can reuse the logic of it and write your own script in windows powershell (http://en.wikipedia.org/wiki/Windows_PowerShell) for example.