Ad Widget

Collapse

Monitoring two JVM in the same machine

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pgaete
    Junior Member
    • Jun 2019
    • 2

    #1

    Monitoring two JVM in the same machine

    Hi all,

    I need monitoring two JVM in the same machine.
    Any ideas?

    Regards,
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Does it mean to monitor using JMX?
    I think that you should set to connect using another port number.

    Comment

    • pgaete
      Junior Member
      • Jun 2019
      • 2

      #3
      I´m configured one host with two JMX interface (ports 3333 and 3334), but the Template App Generic Java JMX monitoring only one interface, not both at the same time

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        In the current version of Zabbix, even if you can register multiple JMX interfaces, linking JMX monitoring items from a template will only be handled by one JMX interface. I think it is necessary to register and monitor as multiple hosts on Zabbix.

        --- added
        ZBXNEXT-1490 : Unable to use same item key with multiple interfaces
        Last edited by Atsushi; 12-06-2019, 07:51.

        Comment

        • BigSmooth
          Member
          • Jun 2023
          • 46

          #5
          It is currently not possible to tell the template which interface to use. It could be a great addition to Zabbix as, for example, monitoring Alfresco which can run several JVMs (4 in my case).

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            You cannot specify in template which interface to use. It will use first suitable one. And you also still cannot use same template several times for one host, even if you have several interfaces...

            Comment

            • BigSmooth
              Member
              • Jun 2023
              • 46

              #7
              Originally posted by cyber
              You cannot specify in template which interface to use. It will use first suitable one. And you also still cannot use same template several times for one host, even if you have several interfaces...
              I don't want to use two times same template, but two (or more) templates that uses JMX (for example: Apache Tomcat by JMX and Apache ActiveMQ by JMX). Unfortunately, it is not possible to use several JMX interfaces.
              I will go for the "fake" host option.

              Comment

              • cyber
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2006
                • 4807

                #8
                If you have multiple interfaces, then in items config (already on host level) you can change used interface. If all items are same type you can also use "Mass update" to change it.
                If those templates have items with identical keys (issues with assigning template to host), then at least for jmx it seems to work, if you change the keys a liiiiiitle bit like this...

                Code:
                jmx["java.lang:type=Memory","HeapMemoryUsage.used"]
                jmx[ "java.lang:type=Memory","HeapMemoryUsage.used"]
                jmx[  "java.lang:type=Memory","HeapMemoryUsage.used"]
                Notice those couple spaces? Key becomes unique... but it works just as intended.

                Comment

                • BigSmooth
                  Member
                  • Jun 2023
                  • 46

                  #9
                  Perfect cyber
                  I missed that option at item level.
                  Thank you very much !

                  Comment

                  • BigSmooth
                    Member
                    • Jun 2023
                    • 46

                    #10
                    It does not seems possible to update discovered items individually (blocked field), so I updated the discovery rules. But even after running them, it is not reflecting change in item.
                    Mass update of items prototypes is required (and seems possible).
                    There is room for improvments in that area.

                    Comment

                    • Gloomeye
                      Junior Member
                      • Aug 2024
                      • 4

                      #11
                      For servers with multiple jmx roles, I applied the following method:

                      1) I created 4 different JMX interfaces for 4 different Apache Tomcat installations and 4 different published ports on the same host.Click image for larger version

Name:	dataurl358567.png
Views:	237
Size:	58.4 KB
ID:	491846
                      2) I copied the Apache Tomcat by JMX template with a different name for each Tomcat.

                      3) I defined the description as Port2/Port3/Port4 in the key fields using jmx for each template. (For example: jmx["Catalina:type=Server",serverInfo,Port4]) I did this in all Item, Discovery Rules, Item Prototypes, and Graph Prototypes Name fields.Click image for larger version

Name:	dataurl358569.png
Views:	218
Size:	46.3 KB
ID:	491845
                      However, this did not ensure that the newly created templates would select the correct JMX interface.

                      4) To select the correct JMX interface, I selected the correct JMX interface from the host interface combo box on the host. I did this in all Item, Discovery Rules, and Item Prototypes key fields.Click image for larger version

Name:	dataurl358569.png
Views:	224
Size:	48.8 KB
ID:	491847
                      In this way, I could use 4 different Tomcat templates on a single host.

                      Click image for larger version

Name:	dataurl358570.png
Views:	284
Size:	13.1 KB
ID:	491844

                      Comment

                      Working...