Ad Widget

Collapse

How to monitor Windows 1 task in Task Scheduler

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Renate
    Member
    • Apr 2008
    • 34

    #1

    How to monitor Windows 1 task in Task Scheduler

    Hello,

    I hope that someone can help me with this.

    I want to monitor 1 task in the Task Scheduler on a windows server 2016 Standard server. I want to check if the result is (0x0).
    Working with Zabbix 3.4.1

    I want to do this without script.

    Can anybody tell me how to do this please?
  • MarekHanus
    Junior Member
    • Feb 2018
    • 9

    #2
    I think you could focus on Event log monitoring. See https://www.zabbix.com/documentation...s?s[]=eventlog

    You can catch events about Task scheduler tasks from Windows event log and then trigger them based on EventID or string in value for example.

    I have similar item created:
    Name: Task scheduler
    Type: Zabbix agent (active) -- zabbix agent in active mode is necessary
    Key: eventlog[Microsoft-Windows-TaskScheduler/Operational,,,,,,skip]
    Type of information: Log

    Hope this help you.

    Comment

    • Renate
      Member
      • Apr 2008
      • 34

      #3
      Thank you for your reply MarekHanus

      I have made some similar item:

      Type: Zabbix agent (active)
      Key: eventlog[Microsoft-Windows-TaskScheduler/Operational,"\job name",,TaskScheduler,,,skip]
      Type of information: Numeric (unsigned) --> changed it to log

      and trigger:

      eventlog[Microsoft-Windows-TaskScheduler/Operational,"job name",,TaskScheduler,,,skip].last()}<>0

      both are green/ enabled in zabbix, but when i let the task crash the trigger does not go off

      Comment

      • MarekHanus
        Junior Member
        • Feb 2018
        • 9

        #4
        I guess it is not possible to use last() function because event log returns string.

        I have been using this expression for similar triggers

        {Template OS Windows Event Log:eventlog[Microsoft-Windows-TaskScheduler/Operational,"\Monitoring sender",,,201,,skip].str(return code 0.)}=0

        Comment

        • Renate
          Member
          • Apr 2008
          • 34

          #5
          I have adept the last() function to your example. But it still didn't work.

          So a have made the same trigger on an other server with Windows server 2008 R2 and that works fine, but on the new server windows server 2016 Standard the trigger doesn't work :-(

          Comment

          • Renate
            Member
            • Apr 2008
            • 34

            #6
            I found out what was wrong. In de zabbix agent conf de Host name was not exactly the same as in Zabbix. When that was fixed, the trigger worked just fine.
            Everything is working now, happy

            Thank you for your help

            Comment

            • zabbix_IT
              Junior Member
              • Dec 2022
              • 3

              #7

              Hi,

              I wanna monitor different windows scheduled tasks on a windows server 2016. Is the use of eventlog[] via item and trigger still up to date?
              How does it work?
              I am using zabbix agent 2 and zabbix 6.0.

              Thanks.​

              Comment

              Working...