This topic describes how to use Alibaba Cloud Managed Service for Prometheus to monitor Nebula Graph services.

Prerequisites

Elastic Compute Service (ECS) instances on which Nebula Graph services are deployed in different virtual private clouds (VPCs) are monitored by Prometheus Service. For more information, see Create a Prometheus instance to monitor an ECS instance.

Disadvantages of using a self-managed Prometheus service to monitor Nebula Graph services

When you use a self-managed Prometheus service to monitor Nebula Graph services that are deployed on ECS instances in different VPCs, the following issues may occur:

  • To ensure security and facilitate organization management, we recommend that you deploy business in separate VPCs. If you want to use a self-managed Prometheus service to monitor your business, you must deploy the self-managed Prometheus service in each VPC. This increases deployment and O&M costs.
  • You must deploy and configure Prometheus, Grafana, and Alertmanager to build a self-managed monitoring system. The process is complex and requires a long time to complete.
  • A self-managed Prometheus service does not have a service discovery mechanism that can be quickly implemented for Alibaba Cloud ECS. The services that are deployed on ECS instances cannot be identified based on ECS tags. If you want to implement a service discovery mechanism, you must write code in Golang to call the POP API of Alibaba Cloud ECS and integrate the open source Prometheus service. Then, you must compile and package the code, and deploy the open source Prometheus service. This process is complex and causes difficulties in version upgrades.
  • You cannot create custom dashboards in open source Grafana based on the working mechanisms of monitoring components and best practices.
  • Self-managed Prometheus services do not have alerting templates for Nebula Graph services. You must configure alert rules, which causes heavy workloads and technological challenges.

Comparison between self-managed Prometheus services and Alibaba Cloud Managed Service for Prometheus

The following table describes the differences between using self-managed Prometheus services and Alibaba Cloud Managed Service for Prometheus to monitor Nebula Graph services.

ItemSelf-managed Prometheus serviceAlibaba Cloud Managed Service for Prometheus
Deployment costs and O&M costsYou must purchase ECS instances to deploy Prometheus, Grafana, and Alertmanager in multiple VPCs. This leads to high O&M costs. Alibaba Cloud Managed Service for Prometheus integrates Prometheus, Grafana, and Alertmanager to provide fully managed, out-of-the-box, and O&M-free capabilities.
Availability, performance, and storage capacityThe overall performance and availability are poor, and the storage capacity is small. The overall performance and availability are high, and the storage capacity is large.
Service discoveryThe service discovery of ECS instances is implemented by using the static_configs parameter in open source Prometheus or third-party service registries. The service discovery process is complex and requires high maintenance costs.Similar to the label selector in Kubernetes, the aliyun_sd_configs parameter allows you to use ECS tags to match ECS instances. This simplifies service configuration and O&M tasks.
Grafana dashboardsOpen source Grafana dashboards show only the collected metrics. You cannot add custom metrics based on the working mechanism of Nebula Graph and best practices for monitoring Nebula Graph services. Alibaba Cloud Managed Service for Prometheus provides professional dashboard templates that you can use to monitor Nebula Graph services. The dashboards allow you to quickly obtain an accurate status overview of Nebula Graph services and helps you troubleshoot issues.
Alert rulesNo alerting template is available for monitoring Nebula Graph services. You must select metrics and configure alert rules based on your business requirements. Alibaba Cloud Managed Service for Prometheus provides professional and flexible alerting templates based on the best practices for monitoring Nebula Graph services. You can configure alert rules on the GUI.

Based on the preceding table, you can use Alibaba Cloud Managed Service for Prometheus to simplify the O&M process and reduce O&M costs. For information about how to use Alibaba Cloud Managed Service for Prometheus, see Use Alibaba Cloud Managed Service for Prometheus to monitor Nebula Graph services.

Use Alibaba Cloud Managed Service for Prometheus to monitor Nebula Graph services

Procedures

Procedure 1: Integration Center of Managed Service for Prometheus

  1. Log on to the ARMS console.
  2. In the left-side navigation pane, choose Prometheus Service > Prometheus Instances.
  3. Click the name of the Prometheus instance instance that you want to manage to go to the Integration Center page.

Procedure 2: Integration Center in the ARMS console

  1. Log on to the Application Real-time Monitoring Service (ARMS) console.
  2. In the left-side navigation pane, click Integration Center. On the Integration Center page, click Nebula in the Application Components section. In the Monitor Nebula panel, follow the on-screen instructions to add the component.

Step 1: Install and configure a Nebula exporter

This section describes how to install and configure a Nebula exporter on the Integration Center page of Managed Service for Prometheus.

  1. Install a Nebula exporter.
    • If you install a Nebula exporter for the first time, perform the following operation:
      In the uninstalled section of the Integration Center page, find the Nebula exporter and click Install. dgg
    • If you have installed a Nebula exporter, you need to add the exporter again:

      In the Installed section of the Integration Center page, click Add on the Nebula exporter.

  2. On the Configuration tab in the STEP2 section, configure the parameters and click OK. The following table describes the parameters.
    ParameterDescription
    Exporter NameThe name of the Nebula exporter. We recommend that you use the name of the Nebula Graph service.
    MetaD metrics listening portThe listening ports of Nebula Graph components. Alibaba Cloud Managed Service for Prometheus can obtain metric data over the ports.
    GraphD metrics listening port
    StorageD metrics listening port
    MetaD ECS Label Key(Service Discovery)The tag keys of Nebula Graph components. The tags are attached to ECS instances in VPCs to allow Alibaba Cloud Managed Service for Prometheus to identify the required ECS instances based on tags.
    GraphD ECS Label Key(Service Discovery)
    StorageD ECS Label Key(Service Discovery)
    Label value of MetaD monitorThe tag values of Nebula Graph components. The tags are attached to ECS instances in VPCs.
    Label value of GraphD monitor
    Label value of StorageD monitor
    Metrics scrape interval (seconds)The interval at which Alibaba Cloud Managed Service for Prometheus collects Nebula Graph monitoring data. Default value: 30. Unit: seconds.
    Note You can view the monitoring metrics on the Metrics tab in the STEP2 section.

    The installed components are displayed in the Installed section of the Integration Center page. Click the component. In the panel that appears, you can view information such as targets, metrics, dashboard, alerts, service discovery configurations, and exporters. For more information, see Integration center.

Step 2: View the Nebula Graph monitoring data on the dashboards

By default, Alibaba Cloud Managed Service for Prometheus provides Grafana dashboards that you can use to monitor Nebula Graph services. You can view the monitoring data of Nebula Graph components on the dashboards without the need to deploy a Grafana service.

In the Installed section of the Integration Center page, click the Nebula exporter. In the Nebula panel, click the Dashboards tab to view the thumbnails and hyperlinks of Nebula dashboards. Click a hyperlink to go to the Grafana page and view the dashboard. di

Step 3: Configure alert rules for monitoring Nebula Graph services

In the Installed section of the Integration Center page, click the Nebula exporter. In the Nebula panel, click the Alerts tab and select Nebula from the Alert Contact Group drop-down list to view the alert rules that are configured in Managed Service for Prometheus for monitoring Nebula Graph services.

Alibaba Cloud Managed Service for Prometheus creates the recommended alert rules for Nebula Graph components. You can change the thresholds of the alert rules, and then enable the alert rules. You can also create alert rules based on your business requirements. For more information, see Create an alert rule for a Prometheus instance.