All Products
Search
Document Center

Container Service for Kubernetes:How to configure ACK One Argo CD alerts

Last Updated:Oct 10, 2024

Fleet monitoring provided by Distributed Cloud Container Platform for Kubernetes (ACK One) uses Managed Service for Prometheus to collect the metrics, and then displays monitoring information about the Fleet instances on a dashboard. You can customize alert rules and monitor related metrics in real time based on your business requirements. This topic describes how to configure ACK One Argo CD alerts.

Prerequisites

  • Fleet monitoring is enabled. For more information, see Enable Fleet monitoring.

  • A notification object is created. For more information, see Notification objects.

    Note

    If your notification object is DingTalk, make sure to add Custom Keywords alerts in the security settings of a DingTalk chatbot.

Configure ACK One Argo CD alerts

  1. Log on to the ACK One console. In the left-side navigation pane, choose Fleet > Fleet Observability > Fleet Monitoring.

  2. In the upper-right corner of the Fleet Monitoring page, click Alert Settings to go to the Prometheus Alert Rules page.

  3. Click Create Prometheus Alert Rule, fill in the required fields, and then click Completed. For more information, see Create and manage an alert rule template.

    Parameter

    Description

    Example

    Alert Rule Name

    Specify the name of the custom alert.

    ACK One Argo CD pod memory alert

    Check Type

    Valid values: Static Threshold and Custom PromQL.

    Static Threshold

    Prometheus Instance

    Specify the name of your ACK One Fleet instance.

    text-XXXX

    Alert Contact Group

    Specify the Kubernetes application group to be monitored within your environment.

    Kubernetes workload

    Alert Metric

    Set this parameter based on your business requirements. Container Memory Usage and Container CPU Utilization are top-priority metrics.

    Container Memory Usage

    Alert Condition

    Specify the condition based on which alert events are generated.

    If the CPU utilization of the container is greater than 80%, an alert event is generated.

    Filter Conditions

    Specify the applicable scope of the alert rule. If a resource meets both the filter condition and the alert condition, an alert event is generated.

    The following types of filter conditions are supported:

    • Traverse: The alert rule applies to all resources in the current Prometheus instance. By default, Traverse is selected.

    • Equal: If you select this filter condition, you must enter a resource name. The alert rule applies only to the specified resource. You cannot specify multiple resources at the same time.

    • Not equal: If you select this filter condition, you must enter a resource name. The alert rule applies to resources other than the specified resource. You cannot specify multiple resources at the same time.

    • Regex match: If you select this filter condition, you must enter a regular expression to match resource names. The alert rule that you create by using the template applies to all resources that match the regular expression.

    • Regex not match: If you select this filter condition, you must enter a regular expression to match resource names. The alert rule applies to resources that do not match the regular expression.

    Namespace Equal argocd, Pod: Traverse

    Duration

    • If the alert condition is met, an alert event is generated: If a data point reaches the threshold, an alert event is generated.

    • If the alert condition is continuously met for N minutes, an alert event is generated: An alert event is generated only if the duration for which the threshold is reached is greater than or equal to N minutes.

    If the alert condition is met continuously for 2 minutes, an alert event is generated

    Alert Level

    Specify the alert level. Default value: Default. Valid values: Default, P4, P3, P2, and P1. Default indicates the lowest severity level, while P1 indicates the highest severity level.

    P1

    Alert Message

    Specify the alert message that you want to send to the end users. You can specify custom variables in the alert message based on the Go template syntax.

    Namespace: {{$labels.namespace}} / Pod: {{$labels.pod_name}} / Container: {{$labels.container}} CPU utilization: {{$labels.metrics_params_opt_label_value}} {{$labels.metrics_params_value}}%. Current value: {{ printf "%.2f" $value }}%

    Alert Notification

    Valid values: Simple Mode and Standard Mode.

    Simple Mode

    Notification Objects

    Select the notification object based on your business requirements.

    DingTalk alert

    Notification Period

    Specify the notification period based on your business requirements.

    23:00 to 01:00

    Whether to Resend Notifications

    Specify the interval for repeated alert notifications based on your business requirements.

    If the alert is not cleared, the system sends an alert notification every 10 minutes

  4. After you configure the parameters, simulate the alert condition to verify the alert information on the notification object side.

    Note

    You can use the Prometheus console to view historical alerts. For more information, see View historical alerts.