Ad Widget

Collapse

Use LLD macro as function argument in trigger expression?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • semue
    Junior Member
    • Jan 2015
    • 13

    #1

    Use LLD macro as function argument in trigger expression?

    Hi there!
    I've set up an ecosystem of hosts inheriting macros from their ancestors. These macros are used to configure trigger thresholds, as in the following trigger expression 1:
    Code:
    {Basic:LogSize.last(0)}>{$TR_LOG_SIZE_MAX}
    So far, so easy. Now I'm also using low-level discovery to create trigger thresholds. Since zabbix 2.0.8 does not allow me to compare my item value to a low-level-discovered macro, I resorted to setting up item prototypes as a kind of proxy, as in trigger expression 2:
    Code:
    {Basic:Connection[{#CONNECTION_NAME},AGE].last(0)}>{Basic:MaxConnection[{#CONNECTION_NAME},AGE].last(0)}
    , wherein the item MaxConnection is just a calculated item with formula
    Code:
    {$TR_{#CONNECTION_NAME}_AGE_MAX}
    That's not beautiful, but it works. Now the really difficult part is to have the "0" in "last(0)" configurable by a macro. What I'm trying to achieve is something like trigger expression 3:
    Code:
    {Basic:Connection[{#CONNECTION_NAME},SIZE].delta({$TR_{#CONNECTION_NAME}_SIZE_MAX})}=0
    but that just yields an error "Cannot implode expression". Trying to substitute the macro again by a low-level-discovered item (similar to trigger expression 2 above) also yields "Cannot implode expression".

    Is there some way to have the arguments to trigger functions be generated by low level discovery? Again: I'm using Zabbix 2.0.8 (just waiting for 3.0.2 for the big upgrade...)

    Best wishes,
    Semue
Working...