github.com/Azure/aad-pod-identity@v1.8.17/website/content/en/docs/Configure/prometheus_monitoring.md (about) 1 --- 2 title: "Monitoring Pod Identity with Prometheus" 3 linkTitle: "Monitoring Pod Identity with Prometheus" 4 weight: 7 5 description: > 6 Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions,displays the results, and can trigger alerts if some condition is observed to be true. 7 --- 8 9 ## Introduction 10 11 AAD pod identity is a foundational service that other applications depend upon, it is recommended to monitor the same. 12 13 Liveliness probe and Prometheus metrics are available in both Managed Identity Controller (MIC) and the Node Managed Identity (NMI) components. 14 15 ## Liveliness Probe 16 17 MIC and NMI exposes /healthz endpoint with content of "Active/Not Active" state. 18 State "Active" is being returned if the component has started successfully and "Not Active" otherwise. 19 20 ## Prometheus Metrics 21 22 [Prometheus](https://github.com/prometheus/prometheus) is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions,displays the results, and can trigger alerts if some condition is observed to be true. 23 24 The following [OpenCensus](https://opencensus.io/) metrics are exposed in AAD pod identity system via prometheus exporter. 25 26 **1. aadpodidentity_assigned_identity_addition_duration_seconds** 27 28 Histogram that tracks the duration (in seconds) it takes for Assigned identity addition operations. 29 30 **2. aadpodidentity_assigned_identity_addition_count** 31 32 Counter that tracks the cumulative number of assigned identity addition operations. 33 34 **3. aadpodidentity_assigned_identity_deletion_duration_seconds** 35 36 Histogram that tracks the duration (in seconds) it takes for Assigned identity deletion operations. 37 38 **4. aadpodidentity_assigned_identity_deletion_count** 39 40 Counter that tracks the cumulative number of assigned identity deletion operations. 41 42 **5. aadpodidentity_nmi_operations_duration_seconds** 43 44 Histogram that tracks the latency (in seconds) of NMI operations to complete. Broken down by operation type, status code. 45 46 **6. aadpodidentity_mic_cycle_duration_seconds** 47 48 Histogram that tracks the duration (in seconds) it takes for a single cycle in MIC. 49 50 **7. aadpodidentity_mic_cycle_count** 51 52 Counter that tracks the number of cycles executed in MIC. 53 54 **8. aadpodidentity_mic_new_leader_election_count** 55 56 Counter that tracks the cumulative number of new leader election in MIC. 57 58 **9. aadpodidentity_cloud_provider_operations_errors_count** 59 60 Counter that tracks the cumulative number of cloud provider operations errors. Broken down by operation type. 61 62 **10. aadpodidentity_cloud_provider_operations_duration_seconds** 63 64 Histogram that tracks the duration (in seconds) it takes for cloud provider operations. Broken down by operation type. 65 66 **11. aadpodidentity_kubernetes_api_operations_errors_count** 67 68 Counter that tracks the cumulative number of kubernetes api operations errors. Broken down by operation type. 69 70 **12. aadpodidentity_imds_operations_errors_count** 71 72 Counter that tracks the cumulative number of imds token operation errors. Broken down by operation type. 73 74 **13. aadpodidentity_imds_operations_duration_seconds** 75 76 Histogram that tracks the duration (in seconds) it takes for IMDS token operations. Broken down by operation type. 77 78 ### Prometheus Metrics Endpoints 79 80 | Component | Default Metric Port | Metric Path | 81 |:---------:|---------------------|-------------| 82 | `NMI` | `9090` | `/metrics` | 83 | `MIC` | `8888` | `/metrics` |