Ad Widget

Collapse

Zimbra monitoring using Zabbix java gateway

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Slash
    Member
    • May 2011
    • 64

    #1

    Zimbra monitoring using Zabbix java gateway

    Hello everyone,

    I did search over the net for different solution to monitor Zimbra but I did not find any way to monitor the java part of it, and a lot of solution were using crazy shell script anyway.

    So I modified the java option of Zimbra from :

    Code:
    zimbra@mail:~$ zmlocalconfig mailboxd_java_options
    mailboxd_java_options = -server -Djava.awt.headless=true -Dsun.net.inetaddr.ttl=60 -XX:+UseConcMarkSweepGC -XX:PermSize=128m -XX:MaxPermSize=128m -XX:SoftRefLRUPolicyMSPerMB=1 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack=true
    to

    Code:
    zimbra@mail:~$ zmlocalconfig mailboxd_java_options
    mailboxd_java_options = -server -Djava.awt.headless=true -Dsun.net.inetaddr.ttl=60 -XX:+UseConcMarkSweepGC -XX:PermSize=128m -XX:MaxPermSize=128m -XX:SoftRefLRUPolicyMSPerMB=1 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=/opt/zimbra/jmxremote/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/opt/zimbra/jmxremote/jmxremote.access
    You then have to create the files "/opt/zimbra/jmxremote/jmxremote.password" and "/opt/zimbra/jmxremote/jmxremote.access" with a user/authorization couple, like this :

    Code:
    echo "zabbix readonly" > /opt/zimbra/jmxremote/jmxremote.access
    echo "zabbix [your_password]" > /opt/zimbra/jmxremote/jmxremote.password
    chmod 600  /opt/zimbra/jmxremote/jmxremote.*
    Now you have to restart Zimbra.

    You will then be able to connect yourself using the Zabbix java gateway to the Zimbra JVM.

    You will have access to all the standard beans (java memory parameters, garbage collection, etc) but, and that's the best, you'll also have access to specific Zimbra metric, like the number of IMAP/IMAPS/POP3/POP3S sessions, the number of webmail request and much more.

    You don't have everything, but that's one hell of a good start.

    You'll find attached 2 template from my Zabbix 2.0.4:
    - the first one is for the generic monitoring of java application, working for anything using an Oracle JVM version 6 or 7 (didn't try for others)
    - the second one is the specific one for Zimbra, and works perfectly with my Zimbra CE 8.0.2

    Feedbacks are of course welcome

    OK, I can't upload the files because they are too big... they are on pastebin :
    - JMX generic : http://pastebin.com/Sy7esECS
    - JMX Zimbra : http://pastebin.com/euaENenj
  • MBear
    Junior Member
    • Nov 2004
    • 25

    #2
    Thank You!

    Comment

    • Dunmarie
      Junior Member
      • Jan 2009
      • 6

      #3
      JAVA Options

      HI,
      My apologies for re-opening such a old post, but I need to ask a question re the info here.
      I just need to know how to modify the JAVA Options in Zimbra to get your template to work.

      I have search google but I think my search strings are wrong therefore it doesn't turn up any usable info.
      What I have seen of your graphs and screen, your template is just what I was looking for.
      I am using Zimbra 8 and Zabbix 2.2.2.
      Thanks.

      Comment

      • Slash
        Member
        • May 2011
        • 64

        #4
        Hello Dunmarie,

        You need to be connected as the zimbra user then

        1/ get your original config value with:
        Code:
        zmlocalconfig mailboxd_java_options
        2/ set your new value using:
        Code:
        zmlocalconfig -e mailboxd_java_options="old line + jmxremote options"
        Real life example:

        Code:
        zmlocalconfig mailboxd_java_options
        mailboxd_java_options = -server -Djava.awt.headless=true -Dsun.net.inetaddr.ttl=60 -XX:+UseConcMarkSweepGC -XX:PermSize=225m -XX:MaxPermSize=225m -XX:SoftRefLRUPolicyMSPerMB=1 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack=true -Dorg.apache.jasper.compiler.disablejsr199=true
        then just copy paste the previous line and add at the end the jmx monitoring options:

        Code:
        zmlocalconfig -e mailboxd_java_options=" -server -Djava.awt.headless=true -Dsun.net.inetaddr.ttl=60 -XX:+UseConcMarkSweepGC -XX:PermSize=225m -XX:MaxPermSize=225m -XX:SoftRefLRUPolicyMSPerMB=1 -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack=true -Dorg.apache.jasper.compiler.disablejsr199=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=/opt/zimbra/jmxremote/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/opt/zimbra/jmxremote/jmxremote.access"
        Then restart zimbra and that's all for the jmxremote

        Comment

        Working...