31 Jan 2025 11:02 PM
I've a unique situation where I've multiple Azure AKS Clusters with same name across different subscriptions. I need to create separate management zone for each of them. What should be the rule to make sure only the cluster for which the management zone is created would appear when user selects the management zone? I tried cluster name in the rule, but that showed all the clusters in the same management zone. The only unique thing for each cluster was the clusterId, but that property is not available in the rule.
example aks-test1 (subscription1) management zone: (test1-mz)
aks-test1 (subscription2). management zone (test2-mz)
when I create management zone for aks-test1 it by default uses the cluster name in the rule and both aks clusters show up in test1-mz.
Please suggest a solution.
01 Feb 2025 11:48 AM
Heya,
There are two ways of doing this, when creating management zones, try using the cluster IDs instead of cluster names. Cluster IDs you can find in your URL when you open that cluster in Dynatrace.
Second way is use Tags. Tags are the most underrated part when it comes to entities in Dynatrace yet so useful and powerful for filtering. Though the name is same you have an Idea of which cluster belongs to which MZ right? Just open that cluster and put a Tag on it. Then when creating MZs use Tags to filter out only the entities with certain tags
01 Feb 2025 03:32 PM
Hi,
Like I mentioned, I'm unable to add clusterId in the rule condition. Could you please elaborate how do I set that up?
Also, if you would guide on the tags as well, that would really help.
02 Feb 2025 05:33 AM
Heya,
So when you go to the cluster the URL would look something like this.
https://__/dynatrace.classic.kubernetes/ui/entity/KUBERNETES_CLUSTER-7DA994C4A192A429?gtf=-2h&gf=all&sessionId=clMqT-mL5KUEiSN5
from this, what we are interested in is KUBERNETES_CLUSTER-7DA994C4A192A429
We use this in entitySelector string in management zone creation.
Like
Same goes with tags as well. We use a entity Selector query for that one too. Once you have added the tags from Auto-Tagging rule (Again need to use entity Selector query here).
We can use the entity selector query like this
Let me know if it worked.
Thanks 😄
02 Feb 2025 06:49 PM
Thank you!! That did work for MZ on the AKS cluster, but metrics does not appear when I click the cluster. I used the first option with entityid of the cluster for creating management zone
03 Feb 2025 04:19 AM
Heya,
Without MZ you are able to see the metrics, right?
So, it must be something with the access. Can you check your RBAC once?
03 Feb 2025 05:16 PM
Hi
Yes, I can see the metrics without the MZ. The access seems to be fine. We tried adding another namespace and node filter with that entity id and the namespaces node metrics showed up in the management zone, but still dont see pods, pod metrics, etc. Adding these entityid based rules for all would be cumbersome and still would not show all the data in MZ.