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

Management Zone Rule

romil618
Visitor

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.

7 REPLIES 7

Maheedhar_T
Mentor

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

Maheedhar

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.

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 

Maheedhar_T_0-1738474269588.png


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

Maheedhar_T_1-1738474404151.png


Let me know if it worked.
Thanks 😄



Maheedhar

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

romil618_0-1738522031535.png

 

Maheedhar_T
Mentor

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?

Maheedhar

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.  

 

DanielS
DynaMight Guru
DynaMight Guru

Hi @romil618 I leave you the link to this post where you have several rules for your K8 and you also need to add the Dimensional Rules for metrics.

DanielS_0-1738629808722.png

 

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

Featured Posts