Task Scheduler
Introduction
The Windows Task Scheduler is a built-in utility in the Windows operating system that allows users to automate the execution of tasks at specified intervals or in response to certain events. It provides a user-friendly interface for creating, managing, and monitoring scheduled tasks, making it easier to automate repetitive or time-sensitive actions without manual intervention.
Getting Started
Compatibility
The Windows Task Scheduler O11ySource supports Microsoft Windows Server 2016 and later. Minimum PowerShell version 5.1 is required.
Data Collection Method
vuSmartMaps collects health and performance data for Windows Task Scheduler server using the Health Collection Probe of OminiAgent.
Prerequisites
Inputs for Configuring Data Source
- Server: The IP Address/FQDN of the Windows server. This field is the key to identify each server you add here.
- Period [in seconds]: How frequently data is gathered. The period should be between 60 seconds – 3000 seconds.
- **Task Path **: Enter the relative path to task(s). Eg: \Microsoft\customtasks\
Applications
Firewall Requirement
To collect data from this O11ySource, ensure the following ports are opened:
| Source IP | Destination IP | Destination Port | Protocol | Direction |
|---|---|---|---|---|
| IP address of the Windows Server | vuSmartMaps Collection/Ingress node IP | 443* | TCP | Inbound |
*Before providing the firewall requirements, please update the port based on the customer environment.
Configuring the Target
Please check permissions for task configuration files:
- The extension reads task details directly from their configuration files. These are stored relative to the base location of C:\Windows\System32\Tasks
- Ensure the files of all monitored tasks are readable by the
LOCAL_SERVICEuser account.
Configuration Steps
Metrics Collected
| Name | Description | Data Type |
|---|---|---|
| host | The IP address of the server | LowCardinality(String) |
| target | The IP address of the server | LowCardinality(String) |
| taskName | The name of the task | LowCardinality(String) |
| author | The author/owner of the task | LowCardinality(String) |
| Start_Date | Task start date | String |
| lastRunTime | The time when the task last executed | String |
| nextRunTime | The time when the task will executed | String |
| result | The result of the last execution | Float32 |
| taskState | The state of the task(Enabled/Disabled) | String |
| scheduleType | The schedule interval(Daily/Weekly/System Startup) | String |
| status | The status of the task(Running/Ready) | String |
| status_value | The value of the status | UInt8 |
| NumberOfMissedRuns | The number of missed runs for the particular task | UInt16 |
| NumberOfMissedRuns_diff | Calcualted value for the current time frame | UInt16 |
| NumberOfMissedRuns_rate | The rate of missed runs | Float32 |
| lastRunBefore | The time since last execution of the job | String |
| lastRunBeforeSeconds | The time since last execution of the job in seconds | Float32 |
| message | The message based on the result of last execution | String |
| taskPath | The path to the task | String |
| @timestamp | The timestamp in Elastic format | String |
| timestamp | The timestamp data | DateTime64 |
| o11ysource_name | Name of the O11ysource | LowCardinality(String) |
