Run a workflow to check oneagent version

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?

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

fetch dt.entity.host
| fieldsAdd installerVersion

I hope this helps.

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

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

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