All Products
Search
Document Center

:Monitor Kubernetes events

Last Updated:Dec 27, 2024

This topic describes how to use Managed Service for Prometheus to monitor Kubernetes events, view the dashboards, and configure alert rules. Event monitoring is a monitoring method provided by Kubernetes. It provides improvements over resource monitoring in terms of timeliness, accuracy, and scenarios. You can use node-problem-detector (NPD) with the Kubernetes event center of Simple Log Service to sink cluster events, and configure NPD to diagnose clusters and send error events to sinks. You can sink cluster events to DingTalk, Simple Log Service, and EventBridge. This allows you to monitor anomalies and issues in clusters in real time.

Prerequisites

Step 1: Configure Kubernetes events

  1. Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Center.

  2. Click Kubernetes Event. In the panel that appears, select the ACK cluster, and then set the parameters as prompted.

    Note

    Integration of Kubernetes events takes 1 to 2 minutes. Dashboard data is not available until integration is complete.

Step 2: View the dashboards

Managed Service for Prometheus provides multiple built-in dashboards, to show monitoring details, such as container overview, core components, nodes, and pods. You can view these dashboards in the Container Service for Kubernetes, Application Real-Time Monitoring Service, or Managed Service for Prometheus console. Perform the following steps to view the dashboards:

  1. Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Management.

  2. On the Integration Management page, click the Query Dashboards tab. Select the container to view the dashboards.3.jpg

Step 3: Configure alerting

  1. Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Management.

  2. On the Integration Management page, click the Integrated Environments tab. On the Container Service tab, click the name of the ACK cluster.

  3. On the Component Management tab, view the built-in alert rules in the Alert Rule section.5.jpg

  4. The built-in alert rules generate alert events without sending alert notifications. If you want to configure notification methods for an alert rule, click Edit in the Actions column.

    On the Edit Prometheus Alert Rule page, you can configure custom alert thresholds, duration, and alert content. For more information, see Create an alert rule for a Prometheus instance.

    2.jpg

Metrics

Metric

Measurement

Description

eventer_events_error_total

COUNTER

The count of error events.

eventer_events_normal_total

COUNTER

The count of normal events.

eventer_events_warning_total

COUNTER

The count of exception events.

eventer_exporter_duration_milliseconds

SUMMARY

The count of milliseconds spent exporting events.

eventer_manager_last_time_seconds

GAUGE

The Unix timestamp of the last eventer housekeep in seconds.

eventer_scraper_duration_milliseconds

SUMMARY

The count of milliseconds spent scraping events.

eventer_scraper_events_total_number

COUNTER

The total number of events.

eventer_scraper_last_time_seconds

GAUGE

The Unix timestamp of the last event in seconds.