cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Metadata on processes triggered by task scheduler Windows jobs

elenaperez
Dynatrace Contributor
Dynatrace Contributor

I've been following this documentation to add metadata on the process level. However, what happens if the processes are triggered by task scheduler Windows jobs? They're neither IIS nor Windows services related so it's not documented. How is it possible to add metadata to those?

3 REPLIES 3

radek_jasinski
DynaMight Guru
DynaMight Guru

To add metadata to processes triggered by Windows Task Scheduler jobs in Dynatrace, you can use the OneAgent extension designed for Windows servers. This extension regularly interrogates the system for details about your configured scheduled tasks and sends this data to Dynatrace. It includes the current state of each task and the time elapsed since their last executions. The extension can automatically create problems for tasks that have failed to complete successfully, are taking longer than expected, or have missed their scheduled executions​​.

To get started, you need to add this extension to your Dynatrace environment and set up a monitoring configuration. In the configuration process, you'll need to:

  1. Select a scope for the configuration and provide details about which tasks you want to monitor.
  2. In the Scheduled Tasks Configuration section, provide a date/time format matching your Windows system and select a data collection mode. The modes include running commands as the default user, impersonating a custom user, or setting up a manual task to collect data​​.
  3. In the Tasks to Monitor section, add each task you want to monitor by clicking the "Add item" button. For each task, provide its name as it appears in Task Scheduler and optionally set thresholds for timeouts and execution frequency to automatically raise problems if these thresholds are exceeded​​.

This solution should allow you to effectively monitor and add metadata to processes initiated by Windows Task Scheduler jobs.

Have a nice day!

Thank you very much for your response, Radek. But how do I add the metadata to those processes? Where do I add the environment variable?

Hello Radek,

I have configured the extension and can see the scheduled task in Dynatrace. However, I added the metadata on the properties, and that doesn't apply correctly for some reason (in the properties, I would like to see the value of the environment variable). Even though I have added the argument with the DT_CUSTOM_PROP.

elenaperez_0-1703238030318.png

 

Featured Posts