AKS icon indicating copy to clipboard operation
AKS copied to clipboard

AKS 1.19.X missing metrics & alerts in Azure Monitor for containers

Open saaror opened this issue 6 years ago • 19 comments

What happened: Starting AKS version 1.19.X due to k8s upstream issue, Azure Monitor for containers customers will not see all the metrics under 'insights.container/nodes' metrics namespace & the recommended alerts using these metrics will be broken.

This is due to the k8s upstream issue of missing cAdvisor metrics Anything else we need to know?: This issue will be fixed once the k8s upstream issue is fixed & backported to AKS.

Please reach out to akscoin@microsoft for any question. Environment: AKS version 1.19.X.

saaror avatar Dec 01 '20 19:12 saaror

Hi saaror, AKS bot here :wave: Thank you for posting on the AKS Repo, I'll do my best to get a kind human from the AKS team to assist you.

I might be just a bot, but I'm told my suggestions are normally quite good, as such:

  1. If this case is urgent, please open a Support Request so that our 24/7 support team may help you faster.
  2. Please abide by the AKS repo Guidelines and Code of Conduct.
  3. If you're having an issue, could it be described on the AKS Troubleshooting guides or AKS Diagnostics?
  4. Make sure your subscribed to the AKS Release Notes to keep up to date with all that's new on AKS.
  5. Make sure there isn't a duplicate of this issue already reported. If there is, feel free to close this one and '+1' the existing issue.
  6. If you have a question, do take a look at our AKS FAQ. We place the most common ones there!

ghost avatar Dec 01 '20 19:12 ghost

@vishiy, @saaror would you be able to assist?

Issue Details

What happened: Starting AKS version 1.19.X due to k8s upstream issue, Azure Monitor for containers customers will not see all the metrics under 'insights.container/nodes' metrics namespace & the recommended alerts using these metrics will be broken.

This is due to the k8s upstream issue of missing cAdvisor metrics Anything else we need to know?: This issue will be fixed once the k8s upstream issue is fixed & backported to AKS.

Please reach out to akscoin@microsoft for any question. Environment: AKS version 1.19.X.

Author: saaror
Assignees: -
Labels:

addon/container-insights, known-issue, triage

Milestone: -

ghost avatar Dec 01 '20 19:12 ghost

Impact: High, breaking existing customer alerts.

saaror avatar Dec 01 '20 19:12 saaror

Caused by a kubernetes bug that is tracked by - https://github.com/kubernetes/kubernetes/issues/95204

vishiy avatar Dec 01 '20 19:12 vishiy

This bug is now fixed upstream, is there any ETA on when it will be released on AKS?

wesselkranenborg avatar Jan 07 '21 15:01 wesselkranenborg

It is possible to handle this with some urgency now? Node metrics are critical part of AKS monitoring... Thanks!

kasbst avatar Jan 11 '21 10:01 kasbst

Thanks folks for the patience. The fix is completed on AKS side & should be rolling out AKS next week release in 1.19.7 version.

saaror avatar Jan 12 '21 18:01 saaror

@saaror Thanks! But when I check available upgrades for eastus2 there is only 1.19.6 version. Does this version contain the fix as well?

EDIT: According to Kubernetes change log - this is fixed in version 1.19.7

1.19.6 doesn't contain a fix for missing cAdvisor machine metrics. Please release AKS 1.19.7 version ASAP.

Thank you!

kasbst avatar Jan 21 '21 09:01 kasbst

I was receiving the following error messages when attempting to deploy the 2 metrics memoryWorkingSetPercentage and cpuUsagePercentage. I tried running the deployment after upgrading to AKS 1.19.7 in NorthEurope but continue to get this error. Am I missing something else?

"Message": "The following metric name(s) were not found: memoryWorkingSetPercentage. Please note that for custom metrics, the relevant metric namespace must be specified. Activity ID: b88057d0-1658-4060-bb36-b1ed8a4e2b2b."
"Message": "The following metric name(s) were not found: cpuUsagePercentage. Please note that for custom metrics, the relevant metric namespace must be specified. Activity ID: 74a35ec4-e3d9-446e-9730-41c0992ea43e."

adhodgson1 avatar Feb 08 '21 16:02 adhodgson1

@adhodgson1 Have you activated the Monitoring Metrics Publisher role for your cluster?


@saaror Update: Tried it myself with no luck.. Other metrics are showing up, but the ones I would like to see (memoryWorkingSetPercentage, cpuUsagePercentage in Insights.container/nodes) are not present

aristosvo avatar Feb 08 '21 16:02 aristosvo

@aristosvo I am creating the relevant RBAC entry as part of the deployment as the account that runs the ARM template doesn't have the capability to update RBAC. Here is the Ansible code:

- name: Ensure AKS Monitoring identity has 'Monitoring Metrics Publisher' rights to the AKS resource
  azure_rm_roleassignment:
    scope: "{{ aks_resource_id }}"
    assignee_object_id: "{{ oms_managed_identity_object_id }}"
    role_definition_id: "/subscriptions/{{ azure_subscription_id }}/providers/Microsoft.Authorization/roleDefinitions/3913510d-42f4-4e42-8a64-420c390055eb"

I can share the ARM template if required.

adhodgson1 avatar Feb 09 '21 12:02 adhodgson1

@adhodgson1 the setup is the same as I have, it seems still broken in 1.19.7 😥

aristosvo avatar Feb 09 '21 14:02 aristosvo

@adhodgson1 the setup is the same as I have, it seems still broken in 1.19.7 😥

Same here, we just rolled a new 1.19.7 cluster and cannot see all metrics under insights.container/nodes.

tankovich avatar Feb 10 '21 19:02 tankovich

The fix for the monitoring addon for this issue is in the works. Once the addon is patched, >=1.19.7 & >=1.20.2 clusters will start to collect these metrics.

vishiy avatar Feb 10 '21 19:02 vishiy

@vishiy Thanks for letting us know! Is this also fixing https://github.com/Azure/AKS/issues/2078#issuecomment-772125200?

Is there a place where RCAs and mitigation of known issues like these are published, to inform my clients and manager about these kind of things?

aristosvo avatar Feb 10 '21 20:02 aristosvo

@aristosvo - Can you please share more on #2078 ?

vishiy avatar Feb 10 '21 20:02 vishiy

Issue seems resolved in my clusters, thanks!!

aristosvo avatar Mar 15 '21 09:03 aristosvo

I can confirm this is now resolved for us as well - cluster version 1.19.7

kasbst avatar Mar 15 '21 11:03 kasbst

Closing issue, the fix has been rolled out.

saaror avatar Mar 15 '21 17:03 saaror