Nagios JBoss Check


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 with the attributes I needed.

I had also to modify to remove the logging capability (that was causing permission error) :

# diff
> # 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 4 jboss.system:type=ServerInfo listMemoryPools "Perm Gen" 70 90

# check Old Gen (Heap Memory)
command[check_jbossoldgen]=/usr/lib/nagios/plugins/check_jbosspem 4 jboss.system:type=ServerInfo listMemoryPools "Old Gen" 85 95

8 thoughts on “Nagios JBoss Check

    1. Hi,

      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

      Andhra Pradesh,

      1. Hi Andhra,

        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 or on their mailing list.



        1. Hi Fred,

          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.


  1. Hello,

    Thanks for article,
    Can somebody tell me, how i can run this script in windows jboss server


    Mohammed Khalid

Leave a Reply

Your email address will not be published. Required fields are marked *


Last Tweets Last Tweets

    Locations of visitors to this page