Ad Widget

Collapse

Trigger Expression to fire on if a string is found

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rickw
    Junior Member
    • Oct 2023
    • 9

    #1

    Trigger Expression to fire on if a string is found

    Hey all,

    I have burned a couple hours on this... I have a dependant item that grabs the OS version (Windows 11 Enterprise, Windows 10 Pro) etc. I'm trying to define a trigger that will fire when my item key contains "Windows 10". I can not for the life of me get this to work. I have tried last() and that was a bust: last(/Cutom Template OS Windows - Base/systemfact.os)="Windows 10"

    Searching around I get this result: {CustomTemplate OS Windows - Base:systemfact.os.str("Windows 10")}=1

    Any help would be GREATLY appreciated...

    I'm on Zabbix 6.0.41
  • Rickw
    Junior Member
    • Oct 2023
    • 9

    #2
    Update, I found this in the documentation... Trying it now but doesn't seem to work:

    find(/Template OS Windows - Base/systemfact.os,,"like","Windows 10")=1

    Also the systemfact.os is a dependant itemkey from systemfact. It's a custom PS script that runs

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4806

      #3
      Find should be correct way to go.. But as it is a dependent item, then it will receive new value only if master item receives it. But you need a new value for a trigger to be recalculated.
      You can also try with iregexp instead of like, even if it should work with like anyway...

      Comment

      Working...