Ad Widget

Collapse

Windows Scheduled Task Trigger Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adavis373315
    Junior Member
    • Aug 2024
    • 8

    #1

    Windows Scheduled Task Trigger Problem

    Hello forum!

    I have recently implemented a discovery rule that will discover all tasks in a certain task path, and this rule returns the last run result, last run time, and next run time. Each item is checked on a 5m interval as set in the template. The issue is the trigger and how it gives off false positives more than actual problematic alerts. The trigger rule is below

    min(/Template Windows Scheduled Tasks for iPFS/TaskSchedulerMonitoring[TaskLastResult,{#APPTASKS}],#10)<>0 and min(/Template Windows Scheduled Tasks for iPFS/TaskSchedulerMonitoring[TaskLastResult,{#APPTASKS}],#10)<>267009
    and min(/Template Windows Scheduled Tasks for iPFS/TaskSchedulerMonitoring[TaskLastResult,{#APPTASKS}],#10)<>1

    Does this trigger expression mean that if the last 10 last run results aren't equal to all of the following then fire the trigger? If the interval time for the last result is 5m does this mean it has to get data for 50mins first and then fire if true?

    I have been struggling to find better ways to implement this and may just go with creating a trigger rule for each type of error with a new expression for each one. I am using Zabbix 6.0.24. We have a ton of scheduled tasks that have different frequencies of running (some every 1min, 5min, 30min, once a day, etc.)

    Please help and let me know if I am needing to provide more information.

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

    #2
    yes... #10 is number of checks... if those are done in 5m intervals, then it calcualtes over last 50 minutes, does it every time a new value comes in, so its kind of rolling window.

    Comment


    • adavis373315
      adavis373315 commented
      Editing a comment
      Ahh, I see your point on it being a rolling window. Am I using the wrong trigger expression function for this then? Basically, I am needing to see if the last run result isn't equal to "0","267009", or "1" for the last 10 checks as if it wasn't then this would indicate a scheduled task isn't working properly. There may be a better function to use for this

      I created an email rule about this, but some of the tasks that run more frequently don't seem to follow the trigger expression. For example, I have a task that runs every 1m on a host, and an email is sent after about 5 ~ 10m even though I figured it would take longer since the item interval time is checked 5m. I am guessing it goes off the last item value, and since it will change quite often because of the frequency of the task running then it makes sense why I get emails for certain task that there is a problem.
  • adavis373315
    Junior Member
    • Aug 2024
    • 8

    #3
    For some reason the expression I have isn't working properly. Can someone help me understand exactly how min and max trigger expressions work? Do I need to use the count function alongside with the min or max function?

    The trigger keeps popping off and alerting on false positives, but I thought it would work like "if the last 10 checked values that Zabbix received aren't equal to 0, 267009, or 1 then alert" This doesn't seem to be the case?

    I would greatly appreciate some clarity for this

    Comment

    Working...