-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
5.4.6
-
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.