01 Jun 2023 09:36 PM - last edited on 02 Jun 2023 08:43 AM by MaciejNeumann
is switching licenses to specific kubernetes hosts (infra vs full stack) something that is doable based on kubernetes specific host labels / annotations?
Solved! Go to Solution.
01 Jun 2023 09:55 PM - edited 01 Jun 2023 10:08 PM
Hello @moses_chacko . Yes, you can do it easily using the API.
1.-Query the entities API to obtain the list of HOST ID's: for example
type(HOST),kubernetesLabels(kubernetes.io/arch:amd64)
2.-Now you can use the Setting Object API to change from infra to full stack (use the HOST ID's from 1 in scope):
[ {
"schemaId": "builtin:host.monitoring",
"value": {
"enabled": true,
"fullStack": true,
"autoInjection": true
},
"schemaVersion": "1",
"scope": {"HOST-74B8001XXXXXX",
"HOST-74B80016YYYYYYYY",
} }]
02 Jun 2023 02:47 AM
thanks @DanielS. Is my understanding correct that this will be a separate API step to after the Kubernetes specific host labels and annotations are set.
02 Jun 2023 07:39 AM
@moses_chacko / @DanielS I'd not recommend doing this on hosts managed by Dynatrace Operator as the setting may not persist and it won't be automated when the cluster is scaled. Instead, you should configure the operator with multiple dynakubes configurations: