Ad Widget

Collapse

Trigger Expression - Last Text Value Contains

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel4711
    Senior Member
    • Jul 2014
    • 126

    #1

    Trigger Expression - Last Text Value Contains

    Hello everyone,

    I would like a trigger to fire when:
    1. the last determined value of Item-A is 1
    and
    2. the word FileRenameOperation does not appear in the last determined string of Item-B.

    The expression below would work if only FileRenameOperation was present in the string of the item.

    Unfortunately, there is more text before or after it.

    I'm sure you can use REGEX with a Wildcard here, but I don't have the parameters for it.

    Does anyone have any ideas?

    Code:
    last(/t_task_app_mon_windowsupdate/Winupdates.RebootRequired,#1)=1
    and
    last(/t_task_app_mon_windowsupdate/Winupdates.RebootRequiredReason,#1) <> "FileRenameOperation"
    Thank you very much!
    Daniel​
  • Daniel4711
    Senior Member
    • Jul 2014
    • 126

    #2

    I've made some progress in the meantime.

    Unfortunately, it still doesn't work as desired.

    The documentation provides a good example which should actually work:


    These values were determined and should be checked in the trigger:
    WinUpdates.RebootRequired: 1
    WinUpdates.RebootRequiredReason: FileRenameOperation: \??\C:\Windows\Temp\0db4763d-2c01-4e34-9f12-3057150ae95f.tmp

    The trigger should only start if the word FileRenameOperation does not occur in WinUpdates.RebootRequiredReason.

    Unfortunately, it does not work and hosts with this message still have the trigger set to Problem.

    Code:
    last(/t_task_app_mon_windowsupdate/Winupdates.RebootRequired,#1)=1
    and
    find(/t_task_app_mon_windowsupdate/Winupdates.RebootRequiredReason,#1,"like","FileRenameOperation")=0

    Comment

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

      #3
      With multipart expressions its sometimes a bit tricky... Triggers are recalculated each time, when any of used items receives new value... so it may happen, that your RebootRequired received a value but RebootRequiredReason did not yet receive value...

      Comment

      Working...