Skip to content

Metrics Collection


Guance Metrics collection is implemented based on DataKit (data collector), and its workflow follows a standardized pipeline model.

Deploy DataKit

Install DataKit

The following two installation methods are supported:

Configure Collector

Metrics collection through the standardized configuration of DataKit is realized, with the core process divided into four steps:

  1. Create a configuration template: Enter the target collector configuration directory (e.g., /usr/local/datakit/conf.d/mysql/), copy the official provided .conf.sample template file to a .conf suffix effective configuration;
  2. Edit key parameters: Define basic connections (such as MySQL's host) in the configuration file, collection strategies (such as interval time interval), and business tags;
  3. Restart to take effect: Execute datakit --restart to load the configuration, verify the status through log keywords (such as mysql collector started) and the datakit monitor command;
  4. Extend for multiple scenarios regarding infrastructure, MIDDLEWARE, and custom metrics.

For specific configuration steps, refer to Collector Configuration.

Custom Metrics Collection

In addition to collecting metrics data through DataKit, you can also achieve custom metrics collection for infrastructure, MIDDLEWARE, and business layers via multi-dimensional methods such as Prometheus system, HTTP API push, Graphite/StatsD protocol reception, Telegraf/Kafka pipeline transmission, SQL query generation, Python script extension, etc.





Tag Specifications

  • Prohibit dynamic tags (such as user_id, ip), use only static business tags (env, project).

  • Global tags (datakit.conf):

[global_tags]  
cluster = "k8s-01"  
region = "cn-east"  

Data Validation

Feedback

Is this page helpful? ×