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?

8 REPLIES 8

Julius_Loman
DynaMight Guru
DynaMight Guru

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

Certified Dynatrace Master | Alanata 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
DynaMight Guru
DynaMight 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
DynaMight Guru
DynaMight 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
DynaMight Advisor
DynaMight Advisor

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?

HigherEd

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.

 

HigherEd

Hello @ct_27 

If we do not provide the maintenance windows when the OneAgent update can start. If there is no value and an update should be performed, the update will start at the earliest convenience.

In the same way, we can updates the configuration of OneAgent auto-update in the specified host group level as well.

Regards,

Babar