Monitor the state and execution of your tasks set up in Windows Task Scheduler.
This is a OneAgent Extension that, given a list of Scheduled Tasks, is able to monitor their current execution state every minute and automatically raise Problems if any of these tasks have not completed successfully or are running past their expected execution timeout.
Microsoft Windows 2012 R2 and newer.
This extension creates two metrics that are used to track the State a task is in (
ext:tech:tasks.task_state) and the Time since its last execution (
The extension automatically raises Problems when a task did not finish with a positive result code or when it is still in Running state and the given timeout period has passed.
This extension is developed with the Dynatrace Extensions 1.0 Framework. This means that the .zip archive you have been provided with must be deployed on every OneAgent host that should run it.
Upload the .zip file and then extract it in the extension deployment directory on the OneAgent host. By default, this is found at:
Once the extension is deployed to each OneAgent, this must also be uploaded to Dynatrace. Open the Dynatrace UI and navigate to Settings > Monitored technologies > Custom extensions tab, then click Upload extension and upload the same zip archive you have been provided with.
Once the extension appears in the list below you can move to the next step:
OneAgent extensions allow for two levels of configuration: global or per host. Every host capable of running the extension will use the global configuration unless it is configured to override it with its own configuration.
Configurations can be found in the following places:
Regardless of the option chosen above, the configuration is the performed the same way.
Configuration parameters explained:
%m/%d/%Y %H:%M %p
Manual collection modewas selected, this field specifies in which folder the data is being collected.
In highly locked down systems, the only way to retrieve the task details is by setting up a Scheduled Task to collect this information. If this is your situation, then you need to create a Scheduled Task that runs every minute, and has the following Action configured:
-Command "Get-ScheduledTask | Select TaskName, State | ConvertTo-Csv > C:\Temp\scheduledtasks.csv; Get-ScheduledTask | Get-ScheduledTaskInfo | Select LastRunTime, LastTaskResult, TaskName | ConvertTo-Csv > C:\Temp\scheduledtasksinfo.csv"
Note: the above example uses the
C:\Temp directory to publish the collected data. This can be changed in the arguments of the task. Whatever directory you end up choosing, you must also add this in the Data folder configuration parameter of the extension.
Extend the platform,
empower your team.