Is there a need in JVM agent which works just as Zabbix agent

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Is there a need in JVM agent which works just as Zabbix agent

    Hi users of Zabbix,

    I started using Zabbix a while ago and I found that I want / need to concentrate all my monitoring in Zabbix. "All" includes dozen of Java applications.

    My question is:

    Is there a need in JVM agent which works (behaves) just as Zabbix agent from Zabbix server perspective? That JVM agent could provide access to JMX metrics of Java application for monitoring. I understand Zabbix has Java gateway (exactly for the same use case) but it looks more complex comparing to adding JVM agent into existing Java application and working with that JVM agent as with regular Zabbix agent.

    Imagine you have:
    1. JavaSE application running as daemon / service
    2. Spring Boot Java application
    3. Java application running in JBoss AS 7.x / JBoss EAP 6.x
    4. Java application running in WildFly / JBoss EAP 7.x
    The items #1 and #2 can be easily monitored with help of Zabbix Java gateway, while items #3 and #4 require additional JAR-files being added into Zabbix Java gateway for support of remoting JMX protocol. In case these additional JAR-files are incompatible b/w different version of JBoss / WildFly you will need to setup more than one instance of Zabbix Java gateway. This make your infrastructure harder to setup and maintain. More complex your infrastructure is - less reliable it becomes.

    I found just one project - http://zorka.io/ - which implements JVM agent which can communicate with Zabbix server directly (i.e. behaves just as a regular Zabbix agent). Unfortunately, Zorka doesn't support TLS (neither certificate based TLS nor TLS PSK).

    Another useful project I found is Jolokia - https://jolokia.org/. Jolokia is widely used / mature HTTP(S)-JMX bridge. Unfortunately, Jolokia is not supported by Zabbix (Zabbix server of Zabbix Java gateway) directly. Patched Zabbix Java gateway - https://bitbucket.org/ryanrupp/zabbi...eway/wiki/Home - looks old (based on Zabbix 2.x).

    One could recommend to use user parameters supported by Zabbix agent (it could be even used with Jolokia), but it looks like running some executable each time I need to grab some JMX metrics (1 sec in may case) will negatively impact (CPU, I/O) host where Zabbix agent runs. I understand that some caching / batching can be used (like in http://webcache.googleusercontent.co...&ct=clnk&gl=ru) but that makes infrastructure more complex comparing to JVM agent which acts as a regular Zabbix agent.

    I appreciate if readers of this post could:
    • Point me another (comparing to what I listed above) existing solution for monitoring of Java application in Zabbix.
    • Vote for JVM agent which acts as Zabbix agent, i.e. supports Zabbix protocol (both passive and active checks, discovery, TLS). I'd like to know if this solution is wanted by Zabbix community / users. If it will be found useful then I plan to start working on it - it can be written in Java or (for better performance and less impact on monitored application) in C/C++ (Zabbix agent sources can be used / integrated in that case making new solution fits better in existing Zabbix universe).
    Thanks!


    #2
    Question,

    How do i use Zorka with Zabbix?
    How do i implement it?

    The templates i can import but how do i set up the client?

    Comment


      #3
      This sounds alot like what appdynamics does. It's predominately for App monitoring. from memory the agent is either within their jvm, or sits below it, and provides metrics on both the Java App (through JVM usage) but also on response time from hosts either side. so for example if it was on your middleware layer it would show latency from/to the http front end, and also from/to the DB Backend.

      If someone produced appdynamic style functionality for Zabbix, I'm sure that would be greatly appreciated.

      Comment


        #4
        Can someone please answer the questions by waard? I'm curious about it too.

        Thanks.
        free chegg account
        Last edited by louislitt; 23-10-2018, 06:04.

        Comment


          #5
          Originally posted by scottc View Post
          This sounds alot like what appdynamics does.
          ... as well as Dynatrace does, but I need all my monitoring to be concentrated in Zabbix (which I prefer over AppDynamics or Dynatrace, when I need monitoring and not profiling).

          Originally posted by scottc View Post
          If someone produced appdynamic style functionality for Zabbix, I'm sure that would be greatly appreciated.
          I'm in the same position, just cannot understand:

          1. why didn't Zabbix itself provide this solution (it could be even commercial)? Zabbix Java Gateway doesn't look like the best and the simplest choice for monitoring of Java applications via JMX.
          2. why didn't (large) Zabbix community create this stuff already?

          Comment


            #6
            Originally posted by louislitt View Post
            Can someone please answer the questions by waard? I'm curious about it too.

            Thanks.
            I tried but it looks like all posts about Zorka (including links) are blocked my moderators.

            Comment


              #7
              Originally posted by mabrarov View Post
              Hi users of Zabbix,

              I started using Zabbix a while ago and I found that I want / need to concentrate all my monitoring in Zabbix. "All" includes dozen of Java applications.

              My question is:

              Is there a need in JVM agent which works (behaves) just as Zabbix agent from Zabbix server perspective? That JVM agent could provide access to JMX metrics of Java application for monitoring. I understand Zabbix has Java gateway (exactly for the same use case) but it looks more complex comparing to adding JVM agent into existing Java application and working with that JVM agent as with regular Zabbix agent.

              Imagine you have:
              1. JavaSE application running as daemon / service
              2. Spring Boot Java application
              3. Java application running in JBoss AS 7.x / JBoss EAP 6.x
              4. Java application running in WildFly / JBoss EAP 7.x
              The items #1 and #2 can be easily monitored with help of Zabbix Java gateway, while items #3 and #4 require additional JAR-files being added into Zabbix Java gateway for support of remoting JMX protocol. In case these additional JAR-files are incompatible b/w different version of JBoss / WildFly you will need to setup more than one instance of Zabbix Java gateway. This make your infrastructure harder to setup and maintain. More complex your infrastructure is - less reliable it becomes.

              I found just one project - http://zorka.io/ - which implements JVM agent which can communicate with Zabbix server directly (i.e. behaves just as a regular Zabbix agent). Unfortunately, Zorka doesn't support TLS (neither certificate based TLS nor TLS PSK).

              Another useful project I found is Jolokia - https://jolokia.org/. Jolokia is widely used / mature HTTP(S)-JMX bridge. Unfortunately, Jolokia is not supported by Zabbix (Zabbix server of Zabbix Java gateway) directly. Patched Zabbix Java gateway - https://bitbucket.org/ryanrupp/zabbi...eway/wiki/Home - looks old (based on Zabbix 2.x).

              One could recommend to use user parameters supported by Zabbix agent (it could be even used with Jolokia), but it looks like running some executable each time I need to grab some JMX metrics (1 sec in may case) will negatively impact (CPU, I/O) host where Zabbix agent runs. I understand that some caching / batching can be used (like in http://webcache.googleusercontent.co...&ct=clnk&gl=ru) but that makes infrastructure more complex comparing to JVM agent which acts as a regular Zabbix agent.

              I appreciate if readers of this post could:
              • Point me another (comparing to what I listed above) existing solution for monitoring of Java application in Zabbix.
              • Vote for JVM agent which acts as Zabbix agent, i.e. supports Zabbix protocol (both passive and active checks, discovery, TLS). I'd like to know if this solution is wanted by Zabbix community / users. If it will be found useful then I plan to start working on it - it can be written in Java or (for better performance and less impact on monitored application) in C/C++ (Zabbix agent sources can be used / integrated in that case making new solution fits better in existing Zabbix universe).
              Thanks!
              I've been looking for a way to use the Zabbix agent to connect to my java application and send metrics to the zabbix server over TLS and I found nothing so far. I happened to stumble upon your post and it resonated with me.
              I am currently using Zabbix Server 4.0 and for my requirement the Jolokia solution seems to fit. However given that I am on Zabbix 4.0 do you think its worth a try? Also, do you know of any other ways to tackle my problem.

              Appreciate your help.

              Thanks.

              Comment


                #8
                Hi,

                I have a bit of the same problem but maybe also solutions. (you may have found one in the meantime, if so, please share )


                So we have an environment with several Jboss EAP 7.x servers per machines. We also have Websphere servers. We would like to integrate these with Zabbix, I guess via JMX but any other option is welcome (I worked in another company where we used jstat to monitor servers)

                The modern JBoss JMX implementation is indeed not very standard though it bring great things. Via a modified jconsole (with added jar and truststore) I can connect to my servers with ldap credentials over TLS. Neat.

                But as you said this is far from standard and might complicate things in a large environement. I will have to explore with my monitoring colleagues if we even achieve to configure this (the TLS part might be tricky).

                But you can have basic java monitoring (heap, threads...) by using java Jmx extension and not the Jboss one. That means consider Jboss as any other java process and add to the java options:

                -Dcom.sun.management.jmxremote
                -Dcom.sun.management.jmxremote.port=XXXX
                -Dcom.sun.management.jmxremote.local.only=false
                -Dcom.sun.management.jmxremote.authenticate=false
                -Dcom.sun.management.jmxremote.ssl=false

                The majors inconvenients are:
                - The ressources that you can monitor are limited to JVM ressources, not Jboss ones
                - You have to specify a port manually in java arguments and thus cannot the jboss offset system to attibute a port autoimatically (though maybe that's possible somehow, not sure)


                I also explored the zorka doc but it seems EAP 7 is not (yet) supported so I'm not sure I want to invest time in that way, though it looks promising.

                Comment


                  #9
                  Originally posted by mabrarov View Post
                  Hi users of Zabbix,

                  Another useful project I found is Jolokia - https://jolokia.org/. Jolokia is widely used / mature HTTP(S)-JMX bridge. Unfortunately, Jolokia is not supported by Zabbix (Zabbix server of Zabbix Java gateway) directly. Patched Zabbix Java gateway - https://bitbucket.org/ryanrupp/zabbi...eway/wiki/Home - looks old (based on Zabbix 2.x).
                  Hi,

                  I was looking for a solution when I came across HTTP Agent offered by zabbix. I have jolokia deployed with my java application.
                  I have configured my zabbix item as HTTP agent which will send a json request to fetch the required values and unlike JMX you can use HTTP authentication with this approach.

                  Look up zabbix documentation about HTTP Agent.
                  https://www.zabbix.com/documentation...itemtypes/http

                  Regards,
                  sshaikh

                  Comment


                    #10
                    Originally posted by sshaikh View Post
                    I was looking for a solution when I came across HTTP Agent offered by zabbix. I have jolokia deployed with my java application.
                    Zabbix HTTP Agent looks good and I need to test it too, but it has some drawbacks (I guess, I need to test this to state it for 100%):

                    We need to distinguish these 2 actions:
                    1. making a probe - reading JMX data for particular (current) point of time
                    2. sending read data (which can be batched) to Zabbix
                    With HTTP Agent it looks like frequency of action #1 is tied to frequency of action #2 because these 2 actions are tied (are performed together and synchronously) and not performed in parallel (not sure if Zorka supports this).

                    HTTP Agent works in passive mode where Zabbix server / proxy polls your application (Jolokia endpoint) while active mode (application / Zabbix agent sends batched data to Zabbix server / proxy when data exist and is ready) looks more efficient in terms of resource consumption.

                    If JVM agent is designed for Zabbix (like Zorka or the thing which I plan to work on), then it's possible to implement active checks and to send batched data to Zabbix server / proxy. This makes it possible to make (configurable) frequency of action #1 larger than (configurable) frequency of action #2 keeping collected data fine grained and optimizing networking.
                    Last edited by Marat Abrarov; 15-02-2019, 13:51.

                    Comment

                    Announcement

                    Collapse
                    No announcement yet.
                    Working...
                    X