Skip to content

Commit

Permalink
make containerinsights dcr name consistent (#211)
Browse files Browse the repository at this point in the history
Co-authored-by: Bavneet Singh <33008256+bavneetsingh16@users.noreply.github.com>
  • Loading branch information
ganga1980 and bavneetsingh16 authored Feb 2, 2023
1 parent 398f140 commit 2473565
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,9 @@ def _ensure_container_insights_dcr_for_monitoring(cmd, subscription_id, cluster_
except HttpResponseError as ex:
raise ex

dataCollectionRuleName = f"MSCI-{cluster_name}-{cluster_region}"
dataCollectionRuleName = f"MSCI-{workspace_region}-{cluster_name}"
# Max length of the DCR name is 64 chars
dataCollectionRuleName = dataCollectionRuleName[0:64]
dcr_resource_id = f"/subscriptions/{subscription_id}/resourceGroups/{cluster_resource_group_name}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}"

# first get the association between region display names and region IDs (because for some reason
Expand Down

0 comments on commit 2473565

Please sign in to comment.