Ad Widget

Collapse

Trigger for text value item - boolean on last text value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • erasedhammer
    Member
    • Aug 2020
    • 58

    #1

    Trigger for text value item - boolean on last text value

    I am on Zabbix 6.2.4 and have a script that collects the status of interfaces on freebsd (pfsense), which returns a text value of active or inactive (thanks bsd for not having /sys/class/net)

    I am trying to build a trigger so any time that the returned text value is NOT active, it triggers. But it appears the trigger expression builder expects to only parse numeric values... an unfortunate limitation.

    I saw some stuff online, but its very limited. So far I have tried this:
    {last(/host/system.wan.status).str(active)}=0

    But zabbix says
    • Invalid parameter "/1/expression": incorrect expression starting from "{last(/host/system.wan.status).str(active)}=0".
    Whats wrong?
    How can I compare the last value of the item to a string?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    There is no str function. use "find"

    Comment

    Working...