Help Center/ Cloud Eye/ User Guide/ Access Center/ Connecting to Prometheus or Grafana/ Exporting Monitoring Data from Cloud Eye to Self-built Prometheus
Updated on 2025-09-11 GMT+08:00

Exporting Monitoring Data from Cloud Eye to Self-built Prometheus

Prometheus is an open source visualization tool used to display large-scale monitoring data. It has a wide user base in areas such as industrial monitoring, meteorological monitoring, home automation, and process management. After connecting Cloud Eye to Prometheus, you can use Prometheus to better monitor and analyze data from Cloud Eye.

Grafana is an open source visualization and analysis platform. It supports multiple data sources and provides multiple panels and plug-ins to quickly turn complex data into insightful graphs and visualizations. After connecting Cloud Eye to Prometheus, you can use Grafana to better analyze and display data from Cloud Eye.

Prerequisites

cloudeye-exporter has been installed and configured.

Procedure

  1. Download the Prometheus software from https://prometheus.io/download/.
  2. Configure Prometheus to interconnect with cloudeye-exporter.

    Modify the prometheus.yml file in Prometheus. Add a node whose job_name is huaweicloud to scrape_configs. targets indicates the IP address and port number for accessing cloudeye-exporter. services indicates the services to be monitored, for example, SYS.VPC and SYS.RDS.

    Note: If dashboard-related resources use enterprise project tags, you need to add the enterprise project-related configuration to scrape_configs. The following is specific configuration.

    global:
      scrape_interval: 1m # This parameter specifies the interval for Prometheus to query data from cloudeye-exporter. The default value is 15s in the Prometheus configuration file. The recommended value is 1m.
      scrape_timeout: 1m # This parameter specifies the timeout interval for querying data from the cloudeye-exporter. The default value is 15s in the Prometheus configuration file. The recommended value is 1m.
    scrape_configs:
      - job_name: 'huaweicloud'
        static_configs:
          - targets: ['192.168.0.xx:8087'] # This parameter specifies the node IP address and listening port number of cloudeye-exporter.
        params:
          services: ['SYS.VPC,SYS.RDS'] # This parameter specifies the namespace of the service to be queried by the current task. You are advised to configure an independent job for each service.
      - job_name: "prometheus-eps"
        metrics_path: '/eps-info' # Obtain the URL of the enterprise project.
        static_configs:
          - targets: ["192.168.0.xx:8087"] # This parameter specifies the node IP address and listening port number of cloudeye-exporter.
        params:
          services: []
  3. Start Prometheus in the installation directory to interconnect with cloudeye-exporter.
    ./prometheus
    1. The default local login address is http://127.0.0.1:9090/graph.
    2. View the monitoring result of a specified metric.
      Figure 1 Monitoring results
  4. Download the Grafana software from https://grafana.com/grafana/download.
  5. Connect Grafana to Prometheus.
    1. Log in to Grafana. The default local login address is http://127.0.0.1:3000.
      Figure 2 Logging in to Grafana
    2. Configure the Prometheus data source. On the Grafana page, click the settings icon. Under Data source, click Add data source. On the page displayed, enter the Prometheus address and click Save & test.
      Figure 3 Configuring the Prometheus data source
  6. Configure monitoring graphs for cloud services.

    You are advised to use the templates provided by Cloud Eye and involve the enterprise projects. Complete the enterprise project configuration in the Prometheus configuration file in step 2. The procedure for importing a template is as follows:

    1. Click + and click Import.
      Figure 4 Import
    2. Enter a JSON template file and click Load.
      Figure 5 Loading a JSON template

      To obtain the template files of different cloud services, visit the following websites: