Ad Widget

Collapse

Question/problem with HOST.IP<1-9>

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Harris
    Junior Member
    • Jan 2007
    • 24

    #1

    Question/problem with HOST.IP<1-9>

    Greetings,

    I'm trying to understand how {HOST.IP<1-9>} works.

    Some servers that I'm monitoring, have multiple IP address
    (For example and logs, I will replace the wan ip to 8.8.8.8 and vpn ip to 10.10.10.10)

    - First IP is the main wan ip.
    - Second IP is the vpn ip. (Not all servers have VPN)

    I've created 2 different items to monitor the connection and the VPN.

    First item for wan: icmppingsec[{HOST.IP1},,,,10000,]
    Second item for vpn: icmppingsec[{HOST.IP2},,,,10000,]

    The weird thing is that zabbix_proxy is resolving both macros to the main IP instead of the second ip listed at host configuration.

    A quick sample of zabbix_proxy.log with debuglevel set to 4:

    Code:
     25491:20130415:111834.364 In substitute_key_macros() data:'icmppingsec[{HOST.IP1},,,,10000,]'
     25491:20130415:111834.364 In substitute_simple_macros() data:'{HOST.IP1}'
     25491:20130415:111834.364 End substitute_simple_macros() data:'8.8.8.8'
     25491:20130415:111834.364 End of substitute_key_macros():SUCCEED data:'icmppingsec[8.8.8.8,,,,10000,]'
    
     25491:20130415:111836.418 In substitute_key_macros() data:'icmppingsec[{HOST.IP2},,,,10000,]'
     25491:20130415:111836.418 In substitute_simple_macros() data:'{HOST.IP2}'
     25491:20130415:111836.418 End substitute_simple_macros() data:'8.8.8.8'
     25491:20130415:111836.418 End of substitute_key_macros():SUCCEED data:'icmppingsec[8.8.8.8,,,,10000,]'
    - what am I doing wrong here? Why HOST.IP2 doesn't returns 10.10.10.10?
    - A second question would be: If HOST.IP3 doesn't exist, and I create an item 'icmppingsec[{HOST.IP3},,,,10000,]', would it return 0 or it will use the default ip?

    edit: Zabbix Version 2.0.5
    Thank you!
    Last edited by Harris; 15-04-2013, 11:49. Reason: Insert Zabbix Version
  • Harris
    Junior Member
    • Jan 2007
    • 24

    #2
    Hello,

    Just as an update:

    I've already solved this using host macros, so it's not a problem anymore on my side.

    Now I'm just trying to understand how {HOST.IP<1-9>} should work and why both are returning only the main ip.

    Any input on that?

    Thanks

    Comment

    • MiZde
      Junior Member
      • May 2013
      • 3

      #3
      Hello,

      I found this answer in japanese forum (http://www.zabbix.jp/node/1953)
      I think like icmpping and "simple check", the item "Zabbix agent (active)" and, and were not available

      https://www.zabbix.com/documentation...acros/supporte ...

      > [2] Since 2.0.3 HOST. * Macros supported in item keys will only work for item types that have interfaces.
      > Eg they will not work for types "Zabbix agent (active)", "Calculated" etc.

      Comment

      • zalex_ua
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2009
        • 1286

        #4
        FYI - https://support.zabbix.com/browse/ZBX-6737

        Comment

        Working...