Ad Widget

Collapse

Trigger Prototype - issue with LLD variable within the expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jjahn
    Junior Member
    • May 2017
    • 7

    #1

    Trigger Prototype - issue with LLD variable within the expression

    I have a UserParameter to define logs locations and the regex expressions to identify the row in the item and then have trigger expression. Looks like this:

    {
    "data": [
    ** * * * * {"{#LOG}":"/tmp/poc/logs/poc_process_1.log","{#MATCH_REGEX}":"error","{#ERR _MSG}":"This is abc issue","{#ERR_REGEX}":"error|problem","{#ENCODING} ":"","{#MAXLINES}":"1","{#MODE}":"","{#OUTPUT}":"" ,"{#MAXDELAY}":""}
    ]
    }


    The item data comes in fine and I can see it using monitoring-->latest data.

    When I use this expression with hardcoded regexp parameter, I am able to have the problem raised.

    {t_task_app_log:log[{#LOG},{#MATCH_REGEX},{#ENCODING},{#MAXLINES},{#MO DE},{#OUTPUT},{#MAXDELAY}].regexp("error|problem")}=1

    However, when I use the LLD variable within the expression, it never works. I tried with and without double quotes. I tried the str function and it too has the same issue.

    {t_task_app_log:log[{#LOG},{#MATCH_REGEX},{#ENCODING},{#MAXLINES},{#MO DE},{#OUTPUT},{#MAXDELAY}].str("{#ERR_REGEX}")}=1


    Just to be sure, I put the {#ERR_REGEX} in the trigger title, and I can see the right value within the trigger title on the configuration-->host-->item page...so I know all these #values are coming in ok.

    Any suggestions on how to triage...or what might be off in expression?
  • ovas
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Apr 2017
    • 138

    #2
    Hello!

    I believe the functionality of using LLD Macros in trigger function expressions is only to be released in next major release:

    Comment

    Working...