All Products
Search
Document Center

Server Load Balancer:Integrate NLB with Managed Service for Prometheus

Last Updated:Jul 01, 2025

Managed Service for Prometheus can provide monitoring data of Network Load Balancer (NLB) instances, including metrics, alerts, and dashboards. This topic describes how to integrate NLB 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 NLB 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 NLB metrics. If NLB 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. In this example, select General-purpose 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, query Prometheus metrics, and manage Grafana data sources and alerts in a unified manner.

    Storage Duration

    Select 15 Days, 30 Days, 60 Days, 90 Days, or 180 Days.

Integrate NLB 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 NLB.

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

  • Metric

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

    NLB monitoring metrics supported by Managed Service for Prometheus

    Metric

    Description

    AliyunNlb_ActiveConnection

    Number of active connections to the listener per second

    AliyunNlb_DropConnection

    Number of connections dropped by listeners per second

    AliyunNlb_DropPacketRX

    Number of inbound packets dropped by listeners per second

    AliyunNlb_DropPacketTX

    Number of outbound packets dropped by listeners per second

    AliyunNlb_DropTrafficRX

    Number of inbound bits dropped by listeners per second

    AliyunNlb_DropTrafficTX

    Number of outbound bits dropped by listeners per second

    AliyunNlb_InactiveConnection

    Number of inactive connections to the listener

    AliyunNlb_InstanceActiveConnection

    Number of active connections to the NLB instance per second

    AliyunNlb_InstanceDropConnection

    Number of connections dropped on the NLB instance per second

    AliyunNlb_InstanceDropPacketRX

    Number of inbound packets dropped by the NLB instance per second

    AliyunNlb_InstanceDropPacketTX

    Number of outbound packets dropped by the NLB instance per second

    AliyunNlb_InstanceDropTrafficRX

    Number of inbound bits dropped by the NLB instance per second

    AliyunNlb_InstanceDropTrafficTX

    Number of outbound bits dropped by the NLB instance per second

    AliyunNlb_InstanceInactiveConnection

    Number of inactive connections to the NLB instance per second

    AliyunNlb_InstanceMaxConnection

    Maximum number of concurrent connections supported by the NLB instance

    AliyunNlb_InstanceNewConnection

    Number of new connections to the NLB instance per second

    AliyunNlb_InstancePacketRX

    Number of inbound packets to the NLB instance per second

    AliyunNlb_InstancePacketTX

    Number of outbound packets from the NLB instance per second

    AliyunNlb_InstanceTrafficRX

    Number of inbound bits to the NLB instance per second

    AliyunNlb_InstanceTrafficTX

    Number of outbound bits from the NLB instance per second

    AliyunNlb_InstanceUnhealthyServerCount

    Number of unhealthy backend Elastic Compute Service (ECS) instances

    AliyunNlb_ListenerHeathyServerCount

    Number of healthy backend ECS instances

    AliyunNlb_ListenerPacketRX

    Number of inbound packets to listeners per second

    AliyunNlb_ListenerPacketTX

    Number of outbound packets from listeners per second

    AliyunNlb_ListenerUnhealthyServerCount

    Number of unhealthy backend ECS instances

    AliyunNlb_MaxConnection

    Maximum number of connections supported by listeners per second

    AliyunNlb_NewConnection

    Number of new connections to listeners

    AliyunNlb_NlbInstanceHeathyServerCount

    Number of healthy backends of the NLB instance

    AliyunNlb_TrafficRXNew

    Number of inbound bits to listeners per second

    AliyunNlb_TrafficTXNew

    Number of outbound bits from listeners per second

  • 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 NLB. You can view the NLB monitoring data.

Use a third-party Prometheus library

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

  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