Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AKS] feat: Azure Monitor Metrics addon (v2) (Managed Prometheus) GA #26201

Merged
merged 45 commits into from
May 12, 2023

Conversation

bragi92
Copy link
Member

@bragi92 bragi92 commented Apr 19, 2023

Related command

az aks update -n kaveeshcli22 -g kaveeshcli --enable-azure-monitor-metrics --enable-windows-recording-rules

az aks create -n kaveeshcli22 -g kaveeshcli --location westeurope --enable-azure-monitor-metrics --enable-windows-recording-rules --azure-monitor-workspace-resource-id "{full_id}" --grafana-resource-id "{full_id}"

Description

GA update for Azure Monitor Metrics. The changes for public preview where merged into the az cli extensions repo in the following PR: Azure/azure-cli-extensions#5428

Testing Guide

az aks create and az aks update is being updated with the following parameters:

To create a cluster with the Azure Monitor Metrics addon enabled and sending data to a particular Azure Monitor Workspace and linked with a Grafana instance run :

az aks create -n kaveeshcli1 -g kaveeshcli --location westeurope --enable-azure-monitor-metrics --azure-monitor-workspace-resource-id "{full_id}" --grafana-resource-id "{full_id}"

To update an existing cluster with the Azure Monitor Metrics addon to a default workspace and to enable windows recording rules on it run :

az aks update-n kaveeshcli2 -g kaveeshcli --enable-azure-monitor-metrics --enable-windows-recording-rules

To disable the Azure Monitor Metrics addon run :
az aks update-n kaveeshcli2 -g kaveeshcli --disable-azure-monitor-metrics

History Notes
[AKS] az aks create/update: Add parameter --enable-azure-monitor-metrics to enable managed prometheus (Azure Monitor Metrics Addon)
[AKS] az aks create/update: Add parameter --azure-monitor-workspace-resource-id to store metrics for the managed prometheus addon
[AKS] az aks create/update: Add parameter --grafana-resource-id to link the Azure Monitor Workspace with a Grafana instance for viewing metrics and dashboards
[AKS] az aks create/update: Add parameter --enable-windows-recording-rules to enable windows recording rule groups on the Azure Monitor Workspace (by default they get created but are disabled)
[AKS] az aks create/update: Add parameter --ksm-metric-labels-allow-list to support the additional Kubernetes label keys that will be used in the resource' labels metric
[AKS] az aks create/update: Add parameter --ksm-metric-annotations-allow-list to support the Kubernetes annotations keys that will be used in the resource' labels metric
[AKS] az aks update: Add parameter --disable-azure-monitor-metrics to disable the Azure Monitor Metrics addon


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Apr 19, 2023

️✔️AzureCLI-FullTest
️✔️acr
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️acs
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.10
️✔️3.9
️✔️ams
️✔️latest
️✔️3.10
️✔️3.9
️✔️apim
️✔️latest
️✔️3.10
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.10
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.10
️✔️3.9
️✔️aro
️✔️latest
️✔️3.10
️✔️3.9
️✔️backup
️✔️latest
️✔️3.10
️✔️3.9
️✔️batch
️✔️latest
️✔️3.10
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.10
️✔️3.9
️✔️billing
️✔️latest
️✔️3.10
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.10
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.10
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.10
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.10
️✔️3.9
️✔️config
️✔️latest
️✔️3.10
️✔️3.9
️✔️configure
️✔️latest
️✔️3.10
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.10
️✔️3.9
️✔️container
️✔️latest
️✔️3.10
️✔️3.9
️✔️core
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.10
️✔️3.9
️✔️databoxedge
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️dla
️✔️latest
️✔️3.10
️✔️3.9
️✔️dls
️✔️latest
️✔️3.10
️✔️3.9
️✔️dms
️✔️latest
️✔️3.10
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.10
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.10
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.10
️✔️3.9
️✔️find
️✔️latest
️✔️3.10
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.10
️✔️3.9
️✔️identity
️✔️latest
️✔️3.10
️✔️3.9
️✔️iot
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️keyvault
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️kusto
️✔️latest
️✔️3.10
️✔️3.9
️✔️lab
️✔️latest
️✔️3.10
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.10
️✔️3.9
️✔️maps
️✔️latest
️✔️3.10
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.10
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.10
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.10
️✔️3.9
️✔️network
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.10
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.10
️✔️3.9
️✔️profile
️✔️latest
️✔️3.10
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.10
️✔️3.9
️✔️redis
️✔️latest
️✔️3.10
️✔️3.9
️✔️relay
️✔️latest
️✔️3.10
️✔️3.9
️✔️resource
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️role
️✔️latest
️✔️3.10
️✔️3.9
️✔️search
️✔️latest
️✔️3.10
️✔️3.9
️✔️security
️✔️latest
️✔️3.10
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.10
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.10
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.10
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.10
️✔️3.9
️✔️sql
️✔️latest
️✔️3.10
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.10
️✔️3.9
️✔️storage
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.10
️✔️3.9
️✔️telemetry
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9
️✔️util
️✔️latest
️✔️3.10
️✔️3.9
️✔️vm
️✔️2018-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.10
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.10
️✔️3.9
️✔️latest
️✔️3.10
️✔️3.9

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 19, 2023

AKS

@ghost ghost requested a review from kairu-ms April 19, 2023 19:24
@ghost ghost added the Auto-Assign Auto assign by bot label Apr 19, 2023
@ghost ghost requested review from AllyW and necusjz April 19, 2023 19:24
@ghost ghost assigned necusjz Apr 19, 2023
@ghost ghost added the Network az network vnet/lb/nic/dns/etc... label Apr 19, 2023
@ghost ghost assigned zhoxing-ms Apr 19, 2023
@ghost ghost requested a review from FumingZhang April 19, 2023 19:24
@ghost ghost added the AKS az aks/acs/openshift label Apr 19, 2023
Comment on lines +13 to +18
dce_name = get_default_dce_name(cmd, mac_region, cluster_name)
dce_resource_id = "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Insights/dataCollectionEndpoints/{2}"\
.format(cluster_subscription, cluster_resource_group_name, dce_name)
try:
armendpoint = cmd.cli_ctx.cloud.endpoints.resource_manager
dce_url = f"{armendpoint}{dce_resource_id}?api-version={DC_API}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as above

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@zhoxing-ms
Copy link
Contributor

Since your PR contains too much content, could you please refer to PR #25978 to write the descriptions of new commands and parameters into the History Notes part of PR description. Please note that the content of this ``History Notes` section will be automatically generated into the history notes of CLI
image

@bragi92
Copy link
Member Author

bragi92 commented May 11, 2023

Since your PR contains too much content, could you please refer to PR #25978 to write the descriptions of new commands and parameters into the History Notes part of PR description. Please note that the content of this ``History Notes` section will be automatically generated into the history notes of CLI image

I have updated the PR description following the pattern you described.

@zhoxing-ms
Copy link
Contributor

@bragi92 Could you please resolve this CI issue?

@bragi92
Copy link
Member Author

bragi92 commented May 11, 2023

@zhoxing-ms I have fixed all the CI/CD issues and have tested out the changes locally on my test clusters and everything looks good to me. Please review it/merge it in if it looks good to you.

@lalitmsft
Copy link

@bragi92 I was looking for similar feature in azure sdk for go package. Is there plan to add it there. Meanwhile, can you please suggest any workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AKS az aks/acs/openshift Auto-Assign Auto assign by bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants