Extend the platform,
empower your team.
Monitor the state and execution of your tasks set up in Windows Task Scheduler.
Extension by DynatraceThis 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.
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 (ext:tech:tasks.time_since_exec
).
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.
Microsoft Windows 2012 R2 and newer.
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:
%PROGRAMFILES%\dynatrace\oneagent\plugin_deployment
/opt/dynatrace/oneagent /plugin_deployment
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:
Add each task on a new line, using the format {task-name}:{timeout}
(e.g. MyTask:2
)
Example common formats:
* 24/03/2022 15:02:33 translates to %d/%m/%Y %H:%M:%S
* 03/24/2022 3:02 PM translates to %m/%d/%Y %H:%M %p
{domain}\{account}
username
field.Manual collection mode
was 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:
powershell.exe
-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.
Fixed in this version
No release notes