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

Enable Infra Only mode at large scale

Walter2
Helper

Hello Accidentally I deployed all my servers at full stack, and i wanted to configure all them in Infra Only mode at once, because i have a 400 hundred deployed!!!

6 REPLIES 6

ram16
Helper

Hi Walter,

Use shell/powershell script to execute the "oneagentctl" command on remote servers.

  • Linux or AIX:
    ./oneagentctl --set-infra-only=true
  • Windows:
    .\oneagentctl.exe --set-infra-only=true
Ramanan Raghunathan

yes im trying to run a script with  .\oneagentctl.exe --set-infra-only=true, its only thing i know, but wanted to try from Dynatrace API.

Babar_Qayyum
DynaMight Guru
DynaMight Guru

Hello @Walter2 

I did not try by myself but you can give it a try. Have a look at the below link for the configuredMonitoringMode

https://www.dynatrace.com/support/help/dynatrace-api/environment-api/oneagent-on-host

Regards,

Babar

 

 

I´ll see it, thank you!!!

DanielS
DynaMight Guru
DynaMight Guru

The way to do what you want is using the Settings Objects API

  1. You need to obtain the list of HOST ID's
  2. Then you can invoke the API
    {{baseUrl}}/settings/objects?validateOnly=false
    If you use validateOnly in true, is a pre check of payload.
  3. In the body you need to pass this JSON like:
    [
    {
    "schemaId": "builtin:host.monitoring",
    "value": {
    "enabled": true,
    "fullStack": false,
    "autoInjection": true
    },
    "schemaVersion": "1",
    "scope": "HOST-74B800156D4D1103"
    }
    ]
  4. And that's all the magic, iterate until finished.

 

The true delight is in the finding out rather than in the knowing.

Thank you!!!

Featured Posts