Ad Widget

Collapse

Trigger prototype and see operational data of other prototype

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brambo
    Senior Member
    • Jul 2023
    • 245

    #1

    Trigger prototype and see operational data of other prototype

    In my discovery rule I create to items
    1 containing a numeric value
    1 containing a string value
    In my trigger prototype I use the numeric to create expression.
    Code:
    last(/templatename/component.[{#NAME}],#2)=1
    And this works fine for creating and resolving of the problems.
    However I would like to have the item value of the item with key:
    I tried:
    Code:
    {?last(/templatename/component.description.[{#NAME}])}
    and
    Code:
    {?last(//component.description.[{#NAME}])}
    In the Operational data field but both don't seem to work? The {ITEM.VALUE} works just fine.
    Zabbix 6.4.13
    Last edited by Brambo; 11-04-2024, 17:33.
  • Answer selected by Brambo at 12-04-2024, 11:46.
    kyus
    Senior Member
    • Feb 2024
    • 172

    Originally posted by Brambo
    Code:
    {?last(/templatename/component.description.[{#NAME}])}
    and
    Code:
    {?last(//component.description.[{#NAME}])}
    Those expressions are using an old syntax. You should build your trigger expressions in the same way you did in the first code.

    I'm not entirely sure about what you're trying to do since the first expression was working. So, if you can explain your objective a bit more, maybe I'll be able help you achieve what you need.

    Best regards.

    Comment

    • kyus
      Senior Member
      • Feb 2024
      • 172

      #2
      Originally posted by Brambo
      Code:
      {?last(/templatename/component.description.[{#NAME}])}
      and
      Code:
      {?last(//component.description.[{#NAME}])}
      Those expressions are using an old syntax. You should build your trigger expressions in the same way you did in the first code.

      I'm not entirely sure about what you're trying to do since the first expression was working. So, if you can explain your objective a bit more, maybe I'll be able help you achieve what you need.

      Best regards.

      Comment

      • Brambo
        Senior Member
        • Jul 2023
        • 245

        #3
        Yeah it seems the {? } part wasn't needed, I copied this from a calculated item and now tested it without the brackets and ? and the data is shown with the value when the problem is created.
        It doesn't dynamic update but as far as I know that is by design

        Comment

        Working...