Integrate NLB with Managed Service for Prometheus
This topic describes how to use Managed Service for Prometheus to monitor your Network Load Balancer (NLB) instances by viewing metrics, dashboards, and alerts.
Overview
Managed Service for Prometheus is compatible with the open-source Prometheus ecosystem. It supports monitoring for various components, provides multiple ready-to-use dashboards, and offers a fully managed Prometheus service. For more information, see What is Managed Service for Prometheus?.
You can integrate NLB with Managed Service for Prometheus by using the paid Hybrid Cloud Monitoring feature. For more information, see the following table.
|
Integration type |
Description |
Metric fees |
Storage fees |
|
Hybrid Cloud Monitoring (paid) |
Managed Service for Prometheus calls the CloudMonitor API to obtain monitoring metrics. After you integrate NLB with Managed Service for Prometheus, you can use cloud service dashboards and alert rules to monitor your NLB service and configure alerts. |
CloudMonitor charges data transfer fees when NLB metrics are reported. For more information about billing, see Real-time data exporting. |
Managed Service for Prometheus stores the reported metrics free of charge. |
Prerequisites
-
Application Real-Time Monitoring Service (ARMS) is activated. For more information, see Activate ARMS.
-
Managed Service for Prometheus Pro Edition is activated. For more information, see Activate Managed Service for Prometheus Pro Edition.
Create a Prometheus instance
-
Log on to the Cloud Monitor console.
-
In the top navigation bar, select a region, and then click Create Prometheus Instance.
-
On the Create Instance page, configure the following parameters and click Create Now.
Parameter
Description
Instance Type
Select general-purpose instance or global aggregation instance. This topic uses general-purpose instance as an example.
Note-
General-purpose instance: a standard Prometheus instance suitable for various scenarios. You can use it for remote write storage with self-managed Prometheus or to collect metrics from containers, cloud services, and hosts.
-
Global aggregation instance: a virtual instance that aggregates data from multiple Managed Service for Prometheus instances. You can use a global aggregation instance for unified metric queries, a unified Grafana data source, and unified alerting across all associated instances.
Storage duration
Select a storage duration. The supported options are 15 Days, 30 Days, 60 Days, 90 Days, and 180 Days.
-
Integrate NLB with Managed Service for Prometheus
-
Log on to the ARMS console.
-
In the navigation pane on the left, click Integration Center.
-
On the Integration Center page, click the Middleware tab, and then click Alibaba Cloud NLB.
-
In the Alibaba Cloud NLB panel, select the destination region for your data and click OK. The integration takes about one to two minutes to complete.
-
Metrics
You can view the monitoring metrics for NLB on the Collect Metrics tab.
-
Alerts
On the Alert Rule Templates tab, you can create Prometheus alert rules and view alert information. For more information about how to create alert rules, see Create Prometheus alert rules.
-
Dashboards
On the Start Integration tab, click Integration Management. Then, navigate to Component Management > Dashboards and click NLB to view the performance metrics of your NLB instance.
Use third-party Prometheus libraries
After integrating NLB with Managed Service for Prometheus, you can use the remote write feature to send data to your self-managed Prometheus. For more information, see Create a general-purpose Prometheus instance.
Stop monitoring an NLB instance
-
Log on to the Cloud Monitor console.
-
On the Instances page, select the target region in the top navigation bar. In the row for the target instance, click Delete in the Actions column.
-
In the dialog box that appears, click OK.