Ad Widget

Collapse

HOST.IPx not working as expected

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #1

    HOST.IPx not working as expected

    We were working on some net.tcp.service items (Zabbix 5.0) where the host had services on IP's other than the primary ip. We already had the host dns and ip as the default agent interface. We added 2 more agent interfaces which I thought would be {HOST.IP2} and {HOST.IP3}. Basically, results were unpredictable, watching the traffic with tcpdump at the proxy, both of these macros were using IP3. Using the interface on the item worked, but we eventually want to move this to a template and that's not available.

    To circumvent, I just made user macros for each and that works. On one hand, that is a better idea, because I'd bet someone would put these interfaces in the wrong order.

    Has anyone else seen anything like this?

    Thanks
  • Semiadmin
    Senior Member
    • Oct 2014
    • 1625

    #2
    It's normal because {HOST.IP<N>} means ip of the N-th host in trigger expression, not ip of the N-th host interface.
    In template you may use an internal LLD rule zabbix[host,discovery,interfaces] and net.tcp.service as item prototype.

    Comment

    • LenR
      Senior Member
      • Sep 2009
      • 1005

      #3
      Footnote 1 says when used in item keys, it refers to interface ips. Should that be just HOST.IP without the n?

      Comment

      • Semiadmin
        Senior Member
        • Oct 2014
        • 1625

        #4
        I suppose footnote 1 doesn't say anything about a macro numeric index.

        Comment

        Working...