Ad Widget

Collapse

Host with multiple interface - reference in item key

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #1

    Host with multiple interface - reference in item key

    This feels like something obvious but I can't find it.

    Say I have a host with multiple interfaces, e.g. 1.1.1.1 and 2.2.2.2. It's easy to add both of them.

    But now let's say you want to write a item key to reference it, for example to do a

    icmpping[{magic},,,,]

    I can't find what is the {magic} to put there to say "use the second interface", for example in a template (obviously I could hard code an IP there).

    The only way I have found to do this, is to build a macro for the host and define something like {$INT1} = 1.1.1.1, {$INT2} = 2.2.2.2, but that is completely aside from the secondary interface you can define on the host screen.

    In fact, so far, I haven't found anything anywhere that uses that secondary interface - you can create, but what uses it? I see no sign it's polling with anything but the default one.

    Am I just going blind?

    Note: I found this:



    (shows someone similarly confused, trying to use [HOST.IP2], which does something else)

    that thread also references a closed request for documentation clarification (which clarified that [HOST.IP2] doesn't do it), but I didn't find anything about how TO do it?
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    By the way, this is the thing I'm looking for. This is from the release notes of 2.0:

    5.1.4 Multi-homed host support

    Zabbix now supports multiple interfaces per host. You can configure several interface-host pairs in the host properties, and specify which should be used as the default for several item types (Zabbix agent, SNMP and IPMI). Additionally, you can override interface on the item level.

    How does one override it?

    Comment

    • Linwood
      Senior Member
      • Dec 2013
      • 398

      #3
      Well, maybe I've answered my own question.

      If I am defining an item for a host (not a template), there's an interface choice.

      What I want is some way to reference it in a template.

      Or maybe I'm asking the wrong question.... if a host has N interfaces, I would like to be able to assign an ICMP template to each one of them for tracking reachability.

      I don't want to track interface up/down - there's all sorts of cases where interfaces are up but not reachable, e.g. redundant paths terminating on ethernet interfaces on L3 devices. I want to ping it at a specific address.

      I take it that can't be done from a template, but requires a specific item definition to each host?

      Comment

      • Linwood
        Senior Member
        • Dec 2013
        • 398

        #4
        This may be a solo conversation but ...

        Templates are one of the good things in Zabbix.

        If I can't use templates, but have to hard code items (with associated triggers, etc.) when I have secondary interfaces, what's the point in defining them as secondary interfaces.

        Defining them as macros, and referring to them in a template (e.g. ICMP2 template refers to {$IP2}, etc.) at least lets you have templates that can be applied to various hosts. Assuming you mostly want to monitor 5 or 10 interfaces by IP max, you need 5 or 10 cloned templates, and can apply to LOTS Of hosts as needed. Not graceful, but better than LOTS Of hard coding for each host x each interface.

        Unless I'm missing something? Is there a way with LLD to "discover" the defined intefaces? (I'm not talking about SNMP finding ALL interfaces and monitoring their UP/DOWN status).

        Or some other technique?

        Or does most everyone just use one IP for every host for all monitoring by templates?

        Comment

        • mma
          Member
          • Apr 2010
          • 39

          #5
          It's a very interesting think. Have you find a resolution of this problem ?

          Comment

          • Linwood
            Senior Member
            • Dec 2013
            • 398

            #6
            Originally posted by mma
            It's a very interesting think. Have you find a resolution of this problem ?
            Nothing more by me.

            Comment

            • dorth
              Junior Member
              • Oct 2013
              • 6

              #7
              I'm in the same situation. I have multiple JMX interfaces that different items need to use. I can use the "Mass Update" and alter the "Host interface" to the correct one, but it's still a manual process.

              The API to enumerate the interfaces is tedious, but I'll probably have to see about writing something to automate the assignment. I've noticed that you can create identical interfaces which is a bit of a head scratcher.

              Ultimately I had planned to auto-discover JMX mbeans, but there doesn't appear to be a way to assign these to an interface in the discovery mechanism.

              Dead ends everywhere I look. :-(

              Dave O

              Comment

              Working...