Ad Widget

Collapse

Value not interpolated in trigger name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • john_lynch
    Junior Member
    • Jan 2022
    • 3

    #1

    Value not interpolated in trigger name

    Hi all...

    I am new to Zabbix, and my first task is to fix an issue with a trigger name.

    We have the
    Code:
    {ITEM.LASTVALUE}
    macro in a trigger name, but the code gets rendered literally, i.e. the value is not interpolated. (See first screenshot.)

    I first tried to use
    Code:
    {HOST.HOST}, {HOST.IP} and {HOST.DESCRIPTION}
    in the name, but none of these worked either - only
    Code:
    {HOST.HOST}
    works out of these 4.

    If I look at "Event Details", I see the string rendered correctly (see 2nd screenshot) but when I receive the data via the API, I get

    PHP Code:
    [11] => stdClass Object (
        [
    triggerid] => 29010
        
    [expression] => {46420}>30
        
    [description] => High number ( {ITEM.LASTVALUE} ) recordings not uploaded on finland-nuc.spearline.com
        
    [url] =>
            ... 
    The documentation at https://www.zabbix.com/documentation...ed_by_location clearly states that it is supported in Trigger names and descriptions.

    I'm guessing I may be missing something obvious. After considerable searching I seem no nearer to finding the solution. Can anyone help please?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    TBH, I have never tried it.. but maybe its one of these
    expandComment flag Expand macros in the trigger description.
    expandDescription flag Expand macros in the name of the trigger.
    expandExpression flag Expand functions and macros in the trigger expression.

    Comment

    Working...