Ad Widget

Collapse

Question about triggers for strings

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thenextuser
    Junior Member
    • Jul 2021
    • 2

    #1

    Question about triggers for strings

    Hello,

    I have an item which is either empty (has no value) or contains a (different) string.
    I now want to fire a trigger as soon as this item is not empty, i.e. as soon as the item contains a string.

    Like this:
    Item [empty] > all good
    Item [string123] > trigger


    Unfortunately I can't get this to work.
    What is the correct and right way to achieve this.

    I'm not getting anywhere here and need help.
    Thank you very much for your efforts.


    Zabbix version: 5.4
    Client running Zabbix agent.
  • thenextuser
    Junior Member
    • Jul 2021
    • 2

    #2
    Hello,

    I have already figured it out.
    My tigger is now:

    length(last(/host/item))>0

    So it works exactly as I want it to.
    If the value is empty, no trigger is fired.
    If the value contains any string, the trigger is fired.

    Maybe this will help someone.
    Many greetings.

    Comment

    Working...