is switching licenses to specific kubernetes hosts (infra vs full stack) something that is doable based on kubernetes specific host labels / annotations?
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",
} }]​
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.
@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:
- use the hostMonitoring deployment where only host monitoring should be applied and use the nodeSelector parameter to select the nodes
- another dynakube will use the classicFullStack/cloudNativeFullStack (depending on your choice) with the nodeSelector that will match the hosts where you need full stack monitoring