This document describes how to install Node Exporter to expose CVM basic metrics to TMP.
Download and install Node Exporter (used to collect basic metric data) in the target CVM instance. Click here or run the following command for download:
wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz && tar -xvf node_exporter-1.3.1.linux-amd64.tar.gz
The file directory is as follows:
cd node_exporter-1.3.1.linux-amd64 ./node_exporter
If the following result is displayed, basic monitoring data has been collected successfully.
2. Run the following command to expose the basic monitoring data to port 9100:
You can see the following metric monitoring data that is exposed after the command is executed.
Log in to the TMP console, select Integration Center > CVM, and configure the information in Task Configuration as prompted.
Below is a sample configuration of a scrape task:
job_name: example-job-name metrics_path: /metrics cvm_sd_configs: - region: ap-guangzhou ports: - 9100 filters: - name: tag: Sample tag key values: - Sample tag value relabel_configs: - source_labels: [__meta_cvm_instance_state] regex: RUNNING action: keep - regex: __meta_cvm_tag_(.*) replacement: $1 action: labelmap - source_labels: [__meta_cvm_region] target_label: region action: replace
Log in to the TMP console and click the Grafana icon to enter Grafana.
job="cvm_node_exporter"} in Explore to see whether there is data, and if so, data is reported successfully.
Every product has some existing JSON files that can be directly imported into the dashboard.
node_exporter, and select the latest dashboard for download.