# Run a workflow to check oneagent version

**URL:** <https://community.dynatrace.com/t/run-a-workflow-to-check-oneagent-version/51092>\
**Category:** Automations\
**Tags:** dql, oneagent, workflows, site-reliability-guardian\
**Created:** [April 7, 2025, 10:32am UTC](https://community.dynatrace.com/t/run-a-workflow-to-check-oneagent-version/51092 "2025-04-07T10:32:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathanieltat](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/nathanieltat/32/17660_2.png) [@Nathanieltat](https://community.dynatrace.com/u/Nathanieltat)\
**Post date:** [April 7, 2025, 10:32am UTC](https://community.dynatrace.com/t/run-a-workflow-to-check-oneagent-version/51092/1 "2025-04-07T10:32:41Z")

</div>

Im wanting to run a workflow task to check oneagent updates and if they are upto date sends out an Successful email with the ones updated and if not up to date sends out a non successful email with the list of ones that are not up to date but cannot find a DQL query for oneagent versions. Is there a way to use SRG to do this?

---

<div class="post-metadata">

**Author:** ![marco\_irmer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marco_irmer/32/3038_2.png) [@marco\_irmer](https://community.dynatrace.com/u/marco_irmer)\
**Post date:** [April 7, 2025, 5:22pm UTC](https://community.dynatrace.com/t/run-a-workflow-to-check-oneagent-version/51092/2 "2025-04-07T17:22:10Z")

</div>

In DQL you can use the installerVersion field on the host entity to see what the OneAgent version is.

```javascript
fetch dt.entity.host
| fieldsAdd installerVersion

```

I hope this helps.

---

<div class="post-metadata">

**Author:** ![Nathanieltat](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/nathanieltat/32/17660_2.png) [@Nathanieltat](https://community.dynatrace.com/u/Nathanieltat)\
**Post date:** [April 9, 2025, 9:34am UTC](https://community.dynatrace.com/t/run-a-workflow-to-check-oneagent-version/51092/3 "2025-04-09T09:34:33Z")

</div>

That works perfectly thank you, is there a way to check what the newest one agent version is and compare it to that list that generates if its up to date send out a successful email if its not up to date send out an unsuccessful email like the attached workflow

 ![basic workflow.png](https://global.discourse-cdn.com/dynatrace/original/3X/b/d/bd154ff8b6705999c1c29c936860d2359836ab70.png)

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [April 9, 2025, 11:05am UTC](https://community.dynatrace.com/t/run-a-workflow-to-check-oneagent-version/51092/4 "2025-04-09T11:05:17Z")

</div>

you can try to build a JS using&nbsp;clusterVersionClient.getVersion();

> **[clusterVersionClient​ - Classic environment v1 | Dynatrace Developer](https://developer.dynatrace.com/develop/sdks/client-classic-environment-v1/#clusterversionclient)**
>
> Documentation of the Dynatrace Classic Environment API v1. To read about use cases and examples, see Dynatrace Documentation. | Client for the Dynatrace Classic Environment API v1

---

<div class="post-metadata">

**Author:** ![sanjeetsingh390](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sanjeetsingh390](https://community.dynatrace.com/u/sanjeetsingh390)\
**Post date:** [November 14, 2025, 1:02pm UTC](https://community.dynatrace.com/t/run-a-workflow-to-check-oneagent-version/51092/5 "2025-11-14T13:02:11Z")

</div>

can you please help me with this query…  
query to get oneagent version as per hostgorup in dynatrace using DQL
