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

Is there a way to update a Onagent to the latest version using the Dynatrace Rest API?

dirk_hermans
Newcomer

Is there a way to update a Onagent to the latest version using the Dynatrace Rest API?

7 REPLIES 7

Julius_Loman
Leader

No, this feature is not available in the Environment or Configuration API in current versions.

TEMPEST a.s., Slovakia, Dynatrace Master Partner

yasmeen_hazy1
Dynatrace Helper
Dynatrace Helper

Hi,

You can download the OneAgent from the environment API. You have three options here:

You can specify the version you need, or simply download the current latest version.


Downloading the new OneAgent where the current OneAgent exists will be the same as updating the version of your current OneAgent.

ChadTurner
Guru

Currently there is no method to push a Dynatrace Oneagent via the API, there are only Get commands. All updates have to be done via the API or manually on each server by launching the MSI file

-Chad

ChadTurner
Guru

Freshly announced, there is now an EAP for a oneagent API. If you'd like to sign up for that EAP, click the following link: https://www.dynatrace.com/news/blog/manage-thousands-of-hosts-with-the-new-oneagent-on-a-host-rest-a...

This might help fulfill your request.

-Chad

ct_27
Helper

Is there still no way to do this?   I need to update the OneAgent on our Linux servers doing DEV, TEST, then PRD groups in order.  The Update Maintenance Window feature doesn't come at my problem from the correct direction: I don't want to do it to all hosts as the Settings -> Preferences -> OneAgent Updates screen allows.  I don't want to click into each host to assign it a maintenance window as that's a lot of work (over 1,000 hosts).   If no option to initiate the update via API   maybe I can update the host configuration and set the Update Maintenance Window via API.   Lots of work for something that should be much easier.    

 

Any suggestions?

Hello @ct_27 

Did you get a chance to look into the below link?

https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/oneagent-configuration/oneage...

Regards,

Babar

Thank you. It could solve my issue but not exactly as I wanted.  Correct me if I'm wrong, but it does not appear that the API can directly trigger an Update to occur.   

 

What it can do, is I can iterate over a list of Host Entity IDs and call the API to set a Update Maintenance Window OR I can iterate over a list of Host Entity IDs and set the AutoUpdate to Enabled....wait 60 minutes....then run the same script to set AutoUpdate to Disabled.