All Products
Search
Document Center

Server Load Balancer:Integrate CLB with Managed Service for Prometheus

Last Updated:Feb 14, 2025

Managed Service for Prometheus can provide monitoring data of Classic Load Balancer (CLB) instances, including metrics, alerts, and dashboards. This topic describes how to integrate CLB with Managed Service for Prometheus.

Overview

Managed Service for Prometheus is a fully managed monitoring service that is interfaced with the open source Prometheus ecosystem. Managed Service for Prometheus monitors various components and provides multiple ready-to-use dashboards. For more information, see What is Managed Service for Prometheus?

You can use Hybrid Cloud Monitoring to integrate CLB with Managed Service for Prometheus. You are charged for using Hybrid Cloud Monitoring, as described in the following table.

Integration type

Description

Billing

Storage fee

Hybrid Cloud Monitoring (charged)

Managed Service for Prometheus calls the CloudMonitor API to collect CLB metrics. If CLB is integrated with Managed Service for Prometheus and alert rules are created, Managed Service for Prometheus displays the monitoring data and alerts on dashboards.

The data transfer fee generated by metric collection is billed by CloudMonitor.

For more information, see Billing of the cloud monitoring exporter feature.

Managed Service for Prometheus stores collected metrics free of charge.

Prerequisites

Create a Prometheus instance

  1. Log on to the Managed Service for Prometheus console.

  2. In the top navigation bar, select a region. On the Instances page, click Create Prometheus Instance.

  3. On the Create Instance page, configure the parameters and click Create Now. The following table describes the parameters.

    Parameter

    Description

    Instance Type

    Select General-purpose Instance or Global Aggregation Instance.

    Note
    • General-purpose instance: A general-purpose Prometheus instance is used for the remote storage of self-managed Prometheus clusters, or to monitor metric data about containers, cloud services, and hosts.

    • Global aggregation instance: A global aggregation instance is used to aggregate multiple Prometheus instances or self-managed Prometheus clusters, query Prometheus metrics, and manage Grafana data sources and alerts in a unified manner.

    Storage Duration

    Select 90 Days or 180 Days.

Integrate CLB with Managed Service for Prometheus

  1. Log on to the ARMS console.

  2. In the left-side navigation pane, choose Integration Center.

  3. On the Integration Center page, click Middleware and click Alibaba Cloud SLB.

  4. In the Alibaba Cloud SLB panel, select the region where your CLB instance is deployed and click OK. Wait for one to two minutes. Then, the CLB data is integrated.

  • Metric

    You can view CLB monitoring metrics on the Collect Metrics tab.

    CLB monitoring metrics supported by Managed Service for Prometheus

    Metric

    Description

    AliyunSlb_ActiveConnection

    Number of active TCP connections per second

    AliyunSlb_DropConnection

    Number of connections dropped by listeners per second

    AliyunSlb_DropPacketRX

    Number of inbound packets dropped by listeners per second

    AliyunSlb_DropPacketTX

    Number of outbound packets dropped by listeners per second

    AliyunSlb_DropTrafficRX

    Number of inbound bits dropped by listeners per second

    AliyunSlb_DropTrafficTX

    Number of outbound bits dropped by listeners per second

    AliyunSlb_GroupActiveConnection

    Number of active TCP connections per second by group

    AliyunSlb_GroupNewConnection

    Number of new TCP connections by group

    AliyunSlb_GroupTotalTrafficRX

    Total inbound bandwidth by group

    AliyunSlb_GroupTotalTrafficTX

    Total outbound bandwidth by group

    AliyunSlb_GroupTrafficRX

    Inbound bandwidth by group

    AliyunSlb_GroupTrafficTX

    Outbound bandwidth by group

    AliyunSlb_GroupUnhealthyServerCount

    Number of unhealthy backend Elastic Compute Service (ECS) instances by group

    AliyunSlb_HealthyServerCountWithRule

    Number of healthy backend ECS instances for Layer 7 forwarding rules

    AliyunSlb_HealthyServerCount

    Number of healthy backend ECS instances

    AliyunSlb_InactiveConnection

    Number of inactive TCP connections

    AliyunSlb_InstanceActiveConnection

    Number of active connections to the CLB instance per second

    AliyunSlb_InstanceDropConnection

    Number of connections dropped by the CLB instance per second

    AliyunSlb_InstanceDropPacketRX

    Number of inbound packets dropped by the CLB instance per second

    AliyunSlb_InstanceDropPacketTX

    Number of outbound packets dropped by the CLB instance per second

    AliyunSlb_InstanceDropTrafficRX

    Number of inbound bits dropped by the CLB instance per second

    AliyunSlb_InstanceDropTrafficTX

    Number of outbound bits dropped by the CLB instance per second

    AliyunSlb_InstanceInactiveConnection

    Number of inactive connections to the CLB instance per second

    AliyunSlb_InstanceMaxConnection

    Maximum number of concurrent connections supported by the CLB instance

    AliyunSlb_InstanceMaxConnectionUtilization

    Maximum connection utilization of the CLB instance

    AliyunSlb_InstanceNewConnection

    Number of new connections to the CLB instance per second

    AliyunSlb_InstanceNewConnectionUtilization

    Utilization of new connections on the CLB instance

    AliyunSlb_InstancePacketRX

    Number of inbound packets to the CLB instance per second

    AliyunSlb_InstancePacketTX

    Number of outbound packets from the CLB instance per second

    AliyunSlb_InstanceQps

    Queries per second (QPS) of the CLB instance at Layer 7

    AliyunSlb_InstanceQpsUtilization

    QPS usage of the CLB instance at Layer 7

    AliyunSlb_InstanceRt

    Response time (RT) of the CLB instance at Layer 7

    AliyunSlb_InstanceStatusCode2xx

    Number of 2XX status codes on the CLB instance at Layer 7 per second

    AliyunSlb_InstanceStatusCode3xx

    Number of 3XX status codes on the CLB instance at Layer 7 per second

    AliyunSlb_InstanceStatusCode4xx

    Number of 4XX status codes on the CLB instance at Layer 7 per second

    AliyunSlb_InstanceStatusCode5xx

    Number of 5XX status codes on the CLB instance at Layer 7 per second

    AliyunSlb_InstanceStatusCodeOther

    Number of other status codes on the CLB instance at Layer 7 per second

    AliyunSlb_InstanceTrafficRX

    Number of inbound bits to the CLB instance per second

    AliyunSlb_InstanceTrafficTX

    Number of outbound bits from the CLB instance per second

    AliyunSlb_InstanceTrafficTXUtilization

    Outbound bandwidth utilization of the CLB instance

    AliyunSlb_InstanceUpstreamCode4xx

    Number of UpstreamCode4xx on the CLB instance at Layer 7 per second

    AliyunSlb_InstanceUpstreamCode5xx

    Number of UpstreamCode5xx on the CLB instance at Layer 7 per second

    AliyunSlb_InstanceUpstreamRt

    UpstreamRT of an instance at Layer 7

    AliyunSlb_MaxConnection

    Number of concurrent connections on ports

    AliyunSlb_NewConnection

    Number of new TCP connections

    AliyunSlb_PacketRX

    Number of inbound packets per second

    AliyunSlb_PacketTX

    Number of outbound packets per second

    AliyunSlb_Qps

    QPS of Layer 7 listeners

    AliyunSlb_Rt

    RT of Layer 7 listeners

    AliyunSlb_StatusCode2xx

    Number of 2XX status codes of Layer 7 listeners per second

    AliyunSlb_StatusCode3xx

    Number of 3XX status codes of Layer 7 listeners per second

    AliyunSlb_StatusCode4xx

    Number of 4XX status codes of Layer 7 listeners per second

    AliyunSlb_StatusCode5xx

    Number of 5XX status codes of Layer 7 listeners per second

    AliyunSlb_StatusCodeOther

    Number of other status codes of Layer 7 listeners per second

    AliyunSlb_TrafficRXNew

    Inbound bandwidth

    AliyunSlb_TrafficTXNew

    Outbound bandwidth

    AliyunSlb_UnhealthyServerCount

    Number of unhealthy backend ECS instances

    AliyunSlb_UnhealthyServerCountWithRule

    Number of unhealthy backend ECS instances for Layer 7 forwarding rules

    AliyunSlb_UpstreamCode4xx

    Number of UpstreamCode4xx per second of Layer 7 listeners

    AliyunSlb_UpstreamCode5xx

    Number of UpstreamCode5xx per second of Layer 7 listeners

    AliyunSlb_UpstreamRt

    UpstreamRT of Layer 7 listeners

  • Alerts

    On the Alert Rule Template tab, you can create Prometheus alert rules and view alert information. For more information, see Create an alert rule for a Prometheus instance.

  • Dashboard

    On the Start Integration tab, click Integration Management. On the page that appears, on the Component Management tab, click Dashboards and click SLB. You can view the CLB monitoring data.

Use a third-party Prometheus library

After CLB is integrated with Managed Service for Prometheus, you can use the remote write feature to load a third-party Prometheus library. For more information, see Create a Prometheus instance for remote write.

Disable monitoring on CLB

  1. Log on to the Managed Service for Prometheus console.

  2. On the Instances page, in the top navigation bar, select the region where your Prometheus instance is deployed, find the Prometheus instance that you want to manage, and click Uninstall in the Actions column.

  3. In the message that appears, click OK.

References