Ad Widget

Collapse

icmppingsec con macros

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rafalcaide
    Junior Member
    • Feb 2019
    • 5

    #1

    icmppingsec con macros

    Hola, tengos host configurados en zabbix con varias interfaces con distinta ip, tengo creado un item icmppingsec con los valores por defecto y monitoriza la interfaz 1, quiero crear otro para monitorizar la interfaz 2, sin embargo no soy de capaz de configurarlo para que mediante macros consulte la interfaz correspondiente.
    He intentado usar {HOST.IP2} ó {HOST.CONN2} sin embargo siempre obtengo el mismo mensaje en el log:

    error reason for "hostname:icmppingsec[{HOST.IP2},3,3000,24,1000,avg]" changed: fping failed: {HOST.IP2}: Name or service not known

    Gracias, un saludo.
  • Hernandes Martins
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Apr 2011
    • 900

    #2
    Hola amigo

    Mira,



    INDEXED MACROS


    The indexed macro syntax of {MACRO<1-9>} is limited to the context of trigger expressions. It can be used to reference hosts in the order in which they appear in the expression. Macros like {HOST.IP1}, {HOST.IP2}, {HOST.IP3} will resolve to the IP of the first, second and third host in the trigger expression (providing the trigger expression contains those hosts).

    Additionally the {HOST.HOST<1-9>} macro is also supported within the {host:key.func(param)} macro in graph names. For example, {{HOST.HOST2}:key.func()} in the graph name will refer to the host of the second item in the graph




    __

    Att.
    Hernandes Martins - Zabbix Trainer

    Zabbix Brazil Partner - www.luniobr.com

    Zabbix Brazil Community - www.zabbixbrasil.org

    Blog: hernandesmartins.blogspot.com.br

    Skype: hernandss
    Telegram: @MrHernandes

    Español
    Facebook: facebook.com/groups/zabbixlatam
    Telegram: https://t.me/ZabbixEspañol

    Português
    Facebook: facebook.com/groups/zabbixbrasil/
    Telegram: https://t.me/ZabbixBrasil

    Comment

    • markfree
      Senior Member
      • Apr 2019
      • 868

      #3
      ¿Intentó utilizar la macro {HOST.CONN} seleccionando una interfaz específica?

      Ejemplo:
      2 items que usan la misma macro {HOST.CONN}, pero la interfaz de cada item es diferente.
      Click image for larger version  Name:	KEYS.PNG Views:	0 Size:	9.8 KB ID:	423820
      Click image for larger version  Name:	interface1.PNG Views:	0 Size:	4.7 KB ID:	423821Click image for larger version  Name:	interface2.PNG Views:	0 Size:	4.7 KB ID:	423822
      Cambié el timeout para diferenciar la key.


      otra alternativa sería crear macros para el host
      Click image for larger version  Name:	macros.PNG Views:	0 Size:	4.4 KB ID:	423824

      Click image for larger version  Name:	macros_keys.PNG Views:	0 Size:	7.0 KB ID:	423823

      el gráfico confirma que las dos interfaces son diferentes
      Last edited by markfree; 29-04-2021, 18:18.

      Comment

      Working...