All Products
Search
Document Center

Server Load Balancer:Integrate ALB with Managed Service for Prometheus

Last Updated:Dec 02, 2024

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

Overview

Managed Service for Prometheus is a managed monitoring service that is fully interfaced with the open source Prometheus ecosystem. Managed Service for Prometheus monitors a wide array of 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 ALB 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 ALB metrics. If ALB 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 charged by CloudMonitor.

Managed Service for Prometheus stores collected metrics free of charge.

Example:

The following figure shows an example. The example is for reference only. The information on the buy page shall prevail.

image..png

Two listeners and three forwarding rules are created for the ALB instance. Each listener has 27 metrics, each instance has 27 metrics, each forwarding rule has 16 metrics, and each server group has 11 metrics.

Total number of metrics per minute = 27 × 1 ALB instance + 27 × 2 listeners + 16 × 3 forwarding rules + 11 × 2 server groups = 151.

Total number of data entries per day = 151 × 60 × 24 = 217,440.

Prerequisites

Create a Prometheus instance

Important

The monitoring data is collected every minute. Data at 1-second intervals refers to the average value within a minute. The average value is for reference only. If you want to view data at 1-second intervals, enable the access log feature for the ALB instance. For more information, see Access logs.

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

  2. In the top navigation bar, select a region. On the Managed Service for Prometheus > 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 ALB 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 ALB.

  4. In the Alibaba Cloud ALB panel, select the region where your ALB instance is deployed and click OK. Wait for 1 to 2 minutes. Then, the ALB data is integrated.

  • Metric

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

    ALB monitoring metrics supported by Managed Service for Prometheus

    Metric

    Description

    AliyunAlb_ListenerActiveConnection

    The number of active connections on the listener. Unit: Count

    AliyunAlb_ListenerClientTLSNegotiationError

    The number of connections that fail Transport Layer Security (TLS) handshakes per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCode2XX

    The number of 2xx status codes per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCode3XX

    The number of 3xx status codes per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCode4XX

    The number of 4xx status codes per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCode500

    The number of 500 status codes per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCode502

    The number of 502 status codes per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCode503

    The number of 503 status codes per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCode504

    The number of 504 status codes per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCode5XX

    The number of 5xx status codes per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCodeUpstream2XX

    The number of 2xx status codes per second on the backend servers associated with the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCodeUpstream3XX

    The number of 3xx status codes per second on the backend servers associated with the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCodeUpstream4XX

    The number of 4xx status codes per second on the backend servers associated with the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPCodeUpstream5XX

    The number of 5xx status codes per second on the backend servers associated with the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPFixedResponse

    The number of custom responses per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHTTPRedirect

    The number of redirects per second on the listener. Unit: Count/s

    AliyunAlb_ListenerHealthyHostCount

    The number of healthy servers associated with the listener. Unit: Count

    AliyunAlb_ListenerInBits

    The inbound bandwidth of the listener. Unit: bit/s

    AliyunAlb_ListenerInactiveConnection

    The number of inactive connections on the listener. Unit: Count/s

    AliyunAlb_ListenerMaxConnection

    The maximum number of concurrent connections per second on the listener. Unit Count/s

    AliyunAlb_ListenerNewConnection

    The number of new connections per second on the listener. Unit Count/s

    AliyunAlb_ListenerNonStickyRequest

    The number of nonsticky requests per second on the listener. Unit Count/s

    AliyunAlb_ListenerOutBits

    The outbound bandwidth of the listener. Unit: bit/s

    AliyunAlb_ListenerQPS

    The number of requests per second on the listener. Unit Count/s

    AliyunAlb_ListenerRejectedConnection

    The number of connections dropped per second on the listener. Unit Count/s

    AliyunAlb_ListenerRequestTime

    The request latency on the listener. Unit: ms

    AliyunAlb_ListenerUnHealthyHostCount

    The number of unhealthy servers associated with the listener. Unit Count

    AliyunAlb_ListenerUpstreamConnectionError

    The number of connection failures per second on the backend servers associated with the listener. Unit Count/s

    AliyunAlb_ListenerUpstreamResponseTime

    The response time of the backend servers associated with the listener. Unit: ms

    AliyunAlb_ListenerUpstreamTLSNegotiationError

    The number of TLS handshake failures per second on the backend servers associated with the listener. Unit Count/s

    AliyunAlb_LoadBalancerActiveConnection

    The number of active connections on the ALB instance. Unit Count

    AliyunAlb_LoadBalancerClientTLSNegotiationError

    The number of TLS handshake failures per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCode2XX

    The number of 2xx status codes per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCode3XX

    The number of 3xx status codes per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCode4XX

    The number of 4xx status codes per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCode500

    The number of 500 status codes per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCode502

    The number of 502 status codes per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCode503

    The number of 503 status codes per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCode504

    The number of 504 status codes per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCode5XX

    The number of 5xx status codes per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCodeUpstream2XX

    The number of 2xx status codes per second on the backend servers of the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCodeUpstream3XX

    The number of 3xx status codes per second on the backend servers of the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCodeUpstream4XX

    The number of 4xx status codes per second on the backend servers of the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPCodeUpstream5XX

    The number of 5xx status codes per second on the backend servers of the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPFixedResponse

    The number of custom responses per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHTTPRedirect

    The number of redirects per second on the ALB instance. Unit Count/s

    AliyunAlb_LoadBalancerHealthyHostCount

    The number of healthy servers associated with the ALB instance. Unit Count

    AliyunAlb_LoadBalancerInBits

    The inbound bandwidth of the ALB instance. Unit: bit/s

    AliyunAlb_LoadBalancerInactiveConnection

    The number of inactive connections to the ALB instance. Unit: Count/s

    AliyunAlb_LoadBalancerMaxConnection

    The maximum number of concurrent connections to the ALB instance per second. Unit: Count/s

    AliyunAlb_LoadBalancerNewConnection

    The number of new connections per second on the ALB instance. Unit: Count/s

    AliyunAlb_LoadBalancerNonStickyRequest

    The number of nonsticky requests per second on the ALB instance. Unit: Count/s

    AliyunAlb_LoadBalancerOutBits

    The outbound bandwidth of the ALB instance. Unit: bit/s

    AliyunAlb_LoadBalancerQPS

    The number of requests per second on the ALB instance. Unit: Count/s

    AliyunAlb_LoadBalancerRejectedConnection

    The number of connections dropped per second on the ALB instance. Unit: Count/s

    AliyunAlb_LoadBalancerRequestTime

    The request latency on the ALB instance. Unit: ms

    AliyunAlb_LoadBalancerUnHealthyHostCount

    The number of unhealthy servers associated with the ALB instance. Unit: Count

    AliyunAlb_LoadBalancerUpstreamConnectionError

    The number of connection failures per second on the backend servers of the ALB instance. Unit: Count/s

    AliyunAlb_LoadBalancerUpstreamResponseTime

    The response time of the backend servers of the ALB instance. Unit: ms

    AliyunAlb_LoadBalancerUpstreamTLSNegotiationError

    The number of TLS handshake failures per second on the backend servers of the ALB instance. Unit: Count/s

    AliyunAlb_RuleHTTPCodeUpstream2XX

    The number of 2xx status codes per second on the backend servers associated with the forwarding rule. Unit: Count/s

    AliyunAlb_RuleHTTPCodeUpstream3XX

    The number of 3xx status codes per second on the backend servers associated with the forwarding rule. Unit: Count/s

    AliyunAlb_RuleHTTPCodeUpstream4XX

    The number of 4xx status codes per second on the backend servers associated with the forwarding rule. Unit: Count/s

    AliyunAlb_RuleHTTPCodeUpstream5XX

    The number of 5xx status codes per second on the backend servers associated with the forwarding rule. Unit: Count/s

    AliyunAlb_RuleHealthyHostCount

    The number of healthy servers associated with the forwarding rule. Unit: Count

    AliyunAlb_RuleNonStickyRequest

    The number of nonsticky requests per second that match the forwarding rule. Unit: Count/s

    AliyunAlb_RuleQPS

    The number of requests that match the forwarding rule per second. Unit: Count/s

    AliyunAlb_RuleRequestTime

    The forwarding rule request latency. Unit: ms

    AliyunAlb_RuleUnHealthyHostCount

    The number of unhealthy servers associated with the forwarding rule. Unit: Count

    AliyunAlb_RuleUpstreamConnectionError

    The number of connection failures per second on the backend servers associated with the forwarding rule. Unit: Count/s

    AliyunAlb_RuleUpstreamResponseTime

    The response time of the backend servers associated with the forwarding rule. Unit: ms

    AliyunAlb_RuleUpstreamTLSNegotiationError

    The number of TLS handshake failures per second on the backend servers associated with the forwarding rule. Unit: Count/s

    AliyunAlb_ServerGroupHTTPCodeUpstream2XX

    The number of 2xx status codes returned by the backend server group per second. Unit: Count/s

    AliyunAlb_ServerGroupHTTPCodeUpstream3XX

    The number of 3xx status codes returned by the backend server group per second. Unit: Count/s

    AliyunAlb_ServerGroupHTTPCodeUpstream4XX

    The number of 4xx status codes returned by the backend server group per second. Unit: Count/s

    AliyunAlb_ServerGroupHTTPCodeUpstream5XX

    The number of 5xx status codes returned by the backend server group per second. Unit: Count/s

    AliyunAlb_ServerGroupHealthyHostCount

    The number of healthy servers in the server group. Unit: Count

    AliyunAlb_ServerGroupNonStickyRequest

    The number of nonsticky requests sent to the server group. Unit: Count/s

    AliyunAlb_ServerGroupRequestTime

    The request latency in the server group. Unit: ms

    AliyunAlb_ServerGroupQPS

    The number of requests sent to the server group per second. Unit: Count/s

    AliyunAlb_ServerGroupUnHealthyHostCount

    The number of unhealthy servers in the server group. Unit: Count

    AliyunAlb_ServerGroupUpstreamConnectionError

    The number of connection failures per second of the server group. Unit: Count/s

    AliyunAlb_ServerGroupUpstreamResponseTime

    The response time of the server group. Unit: ms

    AliyunAlb_ServerGroupUpstreamTLSNegotiationError

    The number of TLS handshake failures per second of the server group. Unit: Count/s

    AliyunAlb_RuleHTTPCodeUpstream2XXRatio

    The percentage of 2xx status codes per second on the backend servers associated with the forwarding rule. Unit: %

    AliyunAlb_RuleHTTPCodeUpstream3XXRatio

    The percentage of 3xx status codes per second on the backend servers associated with the forwarding rule. Unit: %

    AliyunAlb_RuleHTTPCodeUpstream4XXRatio

    The percentage of 4xx status codes per second on the backend servers associated with the forwarding rule. Unit: %

    AliyunAlb_RuleHTTPCodeUpstream5XXRatio

    The percentage of 5xx status codes per second on the backend servers associated with the forwarding rule. Unit: %

    AliyunAlb_VipActiveConnection

    The number of active connections to the virtual IP address (VIP). Unit: Count

    AliyunAlb_VipClientTLSNegotiationError

    The number of TLS handshake failed connections per second to the VIP. Unit: Count/s

    AliyunAlb_VipHTTPCode2XX

    The number of 2XX status codes per second in the VIP. Unit: Count/s

    AliyunAlb_VipHTTPCode3XX

    The number of 3XX status codes per second in the VIP. Unit: Count/s

    AliyunAlb_VipHTTPCode4XX

    The number of 4XX status codes per second in the VIP. Unit: Count/s

    AliyunAlb_VipHTTPCode500

    The number of 500 status codes per second in the VIP. Unit: Count/s

    AliyunAlb_VipHTTPCode502

    The number of 502 status codes per second in the VIP. Unit: Count/s

    AliyunAlb_VipHTTPCode503

    The number of 503 status codes per second in the VIP. Unit: Count/s

    AliyunAlb_VipHTTPCode504

    The number of 504 status codes per second in the VIP. Unit: Count/s

    AliyunAlb_VipHTTPCode5XX

    The number of 5XX status codes per second in the VIP. Unit: Count/s

    AliyunAlb_VipHTTPFixedResponse

    The number of custom responses per second in the VIP. Unit: Count/s

    AliyunAlb_VipHTTPRedirect

    The number of redirections per second in the VIP. Unit: Count/s

    AliyunAlb_VipInBits

    The inbound bandwidth in the VIP. Unit: bit/s

    AliyunAlb_VipInactiveConnection

    The number of inactive connections to the VIP. Unit: Count/s

    AliyunAlb_VipMaxConnection

    The maximum number of concurrent connections per second to the VIP. Unit: Count/s

    AliyunAlb_VipNewConnection

    The number of new connections per second to the VIP. Unit: Count/s

    AliyunAlb_VipNonStickyRequest

    The number of nonsticky requests per second in the VIP. Unit: Count/s

    AliyunAlb_VipOutBits

    The outbound bandwidth in the VIP. Unit: bit/s

    AliyunAlb_VipQPS

    The number of requests per second in the VIP. Unit: Count/s

    AliyunAlb_VipRejectedConnection

    The number of dropped connections per second to the VIP. Unit: Count/s

    AliyunAlb_VipRequestTime

    The request latency in the VIP. Unit: ms

    AliyunAlb_VipUpstreamConnectionError

    The number of failed connections per second to the backend server group associated with the VIP. Unit: Count/s

    AliyunAlb_VipUpstreamResponseTime

    The response time of the backend server group associated with the VIP. Unit: ms

    AliyunAlb_VipUpstreamTLSNegotiationError

    The number of TLS handshake failures in the backend server group associated with the VIP. Unit: Count/s

    Note
    • Percentage: the ratio of data entries generated by the metric to the total number of data entries.

    • Data entries: the number of data entries that are generated by the metric and persisted within the last 10 minutes.

  • Dashboard

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

  • 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.

Use a third-party Prometheus library

After ALB 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 ALB

  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