Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-20244

If I use {#LLD_MACRO} in an expression of trigger prototype I get error: 'Cannot link template(s) invalid token starting with "{#LLD_MACRO}"'

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 5.4.6
    • Server (S)
    • None
    • Solaris 11.4, OEL 7.6

      In a temlate I create a trigger prototype with expression 

      find(/Template Oracle BFT/ora.prim.OPEN_MODE{#ALIAS_PRIM},{#SID_PRIM},#1,"like","READ WRITE")=0 and length(last(/Template Oracle BFT/ora.prim.OPEN_MODE{#ALIAS_PRIM},{#SID_PRIM}))>0 and ((time()<{#MAINT_START_PRIM} and time()>{#MAINT_END_PRIM}) or {TRIGGER.VALUE}=1)

      Get an error when  server performs autoregistration a host:

      'Cannot link template(s) invalid token starting with "{#MAINT_START_PRIM} and time()>{#MAINT_END_PRIM}) or {TRIGGER.VALUE}=1)"'

      Template linked without trigger prototype.

      When I link template in a frontend I get no errors and template linked correctly and trigger created with expected value of {#MAINT_START_PRIM} and {#MAINT_END_PRIM}.

      find(/Template Oracle BFT/ora.prim.OPEN_MODE{#ALIAS_PRIM},{#SID_PRIM},#1,"like","READ WRITE")=0 and length(last(/Template Oracle BFT/ora.prim.OPEN_MODE{#ALIAS_PRIM},{#SID_PRIM}))>0 and ((time()<240000 and time()>000000) or {TRIGGER.VALUE}=1)

       

      If I quoted {#LLD_MACRO} in expression

      find(/Template Oracle BFT/ora.prim.OPEN_MODE{#ALIAS_PRIM},{#SID_PRIM},#1,"like","READ WRITE")=0 and length(last(/Template Oracle BFT/ora.prim.OPEN_MODE{#ALIAS_PRIM},{#SID_PRIM}))>0 and ((time()<"{#MAINT_START_PRIM}" and time()>"{#MAINT_END_PRIM}") or {TRIGGER.VALUE}=1)

      template linked to host without errors when  server performs autoregistration a host. Triggers also created when discovery executed.

      Trigger created with quoted value of LLD macro

      find(/Template Oracle BFT/ora.prim.OPEN_MODE{#ALIAS_PRIM},{#SID_PRIM},#1,"like","READ WRITE")=0 and length(last(/Template Oracle BFT/ora.prim.OPEN_MODE{#ALIAS_PRIM},{#SID_PRIM}))>0 and ((time()<"240000" and time()>"000000") or {TRIGGER.VALUE}=1)

       

      In the Zabbix server 5.0 version this error does not reproduce.

       

            agavrilovs Aleksandrs Petrovs-Gavrilovs
            k.mankov Konstantin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: