Ad Widget

Collapse

specifying hostinterface for JMX item programmatically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • michaill
    Junior Member
    • May 2014
    • 18

    #1

    specifying hostinterface for JMX item programmatically

    Hi,
    I have two instances of Tomcat on a host that I want to monitor.
    I created two JMX interfaces for that host that correspond to the two Tomcats. I applied two Tomcat templates, one for each instance.

    Now, how can I specify that all items in a given template should connect to a host through a specific JMX interface? The only way I can see is by doing it item by item using web interface. The docs say I can only do this for host items. How can I do this in bulk for all items in a template?

    Thanks
    Mike
  • coreychristian
    Senior Member
    Zabbix Certified Specialist
    • Jun 2012
    • 159

    #2
    The only way I found you could do it was to create a different host for each JMX Interface you wanted. Even setting the Interfaces I couldn't apply the same items to an individual host (item key's were the same)

    If someone has another answer would love to hear it though.

    Comment

    • michaill
      Junior Member
      • May 2014
      • 18

      #3
      JMX item

      Now I'm wondering how does a JMX item even choose which interface to use if there are more than one?

      Comment

      • coreychristian
        Senior Member
        Zabbix Certified Specialist
        • Jun 2012
        • 159

        #4
        Originally posted by michaill
        Now I'm wondering how does a JMX item even choose which interface to use if there are more than one?
        When you create a JMX item, or apply a template, it chooses the one that has the default box checked. After the items are created, you can specify the interface in the item.

        Comment

        • michaill
          Junior Member
          • May 2014
          • 18

          #5
          Database maybe?

          Thanks for response.

          Perhaps an item's hostinterface for a specific host can be changed directly in the database? I haven't looked into it yet, is that something you tried?

          Comment

          • coreychristian
            Senior Member
            Zabbix Certified Specialist
            • Jun 2012
            • 159

            #6
            Originally posted by michaill
            Thanks for response.

            Perhaps an item's hostinterface for a specific host can be changed directly in the database? I haven't looked into it yet, is that something you tried?
            We haven't tried that, though that would probably work as well. The main issue we ran into is we couldn't monitor the same item's on the same host.

            Example

            Interface 1/Java App 1
            jmx["java.lang:type=Memory","HeapMemoryUsage.committed "]

            Interface 2/Java App 2
            jmx["java.lang:type=Memory","HeapMemoryUsage.committed "]


            They are duplicate items for the host which zabbix doesn't support as the item key is the key field in the database.

            So our work around as mentioned was just to create a separate host for the second JVM App.

            Host1 = all base monitoring and JMX Monitoring for Interface 1
            Host2 = JMX Monitoring for Interface 2

            Comment

            • Slash
              Member
              • May 2011
              • 64

              #7
              I have the same issue, and I advise you to completely separate the tomcats from the physical servers:

              - create an host for the physical server and apply all monitoring template to it except tomcat/JVM
              - create one host for each tomcat you have and apply monitoring template only for tomcat/JVM on each one

              If you don't, you will have one tomcat linked to its physical servers and all other tomcats separated, it may not bother you at first, but it can be a really bad idea when you have a lot of tomcats/servers. It also permit you to create a group "tomcat" with all tomcats hosts.

              Comment

              Working...