tikv-importer supports metrics collection via Prometheus. This document introduces the monitor configuration and monitoring metrics of TiDB-Lightning.
[monitored_servers]section in the
inventory.ini. Then the Prometheus server can collect their metrics.
tikv-importer v2.1 uses Pushgateway to deliver
tikv-importer.toml to recognize the Pushgateway with the following settings:
[metric] # The Prometheus client push job name. job = "tikv-importer" # The Prometheus client push interval. interval = "15s" # The Prometheus Pushgateway address. address = ""
The metrics of
tidb-lightning can be gathered directly by Prometheus as long as it is discovered. You can set the metrics port in
[lightning] # HTTP port for debugging and Prometheus metrics pulling (0 to disable) pprof-port = 10089 ...
You need to configure Prometheus to make it discover the
tidb-lightning server. For instance, you can directly add the server address to the
... scrape_configs: - job_name: 'tidb-lightning' static_configs: - targets: ['192.168.20.10:10089']
This section explains the monitoring metrics of
Metrics provided by
tikv-importer are listed under the namespace
Bucketed histogram of importing RPC duration. Labels:
Bucketed histogram of importing write chunk bytes.
Bucketed histogram of importing write chunk duration.
Bucketed histogram of importing upload chunk bytes.
Bucketed histogram of importing upload chunk duration.
Metrics provided by
tidb-lightning are listed under the namespace
Counting open and closed engine files. Labels:
Counting idle workers. Values should be less than the
region-concurrency settings and are typically zero. Labels:
Counting open and closed KV encoders. KV encoders are in-memory TiDB instances that convert SQL
INSERT statements into KV pairs. The net values need to be bounded in a healthy situation. Labels:
Counting number of tables processed and their status. Labels:
Counting number of chunks processed and their status. Labels:
What’s on this page