TiDB is an open-source NewSQL database that supports Hybrid Transactional and Analytical Processing workloads. It is MySQL compatible and can provide horizontal scalability, strong consistency, and high availability. It is developed and supported primarily by PingCAP, Inc. and licensed under Apache 2.0.
The template to monitor TiDB server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
Zabbix version: 7.4 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with TiDB server of TiDB cluster. Internal service metrics are collected from TiDB /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$TIDB.URL}, {$TIDB.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$TIDB.PORT} | The port of TiDB server metrics web endpoint |
10080 |
| {$TIDB.URL} | TiDB server URL |
localhost |
| {$TIDB.OPEN.FDS.MAX.WARN} | Maximum percentage of used file descriptors |
90 |
| {$TIDB.HEAP.USAGE.MAX.WARN} | Maximum heap memory used |
10G |
| {$TIDB.DDL.WAITING.MAX.WARN} | Maximum number of DDL tasks that are waiting |
5 |
| {$TIDB.TIME_JUMP_BACK.MAX.WARN} | Maximum number of times that the operating system rewinds every second |
1 |
| {$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} | Maximum number of schema lease errors |
0 |
| {$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} | Maximum number of load schema errors |
1 |
| {$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} | Maximum number of GC-related operations failures |
1 |
| {$TIDB.REGION_ERROR.MAX.WARN} | Maximum number of region related errors |
50 |
| {$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} | Minimum number of keep alive operations |
10 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get instance metrics | Get TiDB instance metrics. |
HTTP agent | tidb.get_metrics Preprocessing
|
| Get instance status | Get TiDB instance status info. |
HTTP agent | tidb.get_status Preprocessing
|
| Status | Status of PD instance. |
Dependent item | tidb.status Preprocessing
|
| Get total server query metrics | Get information about server queries. |
Dependent item | tidb.server_query.get_metrics Preprocessing
|
| Total "error" server query, rate | The number of queries on TiDB instance per second with failure of command execution results. |
Dependent item | tidb.server_query.error.rate Preprocessing
|
| Total "ok" server query, rate | The number of queries on TiDB instance per second with success of command execution results. |
Dependent item | tidb.server_query.ok.rate Preprocessing
|
| Total server query, rate | The number of queries per second on TiDB instance. |
Dependent item | tidb.server_query.rate Preprocessing
|
| Get SQL statements metrics | Get SQL statements metrics. |
Dependent item | tidb.statement_total.get_metrics Preprocessing
|
| SQL statements, rate | The total number of SQL statements executed per second. |
Dependent item | tidb.statement_total.rate Preprocessing
|
| Failed Query, rate | The number of error occurred when executing SQL statements per second (such as syntax errors and primary key conflicts). |
Dependent item | tidb.execute_error.rate Preprocessing
|
| Get TiKV client metrics | Get TiKV client metrics. |
Dependent item | tidb.tikvclient.get_metrics Preprocessing
|
| KV commands, rate | The number of executed KV commands per second. |
Dependent item | tidb.tikvclient_txn.rate Preprocessing
|
| PD TSO commands, rate | The number of TSO commands that TiDB obtains from PD per second. |
Dependent item | tidb.pd_tso_cmd.rate Preprocessing
|
| PD TSO requests, rate | The number of TSO requests that TiDB obtains from PD per second. |
Dependent item | tidb.pd_tso_request.rate Preprocessing
|
| TiClient region errors, rate | The number of region related errors returned by TiKV per second. |
Dependent item | tidb.tikvclient_region_err.rate Preprocessing
|
| Lock resolves, rate | The number of DDL tasks that are waiting. |
Dependent item | tidb.tikvclient_lock_resolver_action.rate Preprocessing
|
| DDL waiting jobs | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.ddl_waiting_jobs Preprocessing
|
| Load schema total, rate | The statistics of the schemas that TiDB obtains from TiKV per second. |
Dependent item | tidb.domain_load_schema.rate Preprocessing
|
| Load schema failed, rate | The total number of failures to reload the latest schema information in TiDB per second. |
Dependent item | tidb.domain_load_schema.failed.rate Preprocessing
|
| Schema lease "outdate" errors , rate | The number of schema lease errors per second. "outdate" errors means that the schema cannot be updated, which is a more serious error and triggers an alert. |
Dependent item | tidb.session_schema_lease_error.outdate.rate Preprocessing
|
| Schema lease "change" errors, rate | The number of schema lease errors per second. "change" means that the schema has changed |
Dependent item | tidb.session_schema_lease_error.change.rate Preprocessing
|
| KV backoff, rate | The number of errors returned by TiKV. |
Dependent item | tidb.tikvclient_backoff.rate Preprocessing
|
| Keep alive, rate | The number of times that the metrics are refreshed on TiDB instance per minute. |
Dependent item | tidb.monitor_keep_alive.rate Preprocessing
|
| Server connections | The connection number of current TiDB instance. |
Dependent item | tidb.tidb_server_connections Preprocessing
|
| Heap memory usage | Number of heap bytes that are in use. |
Dependent item | tidb.heap_bytes Preprocessing
|
| RSS memory usage | Resident memory size in bytes. |
Dependent item | tidb.rss_bytes Preprocessing
|
| Goroutine count | The number of Goroutines on TiDB instance. |
Dependent item | tidb.goroutines Preprocessing
|
| Open file descriptors | Number of open file descriptors. |
Dependent item | tidb.process_open_fds Preprocessing
|
| Open file descriptors, max | Maximum number of open file descriptors. |
Dependent item | tidb.process_max_fds Preprocessing
|
| CPU | Total user and system CPU usage ratio. |
Dependent item | tidb.cpu.util Preprocessing
|
| Uptime | The runtime of each TiDB instance. |
Dependent item | tidb.uptime Preprocessing
|
| Version | Version of the TiDB instance. |
Dependent item | tidb.version Preprocessing
|
| Time jump back, rate | The number of times that the operating system rewinds every second. |
Dependent item | tidb.monitor_time_jump_back.rate Preprocessing
|
| Server critical error, rate | The number of critical errors occurred in TiDB per second. |
Dependent item | tidb.tidb_server_critical_error_total.rate Preprocessing
|
| Server panic, rate | The number of panics occurred in TiDB per second. |
Dependent item | tidb.tidb_server_panic_total.rate Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Instance is not responding | last(/TiDB by HTTP/tidb.status)=0 |
Average | ||
| TiDB: Too many region related errors | min(/TiDB by HTTP/tidb.tikvclient_region_err.rate,5m)>{$TIDB.REGION_ERROR.MAX.WARN} |
Average | ||
| TiDB: Too many DDL waiting jobs | min(/TiDB by HTTP/tidb.ddl_waiting_jobs,5m)>{$TIDB.DDL.WAITING.MAX.WARN} |
Warning | ||
| TiDB: Too many schema lease errors | min(/TiDB by HTTP/tidb.domain_load_schema.failed.rate,5m)>{$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} |
Average | ||
| TiDB: Too many schema lease errors | The latest schema information is not reloaded in TiDB within one lease. |
min(/TiDB by HTTP/tidb.session_schema_lease_error.outdate.rate,5m)>{$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} |
Average | |
| TiDB: Too few keep alive operations | Indicates whether the TiDB process still exists. If the number of times for tidb_monitor_keep_alive_total increases less than 10 per minute, the TiDB process might already exit and an alert is triggered. |
max(/TiDB by HTTP/tidb.monitor_keep_alive.rate,5m)<{$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} |
Average | |
| TiDB: Heap memory usage is too high | min(/TiDB by HTTP/tidb.heap_bytes,5m)>{$TIDB.HEAP.USAGE.MAX.WARN} |
Warning | ||
| TiDB: Current number of open files is too high | Heavy file descriptor usage (i.e., near the process's file descriptor limit) indicates a potential file descriptor exhaustion issue. |
min(/TiDB by HTTP/tidb.process_open_fds,5m)/last(/TiDB by HTTP/tidb.process_max_fds)*100>{$TIDB.OPEN.FDS.MAX.WARN} |
Warning | |
| TiDB: Instance has been restarted | Uptime is less than 10 minutes. |
last(/TiDB by HTTP/tidb.uptime)<10m |
Info | Manual close: Yes |
| TiDB: Version has changed | TiDB version has changed. Acknowledge to close the problem manually. |
last(/TiDB by HTTP/tidb.version,#1)<>last(/TiDB by HTTP/tidb.version,#2) and length(last(/TiDB by HTTP/tidb.version))>0 |
Info | Manual close: Yes |
| TiDB: Too many time jump backs | min(/TiDB by HTTP/tidb.monitor_time_jump_back.rate,5m)>{$TIDB.TIME_JUMP_BACK.MAX.WARN} |
Warning | ||
| TiDB: There are panicked TiDB threads | When a panic occurs, an alert is triggered. The thread is often recovered, otherwise, TiDB will frequently restart. |
last(/TiDB by HTTP/tidb.tidb_server_panic_total.rate)>0 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS specific metrics. |
Dependent item | tidb.qps.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get QPS metrics: {#TYPE} | Get QPS metrics of {#TYPE}. |
Dependent item | tidb.qps.get_metrics[{#TYPE}] Preprocessing
|
| Server query "OK": {#TYPE}, rate | The number of queries on TiDB instance per second with success of command execution results. |
Dependent item | tidb.server_query.ok.rate[{#TYPE}] Preprocessing
|
| Server query "Error": {#TYPE}, rate | The number of queries on TiDB instance per second with failure of command execution results. |
Dependent item | tidb.server_query.error.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Statement metrics discovery | Discovery statement specific metrics. |
Dependent item | tidb.statement.discover Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| SQL statements: {#TYPE}, rate | The number of SQL statements executed per second. |
Dependent item | tidb.statement.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV metrics discovery | Discovery KV specific metrics. |
Dependent item | tidb.kv_ops.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV Commands: {#TYPE}, rate | The number of executed KV commands per second. |
Dependent item | tidb.tikvclient_txn.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Lock resolves discovery | Discovery lock resolves specific metrics. |
Dependent item | tidb.tikvclient_lock_resolver_action.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Lock resolves: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.tikvclient_lock_resolver_action.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV backoff discovery | Discovery KV backoff specific metrics. |
Dependent item | tidb.tikvclient_backoff.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV backoff: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.tikvclient_backoff.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GC action results discovery | Discovery GC action results metrics. |
Dependent item | tidb.tikvclient_gc_action.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GC action result: {#TYPE}, rate | The number of results of GC-related operations per second. |
Dependent item | tidb.tikvclient_gc_action.rate[{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Too many failed GC-related operations | min(/TiDB by HTTP/tidb.tikvclient_gc_action.rate[{#TYPE}],5m)>{$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} |
Warning |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
The template to monitor TiDB server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
Zabbix version: 7.2 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with TiDB server of TiDB cluster. Internal service metrics are collected from TiDB /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$TIDB.URL}, {$TIDB.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$TIDB.PORT} | The port of TiDB server metrics web endpoint |
10080 |
| {$TIDB.URL} | TiDB server URL |
localhost |
| {$TIDB.OPEN.FDS.MAX.WARN} | Maximum percentage of used file descriptors |
90 |
| {$TIDB.HEAP.USAGE.MAX.WARN} | Maximum heap memory used |
10G |
| {$TIDB.DDL.WAITING.MAX.WARN} | Maximum number of DDL tasks that are waiting |
5 |
| {$TIDB.TIME_JUMP_BACK.MAX.WARN} | Maximum number of times that the operating system rewinds every second |
1 |
| {$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} | Maximum number of schema lease errors |
0 |
| {$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} | Maximum number of load schema errors |
1 |
| {$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} | Maximum number of GC-related operations failures |
1 |
| {$TIDB.REGION_ERROR.MAX.WARN} | Maximum number of region related errors |
50 |
| {$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} | Minimum number of keep alive operations |
10 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get instance metrics | Get TiDB instance metrics. |
HTTP agent | tidb.get_metrics Preprocessing
|
| Get instance status | Get TiDB instance status info. |
HTTP agent | tidb.get_status Preprocessing
|
| Status | Status of PD instance. |
Dependent item | tidb.status Preprocessing
|
| Get total server query metrics | Get information about server queries. |
Dependent item | tidb.server_query.get_metrics Preprocessing
|
| Total "error" server query, rate | The number of queries on TiDB instance per second with failure of command execution results. |
Dependent item | tidb.server_query.error.rate Preprocessing
|
| Total "ok" server query, rate | The number of queries on TiDB instance per second with success of command execution results. |
Dependent item | tidb.server_query.ok.rate Preprocessing
|
| Total server query, rate | The number of queries per second on TiDB instance. |
Dependent item | tidb.server_query.rate Preprocessing
|
| Get SQL statements metrics | Get SQL statements metrics. |
Dependent item | tidb.statement_total.get_metrics Preprocessing
|
| SQL statements, rate | The total number of SQL statements executed per second. |
Dependent item | tidb.statement_total.rate Preprocessing
|
| Failed Query, rate | The number of error occurred when executing SQL statements per second (such as syntax errors and primary key conflicts). |
Dependent item | tidb.execute_error.rate Preprocessing
|
| Get TiKV client metrics | Get TiKV client metrics. |
Dependent item | tidb.tikvclient.get_metrics Preprocessing
|
| KV commands, rate | The number of executed KV commands per second. |
Dependent item | tidb.tikvclient_txn.rate Preprocessing
|
| PD TSO commands, rate | The number of TSO commands that TiDB obtains from PD per second. |
Dependent item | tidb.pd_tso_cmd.rate Preprocessing
|
| PD TSO requests, rate | The number of TSO requests that TiDB obtains from PD per second. |
Dependent item | tidb.pd_tso_request.rate Preprocessing
|
| TiClient region errors, rate | The number of region related errors returned by TiKV per second. |
Dependent item | tidb.tikvclient_region_err.rate Preprocessing
|
| Lock resolves, rate | The number of DDL tasks that are waiting. |
Dependent item | tidb.tikvclient_lock_resolver_action.rate Preprocessing
|
| DDL waiting jobs | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.ddl_waiting_jobs Preprocessing
|
| Load schema total, rate | The statistics of the schemas that TiDB obtains from TiKV per second. |
Dependent item | tidb.domain_load_schema.rate Preprocessing
|
| Load schema failed, rate | The total number of failures to reload the latest schema information in TiDB per second. |
Dependent item | tidb.domain_load_schema.failed.rate Preprocessing
|
| Schema lease "outdate" errors , rate | The number of schema lease errors per second. "outdate" errors means that the schema cannot be updated, which is a more serious error and triggers an alert. |
Dependent item | tidb.session_schema_lease_error.outdate.rate Preprocessing
|
| Schema lease "change" errors, rate | The number of schema lease errors per second. "change" means that the schema has changed |
Dependent item | tidb.session_schema_lease_error.change.rate Preprocessing
|
| KV backoff, rate | The number of errors returned by TiKV. |
Dependent item | tidb.tikvclient_backoff.rate Preprocessing
|
| Keep alive, rate | The number of times that the metrics are refreshed on TiDB instance per minute. |
Dependent item | tidb.monitor_keep_alive.rate Preprocessing
|
| Server connections | The connection number of current TiDB instance. |
Dependent item | tidb.tidb_server_connections Preprocessing
|
| Heap memory usage | Number of heap bytes that are in use. |
Dependent item | tidb.heap_bytes Preprocessing
|
| RSS memory usage | Resident memory size in bytes. |
Dependent item | tidb.rss_bytes Preprocessing
|
| Goroutine count | The number of Goroutines on TiDB instance. |
Dependent item | tidb.goroutines Preprocessing
|
| Open file descriptors | Number of open file descriptors. |
Dependent item | tidb.process_open_fds Preprocessing
|
| Open file descriptors, max | Maximum number of open file descriptors. |
Dependent item | tidb.process_max_fds Preprocessing
|
| CPU | Total user and system CPU usage ratio. |
Dependent item | tidb.cpu.util Preprocessing
|
| Uptime | The runtime of each TiDB instance. |
Dependent item | tidb.uptime Preprocessing
|
| Version | Version of the TiDB instance. |
Dependent item | tidb.version Preprocessing
|
| Time jump back, rate | The number of times that the operating system rewinds every second. |
Dependent item | tidb.monitor_time_jump_back.rate Preprocessing
|
| Server critical error, rate | The number of critical errors occurred in TiDB per second. |
Dependent item | tidb.tidb_server_critical_error_total.rate Preprocessing
|
| Server panic, rate | The number of panics occurred in TiDB per second. |
Dependent item | tidb.tidb_server_panic_total.rate Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Instance is not responding | last(/TiDB by HTTP/tidb.status)=0 |
Average | ||
| TiDB: Too many region related errors | min(/TiDB by HTTP/tidb.tikvclient_region_err.rate,5m)>{$TIDB.REGION_ERROR.MAX.WARN} |
Average | ||
| TiDB: Too many DDL waiting jobs | min(/TiDB by HTTP/tidb.ddl_waiting_jobs,5m)>{$TIDB.DDL.WAITING.MAX.WARN} |
Warning | ||
| TiDB: Too many schema lease errors | min(/TiDB by HTTP/tidb.domain_load_schema.failed.rate,5m)>{$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} |
Average | ||
| TiDB: Too many schema lease errors | The latest schema information is not reloaded in TiDB within one lease. |
min(/TiDB by HTTP/tidb.session_schema_lease_error.outdate.rate,5m)>{$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} |
Average | |
| TiDB: Too few keep alive operations | Indicates whether the TiDB process still exists. If the number of times for tidb_monitor_keep_alive_total increases less than 10 per minute, the TiDB process might already exit and an alert is triggered. |
max(/TiDB by HTTP/tidb.monitor_keep_alive.rate,5m)<{$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} |
Average | |
| TiDB: Heap memory usage is too high | min(/TiDB by HTTP/tidb.heap_bytes,5m)>{$TIDB.HEAP.USAGE.MAX.WARN} |
Warning | ||
| TiDB: Current number of open files is too high | Heavy file descriptor usage (i.e., near the process's file descriptor limit) indicates a potential file descriptor exhaustion issue. |
min(/TiDB by HTTP/tidb.process_open_fds,5m)/last(/TiDB by HTTP/tidb.process_max_fds)*100>{$TIDB.OPEN.FDS.MAX.WARN} |
Warning | |
| TiDB: Instance has been restarted | Uptime is less than 10 minutes. |
last(/TiDB by HTTP/tidb.uptime)<10m |
Info | Manual close: Yes |
| TiDB: Version has changed | TiDB version has changed. Acknowledge to close the problem manually. |
last(/TiDB by HTTP/tidb.version,#1)<>last(/TiDB by HTTP/tidb.version,#2) and length(last(/TiDB by HTTP/tidb.version))>0 |
Info | Manual close: Yes |
| TiDB: Too many time jump backs | min(/TiDB by HTTP/tidb.monitor_time_jump_back.rate,5m)>{$TIDB.TIME_JUMP_BACK.MAX.WARN} |
Warning | ||
| TiDB: There are panicked TiDB threads | When a panic occurs, an alert is triggered. The thread is often recovered, otherwise, TiDB will frequently restart. |
last(/TiDB by HTTP/tidb.tidb_server_panic_total.rate)>0 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS specific metrics. |
Dependent item | tidb.qps.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get QPS metrics: {#TYPE} | Get QPS metrics of {#TYPE}. |
Dependent item | tidb.qps.get_metrics[{#TYPE}] Preprocessing
|
| Server query "OK": {#TYPE}, rate | The number of queries on TiDB instance per second with success of command execution results. |
Dependent item | tidb.server_query.ok.rate[{#TYPE}] Preprocessing
|
| Server query "Error": {#TYPE}, rate | The number of queries on TiDB instance per second with failure of command execution results. |
Dependent item | tidb.server_query.error.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Statement metrics discovery | Discovery statement specific metrics. |
Dependent item | tidb.statement.discover Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| SQL statements: {#TYPE}, rate | The number of SQL statements executed per second. |
Dependent item | tidb.statement.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV metrics discovery | Discovery KV specific metrics. |
Dependent item | tidb.kv_ops.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV Commands: {#TYPE}, rate | The number of executed KV commands per second. |
Dependent item | tidb.tikvclient_txn.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Lock resolves discovery | Discovery lock resolves specific metrics. |
Dependent item | tidb.tikvclient_lock_resolver_action.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Lock resolves: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.tikvclient_lock_resolver_action.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV backoff discovery | Discovery KV backoff specific metrics. |
Dependent item | tidb.tikvclient_backoff.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV backoff: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.tikvclient_backoff.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GC action results discovery | Discovery GC action results metrics. |
Dependent item | tidb.tikvclient_gc_action.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GC action result: {#TYPE}, rate | The number of results of GC-related operations per second. |
Dependent item | tidb.tikvclient_gc_action.rate[{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Too many failed GC-related operations | min(/TiDB by HTTP/tidb.tikvclient_gc_action.rate[{#TYPE}],5m)>{$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} |
Warning |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
The template to monitor TiDB server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
Zabbix version: 7.0 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with TiDB server of TiDB cluster. Internal service metrics are collected from TiDB /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$TIDB.URL}, {$TIDB.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$TIDB.PORT} | The port of TiDB server metrics web endpoint |
10080 |
| {$TIDB.URL} | TiDB server URL |
localhost |
| {$TIDB.OPEN.FDS.MAX.WARN} | Maximum percentage of used file descriptors |
90 |
| {$TIDB.HEAP.USAGE.MAX.WARN} | Maximum heap memory used |
10G |
| {$TIDB.DDL.WAITING.MAX.WARN} | Maximum number of DDL tasks that are waiting |
5 |
| {$TIDB.TIME_JUMP_BACK.MAX.WARN} | Maximum number of times that the operating system rewinds every second |
1 |
| {$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} | Maximum number of schema lease errors |
0 |
| {$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} | Maximum number of load schema errors |
1 |
| {$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} | Maximum number of GC-related operations failures |
1 |
| {$TIDB.REGION_ERROR.MAX.WARN} | Maximum number of region related errors |
50 |
| {$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} | Minimum number of keep alive operations |
10 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get instance metrics | Get TiDB instance metrics. |
HTTP agent | tidb.get_metrics Preprocessing
|
| Get instance status | Get TiDB instance status info. |
HTTP agent | tidb.get_status Preprocessing
|
| Status | Status of PD instance. |
Dependent item | tidb.status Preprocessing
|
| Get total server query metrics | Get information about server queries. |
Dependent item | tidb.server_query.get_metrics Preprocessing
|
| Total "error" server query, rate | The number of queries on TiDB instance per second with failure of command execution results. |
Dependent item | tidb.server_query.error.rate Preprocessing
|
| Total "ok" server query, rate | The number of queries on TiDB instance per second with success of command execution results. |
Dependent item | tidb.server_query.ok.rate Preprocessing
|
| Total server query, rate | The number of queries per second on TiDB instance. |
Dependent item | tidb.server_query.rate Preprocessing
|
| Get SQL statements metrics | Get SQL statements metrics. |
Dependent item | tidb.statement_total.get_metrics Preprocessing
|
| SQL statements, rate | The total number of SQL statements executed per second. |
Dependent item | tidb.statement_total.rate Preprocessing
|
| Failed Query, rate | The number of error occurred when executing SQL statements per second (such as syntax errors and primary key conflicts). |
Dependent item | tidb.execute_error.rate Preprocessing
|
| Get TiKV client metrics | Get TiKV client metrics. |
Dependent item | tidb.tikvclient.get_metrics Preprocessing
|
| KV commands, rate | The number of executed KV commands per second. |
Dependent item | tidb.tikvclient_txn.rate Preprocessing
|
| PD TSO commands, rate | The number of TSO commands that TiDB obtains from PD per second. |
Dependent item | tidb.pd_tso_cmd.rate Preprocessing
|
| PD TSO requests, rate | The number of TSO requests that TiDB obtains from PD per second. |
Dependent item | tidb.pd_tso_request.rate Preprocessing
|
| TiClient region errors, rate | The number of region related errors returned by TiKV per second. |
Dependent item | tidb.tikvclient_region_err.rate Preprocessing
|
| Lock resolves, rate | The number of DDL tasks that are waiting. |
Dependent item | tidb.tikvclient_lock_resolver_action.rate Preprocessing
|
| DDL waiting jobs | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.ddl_waiting_jobs Preprocessing
|
| Load schema total, rate | The statistics of the schemas that TiDB obtains from TiKV per second. |
Dependent item | tidb.domain_load_schema.rate Preprocessing
|
| Load schema failed, rate | The total number of failures to reload the latest schema information in TiDB per second. |
Dependent item | tidb.domain_load_schema.failed.rate Preprocessing
|
| Schema lease "outdate" errors , rate | The number of schema lease errors per second. "outdate" errors means that the schema cannot be updated, which is a more serious error and triggers an alert. |
Dependent item | tidb.session_schema_lease_error.outdate.rate Preprocessing
|
| Schema lease "change" errors, rate | The number of schema lease errors per second. "change" means that the schema has changed |
Dependent item | tidb.session_schema_lease_error.change.rate Preprocessing
|
| KV backoff, rate | The number of errors returned by TiKV. |
Dependent item | tidb.tikvclient_backoff.rate Preprocessing
|
| Keep alive, rate | The number of times that the metrics are refreshed on TiDB instance per minute. |
Dependent item | tidb.monitor_keep_alive.rate Preprocessing
|
| Server connections | The connection number of current TiDB instance. |
Dependent item | tidb.tidb_server_connections Preprocessing
|
| Heap memory usage | Number of heap bytes that are in use. |
Dependent item | tidb.heap_bytes Preprocessing
|
| RSS memory usage | Resident memory size in bytes. |
Dependent item | tidb.rss_bytes Preprocessing
|
| Goroutine count | The number of Goroutines on TiDB instance. |
Dependent item | tidb.goroutines Preprocessing
|
| Open file descriptors | Number of open file descriptors. |
Dependent item | tidb.process_open_fds Preprocessing
|
| Open file descriptors, max | Maximum number of open file descriptors. |
Dependent item | tidb.process_max_fds Preprocessing
|
| CPU | Total user and system CPU usage ratio. |
Dependent item | tidb.cpu.util Preprocessing
|
| Uptime | The runtime of each TiDB instance. |
Dependent item | tidb.uptime Preprocessing
|
| Version | Version of the TiDB instance. |
Dependent item | tidb.version Preprocessing
|
| Time jump back, rate | The number of times that the operating system rewinds every second. |
Dependent item | tidb.monitor_time_jump_back.rate Preprocessing
|
| Server critical error, rate | The number of critical errors occurred in TiDB per second. |
Dependent item | tidb.tidb_server_critical_error_total.rate Preprocessing
|
| Server panic, rate | The number of panics occurred in TiDB per second. |
Dependent item | tidb.tidb_server_panic_total.rate Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Instance is not responding | last(/TiDB by HTTP/tidb.status)=0 |
Average | ||
| TiDB: Too many region related errors | min(/TiDB by HTTP/tidb.tikvclient_region_err.rate,5m)>{$TIDB.REGION_ERROR.MAX.WARN} |
Average | ||
| TiDB: Too many DDL waiting jobs | min(/TiDB by HTTP/tidb.ddl_waiting_jobs,5m)>{$TIDB.DDL.WAITING.MAX.WARN} |
Warning | ||
| TiDB: Too many schema lease errors | min(/TiDB by HTTP/tidb.domain_load_schema.failed.rate,5m)>{$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} |
Average | ||
| TiDB: Too many schema lease errors | The latest schema information is not reloaded in TiDB within one lease. |
min(/TiDB by HTTP/tidb.session_schema_lease_error.outdate.rate,5m)>{$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} |
Average | |
| TiDB: Too few keep alive operations | Indicates whether the TiDB process still exists. If the number of times for tidb_monitor_keep_alive_total increases less than 10 per minute, the TiDB process might already exit and an alert is triggered. |
max(/TiDB by HTTP/tidb.monitor_keep_alive.rate,5m)<{$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} |
Average | |
| TiDB: Heap memory usage is too high | min(/TiDB by HTTP/tidb.heap_bytes,5m)>{$TIDB.HEAP.USAGE.MAX.WARN} |
Warning | ||
| TiDB: Current number of open files is too high | Heavy file descriptor usage (i.e., near the process's file descriptor limit) indicates a potential file descriptor exhaustion issue. |
min(/TiDB by HTTP/tidb.process_open_fds,5m)/last(/TiDB by HTTP/tidb.process_max_fds)*100>{$TIDB.OPEN.FDS.MAX.WARN} |
Warning | |
| TiDB: Instance has been restarted | Uptime is less than 10 minutes. |
last(/TiDB by HTTP/tidb.uptime)<10m |
Info | Manual close: Yes |
| TiDB: Version has changed | TiDB version has changed. Acknowledge to close the problem manually. |
last(/TiDB by HTTP/tidb.version,#1)<>last(/TiDB by HTTP/tidb.version,#2) and length(last(/TiDB by HTTP/tidb.version))>0 |
Info | Manual close: Yes |
| TiDB: Too many time jump backs | min(/TiDB by HTTP/tidb.monitor_time_jump_back.rate,5m)>{$TIDB.TIME_JUMP_BACK.MAX.WARN} |
Warning | ||
| TiDB: There are panicked TiDB threads | When a panic occurs, an alert is triggered. The thread is often recovered, otherwise, TiDB will frequently restart. |
last(/TiDB by HTTP/tidb.tidb_server_panic_total.rate)>0 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS specific metrics. |
Dependent item | tidb.qps.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get QPS metrics: {#TYPE} | Get QPS metrics of {#TYPE}. |
Dependent item | tidb.qps.get_metrics[{#TYPE}] Preprocessing
|
| Server query "OK": {#TYPE}, rate | The number of queries on TiDB instance per second with success of command execution results. |
Dependent item | tidb.server_query.ok.rate[{#TYPE}] Preprocessing
|
| Server query "Error": {#TYPE}, rate | The number of queries on TiDB instance per second with failure of command execution results. |
Dependent item | tidb.server_query.error.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Statement metrics discovery | Discovery statement specific metrics. |
Dependent item | tidb.statement.discover Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| SQL statements: {#TYPE}, rate | The number of SQL statements executed per second. |
Dependent item | tidb.statement.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV metrics discovery | Discovery KV specific metrics. |
Dependent item | tidb.kv_ops.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV Commands: {#TYPE}, rate | The number of executed KV commands per second. |
Dependent item | tidb.tikvclient_txn.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Lock resolves discovery | Discovery lock resolves specific metrics. |
Dependent item | tidb.tikvclient_lock_resolver_action.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Lock resolves: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.tikvclient_lock_resolver_action.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV backoff discovery | Discovery KV backoff specific metrics. |
Dependent item | tidb.tikvclient_backoff.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV backoff: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.tikvclient_backoff.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GC action results discovery | Discovery GC action results metrics. |
Dependent item | tidb.tikvclient_gc_action.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GC action result: {#TYPE}, rate | The number of results of GC-related operations per second. |
Dependent item | tidb.tikvclient_gc_action.rate[{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Too many failed GC-related operations | min(/TiDB by HTTP/tidb.tikvclient_gc_action.rate[{#TYPE}],5m)>{$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} |
Warning |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
The template to monitor TiDB server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
Zabbix version: 6.4 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with TiDB server of TiDB cluster. Internal service metrics are collected from TiDB /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$TIDB.URL}, {$TIDB.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$TIDB.PORT} | The port of TiDB server metrics web endpoint |
10080 |
| {$TIDB.URL} | TiDB server URL |
localhost |
| {$TIDB.OPEN.FDS.MAX.WARN} | Maximum percentage of used file descriptors |
90 |
| {$TIDB.HEAP.USAGE.MAX.WARN} | Maximum heap memory used |
10G |
| {$TIDB.DDL.WAITING.MAX.WARN} | Maximum number of DDL tasks that are waiting |
5 |
| {$TIDB.TIME_JUMP_BACK.MAX.WARN} | Maximum number of times that the operating system rewinds every second |
1 |
| {$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} | Maximum number of schema lease errors |
0 |
| {$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} | Maximum number of load schema errors |
1 |
| {$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} | Maximum number of GC-related operations failures |
1 |
| {$TIDB.REGION_ERROR.MAX.WARN} | Maximum number of region related errors |
50 |
| {$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} | Minimum number of keep alive operations |
10 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: Get instance metrics | Get TiDB instance metrics. |
HTTP agent | tidb.get_metrics Preprocessing
|
| TiDB: Get instance status | Get TiDB instance status info. |
HTTP agent | tidb.get_status Preprocessing
|
| TiDB: Status | Status of PD instance. |
Dependent item | tidb.status Preprocessing
|
| TiDB: Get total server query metrics | Get information about server queries. |
Dependent item | tidb.server_query.get_metrics Preprocessing
|
| TiDB: Total "error" server query, rate | The number of queries on TiDB instance per second with failure of command execution results. |
Dependent item | tidb.server_query.error.rate Preprocessing
|
| TiDB: Total "ok" server query, rate | The number of queries on TiDB instance per second with success of command execution results. |
Dependent item | tidb.server_query.ok.rate Preprocessing
|
| TiDB: Total server query, rate | The number of queries per second on TiDB instance. |
Dependent item | tidb.server_query.rate Preprocessing
|
| TiDB: Get SQL statements metrics | Get SQL statements metrics. |
Dependent item | tidb.statement_total.get_metrics Preprocessing
|
| TiDB: SQL statements, rate | The total number of SQL statements executed per second. |
Dependent item | tidb.statement_total.rate Preprocessing
|
| TiDB: Failed Query, rate | The number of error occurred when executing SQL statements per second (such as syntax errors and primary key conflicts). |
Dependent item | tidb.execute_error.rate Preprocessing
|
| TiDB: Get TiKV client metrics | Get TiKV client metrics. |
Dependent item | tidb.tikvclient.get_metrics Preprocessing
|
| TiDB: KV commands, rate | The number of executed KV commands per second. |
Dependent item | tidb.tikvclient_txn.rate Preprocessing
|
| TiDB: PD TSO commands, rate | The number of TSO commands that TiDB obtains from PD per second. |
Dependent item | tidb.pd_tso_cmd.rate Preprocessing
|
| TiDB: PD TSO requests, rate | The number of TSO requests that TiDB obtains from PD per second. |
Dependent item | tidb.pd_tso_request.rate Preprocessing
|
| TiDB: TiClient region errors, rate | The number of region related errors returned by TiKV per second. |
Dependent item | tidb.tikvclient_region_err.rate Preprocessing
|
| TiDB: Lock resolves, rate | The number of DDL tasks that are waiting. |
Dependent item | tidb.tikvclient_lock_resolver_action.rate Preprocessing
|
| TiDB: DDL waiting jobs | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.ddl_waiting_jobs Preprocessing
|
| TiDB: Load schema total, rate | The statistics of the schemas that TiDB obtains from TiKV per second. |
Dependent item | tidb.domain_load_schema.rate Preprocessing
|
| TiDB: Load schema failed, rate | The total number of failures to reload the latest schema information in TiDB per second. |
Dependent item | tidb.domain_load_schema.failed.rate Preprocessing
|
| TiDB: Schema lease "outdate" errors , rate | The number of schema lease errors per second. "outdate" errors means that the schema cannot be updated, which is a more serious error and triggers an alert. |
Dependent item | tidb.session_schema_lease_error.outdate.rate Preprocessing
|
| TiDB: Schema lease "change" errors, rate | The number of schema lease errors per second. "change" means that the schema has changed |
Dependent item | tidb.session_schema_lease_error.change.rate Preprocessing
|
| TiDB: KV backoff, rate | The number of errors returned by TiKV. |
Dependent item | tidb.tikvclient_backoff.rate Preprocessing
|
| TiDB: Keep alive, rate | The number of times that the metrics are refreshed on TiDB instance per minute. |
Dependent item | tidb.monitor_keep_alive.rate Preprocessing
|
| TiDB: Server connections | The connection number of current TiDB instance. |
Dependent item | tidb.tidb_server_connections Preprocessing
|
| TiDB: Heap memory usage | Number of heap bytes that are in use. |
Dependent item | tidb.heap_bytes Preprocessing
|
| TiDB: RSS memory usage | Resident memory size in bytes. |
Dependent item | tidb.rss_bytes Preprocessing
|
| TiDB: Goroutine count | The number of Goroutines on TiDB instance. |
Dependent item | tidb.goroutines Preprocessing
|
| TiDB: Open file descriptors | Number of open file descriptors. |
Dependent item | tidb.process_open_fds Preprocessing
|
| TiDB: Open file descriptors, max | Maximum number of open file descriptors. |
Dependent item | tidb.process_max_fds Preprocessing
|
| TiDB: CPU | Total user and system CPU usage ratio. |
Dependent item | tidb.cpu.util Preprocessing
|
| TiDB: Uptime | The runtime of each TiDB instance. |
Dependent item | tidb.uptime Preprocessing
|
| TiDB: Version | Version of the TiDB instance. |
Dependent item | tidb.version Preprocessing
|
| TiDB: Time jump back, rate | The number of times that the operating system rewinds every second. |
Dependent item | tidb.monitor_time_jump_back.rate Preprocessing
|
| TiDB: Server critical error, rate | The number of critical errors occurred in TiDB per second. |
Dependent item | tidb.tidb_server_critical_error_total.rate Preprocessing
|
| TiDB: Server panic, rate | The number of panics occurred in TiDB per second. |
Dependent item | tidb.tidb_server_panic_total.rate Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Instance is not responding | last(/TiDB by HTTP/tidb.status)=0 |
Average | ||
| TiDB: Too many region related errors | min(/TiDB by HTTP/tidb.tikvclient_region_err.rate,5m)>{$TIDB.REGION_ERROR.MAX.WARN} |
Average | ||
| TiDB: Too many DDL waiting jobs | min(/TiDB by HTTP/tidb.ddl_waiting_jobs,5m)>{$TIDB.DDL.WAITING.MAX.WARN} |
Warning | ||
| TiDB: Too many schema lease errors | min(/TiDB by HTTP/tidb.domain_load_schema.failed.rate,5m)>{$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} |
Average | ||
| TiDB: Too many schema lease errors | The latest schema information is not reloaded in TiDB within one lease. |
min(/TiDB by HTTP/tidb.session_schema_lease_error.outdate.rate,5m)>{$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} |
Average | |
| TiDB: Too few keep alive operations | Indicates whether the TiDB process still exists. If the number of times for tidb_monitor_keep_alive_total increases less than 10 per minute, the TiDB process might already exit and an alert is triggered. |
max(/TiDB by HTTP/tidb.monitor_keep_alive.rate,5m)<{$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} |
Average | |
| TiDB: Heap memory usage is too high | min(/TiDB by HTTP/tidb.heap_bytes,5m)>{$TIDB.HEAP.USAGE.MAX.WARN} |
Warning | ||
| TiDB: Current number of open files is too high | Heavy file descriptor usage (i.e., near the process's file descriptor limit) indicates a potential file descriptor exhaustion issue. |
min(/TiDB by HTTP/tidb.process_open_fds,5m)/last(/TiDB by HTTP/tidb.process_max_fds)*100>{$TIDB.OPEN.FDS.MAX.WARN} |
Warning | |
| TiDB: has been restarted | Uptime is less than 10 minutes. |
last(/TiDB by HTTP/tidb.uptime)<10m |
Info | Manual close: Yes |
| TiDB: Version has changed | TiDB version has changed. Acknowledge to close the problem manually. |
last(/TiDB by HTTP/tidb.version,#1)<>last(/TiDB by HTTP/tidb.version,#2) and length(last(/TiDB by HTTP/tidb.version))>0 |
Info | Manual close: Yes |
| TiDB: Too many time jump backs | min(/TiDB by HTTP/tidb.monitor_time_jump_back.rate,5m)>{$TIDB.TIME_JUMP_BACK.MAX.WARN} |
Warning | ||
| TiDB: There are panicked TiDB threads | When a panic occurs, an alert is triggered. The thread is often recovered, otherwise, TiDB will frequently restart. |
last(/TiDB by HTTP/tidb.tidb_server_panic_total.rate)>0 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS specific metrics. |
Dependent item | tidb.qps.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: Get QPS metrics: {#TYPE} | Get QPS metrics of {#TYPE}. |
Dependent item | tidb.qps.get_metrics[{#TYPE}] Preprocessing
|
| TiDB: Server query "OK": {#TYPE}, rate | The number of queries on TiDB instance per second with success of command execution results. |
Dependent item | tidb.server_query.ok.rate[{#TYPE}] Preprocessing
|
| TiDB: Server query "Error": {#TYPE}, rate | The number of queries on TiDB instance per second with failure of command execution results. |
Dependent item | tidb.server_query.error.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Statement metrics discovery | Discovery statement specific metrics. |
Dependent item | tidb.statement.discover Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: SQL statements: {#TYPE}, rate | The number of SQL statements executed per second. |
Dependent item | tidb.statement.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV metrics discovery | Discovery KV specific metrics. |
Dependent item | tidb.kv_ops.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: KV Commands: {#TYPE}, rate | The number of executed KV commands per second. |
Dependent item | tidb.tikvclient_txn.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Lock resolves discovery | Discovery lock resolves specific metrics. |
Dependent item | tidb.tikvclient_lock_resolver_action.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: Lock resolves: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.tikvclient_lock_resolver_action.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV backoff discovery | Discovery KV backoff specific metrics. |
Dependent item | tidb.tikvclient_backoff.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: KV backoff: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.tikvclient_backoff.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GC action results discovery | Discovery GC action results metrics. |
Dependent item | tidb.tikvclient_gc_action.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: GC action result: {#TYPE}, rate | The number of results of GC-related operations per second. |
Dependent item | tidb.tikvclient_gc_action.rate[{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Too many failed GC-related operations | min(/TiDB by HTTP/tidb.tikvclient_gc_action.rate[{#TYPE}],5m)>{$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} |
Warning |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
For Zabbix version: 6.2 and higher
The template to monitor TiDB server of TiDB cluster by Zabbix that works without any external scripts.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
This template was tested on:
See Zabbix template operation for basic instructions.
This template works with TiDB server of TiDB cluster. Internal service metrics are collected from TiDB /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$TIDB.URL}, {$TIDB.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
No specific Zabbix configuration is required.
| Name | Description | Default |
|---|---|---|
| {$TIDB.DDL.WAITING.MAX.WARN} | Maximum number of DDL tasks that are waiting |
5 |
| {$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} | Maximum number of GC-related operations failures |
1 |
| {$TIDB.HEAP.USAGE.MAX.WARN} | Maximum heap memory used |
10G |
| {$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} | Minimum number of keep alive operations |
10 |
| {$TIDB.OPEN.FDS.MAX.WARN} | Maximum percentage of used file descriptors |
90 |
| {$TIDB.PORT} | The port of TiDB server metrics web endpoint |
10080 |
| {$TIDB.REGION_ERROR.MAX.WARN} | Maximum number of region related errors |
50 |
| {$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} | Maximum number of schema lease errors |
0 |
| {$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} | Maximum number of load schema errors |
1 |
| {$TIDB.TIME_JUMP_BACK.MAX.WARN} | Maximum number of times that the operating system rewinds every second |
1 |
| {$TIDB.URL} | TiDB server URL |
localhost |
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GC action results discovery | Discovery GC action results metrics. |
DEPENDENT | tidb.tikvclient_gc_action.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: Overrides: Failed GC-related operations trigger |
| KV backoff discovery | Discovery KV backoff specific metrics. |
DEPENDENT | tidb.tikvclient_backoff.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| KV metrics discovery | Discovery KV specific metrics. |
DEPENDENT | tidb.kv_ops.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Lock resolves discovery | Discovery lock resolves specific metrics. |
DEPENDENT | tidb.tikvclient_lock_resolver_action.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| QPS metrics discovery | Discovery QPS specific metrics. |
DEPENDENT | tidb.qps.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Statement metrics discovery | Discovery statement specific metrics. |
DEPENDENT | tidb.statement.discover Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| TiDB node | TiDB: Status | Status of PD instance. |
DEPENDENT | tidb.status Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB node | TiDB: Total "error" server query, rate | The number of queries on TiDB instance per second with failure of command execution results. |
DEPENDENT | tidb.server_query.error.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Total "ok" server query, rate | The number of queries on TiDB instance per second with success of command execution results. |
DEPENDENT | tidb.server_query.ok.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Total server query, rate | The number of queries per second on TiDB instance. |
DEPENDENT | tidb.server_query.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: SQL statements, rate | The total number of SQL statements executed per second. |
DEPENDENT | tidb.statement_total.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Failed Query, rate | The number of error occurred when executing SQL statements per second (such as syntax errors and primary key conflicts). |
DEPENDENT | tidb.execute_error.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: KV commands, rate | The number of executed KV commands per second. |
DEPENDENT | tidb.tikvclient_txn.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: PD TSO commands, rate | The number of TSO commands that TiDB obtains from PD per second. |
DEPENDENT | tidb.pd_tso_cmd.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: PD TSO requests, rate | The number of TSO requests that TiDB obtains from PD per second. |
DEPENDENT | tidb.pd_tso_request.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: TiClient region errors, rate | The number of region related errors returned by TiKV per second. |
DEPENDENT | tidb.tikvclient_region_err.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Lock resolves, rate | The number of DDL tasks that are waiting. |
DEPENDENT | tidb.tikvclient_lock_resolver_action.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: DDL waiting jobs | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
DEPENDENT | tidb.ddl_waiting_jobs Preprocessing: - JSONPATH: |
| TiDB node | TiDB: Load schema total, rate | The statistics of the schemas that TiDB obtains from TiKV per second. |
DEPENDENT | tidb.domain_load_schema.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Load schema failed, rate | The total number of failures to reload the latest schema information in TiDB per second. |
DEPENDENT | tidb.domain_load_schema.failed.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Schema lease "outdate" errors , rate | The number of schema lease errors per second. "outdate" errors means that the schema cannot be updated, which is a more serious error and triggers an alert. |
DEPENDENT | tidb.session_schema_lease_error.outdate.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Schema lease "change" errors, rate | The number of schema lease errors per second. "change" means that the schema has changed |
DEPENDENT | tidb.session_schema_lease_error.change.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: KV backoff, rate | The number of errors returned by TiKV. |
DEPENDENT | tidb.tikvclient_backoff.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Keep alive, rate | The number of times that the metrics are refreshed on TiDB instance per minute. |
DEPENDENT | tidb.monitor_keep_alive.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - SIMPLE_CHANGE |
| TiDB node | TiDB: Server connections | The connection number of current TiDB instance. |
DEPENDENT | tidb.tidb_server_connections Preprocessing: - JSONPATH: |
| TiDB node | TiDB: Heap memory usage | Number of heap bytes that are in use. |
DEPENDENT | tidb.heap_bytes Preprocessing: - JSONPATH: |
| TiDB node | TiDB: RSS memory usage | Resident memory size in bytes. |
DEPENDENT | tidb.rss_bytes Preprocessing: - JSONPATH: |
| TiDB node | TiDB: Goroutine count | The number of Goroutines on TiDB instance. |
DEPENDENT | tidb.goroutines Preprocessing: - JSONPATH: |
| TiDB node | TiDB: Open file descriptors | Number of open file descriptors. |
DEPENDENT | tidb.process_open_fds Preprocessing: - JSONPATH: |
| TiDB node | TiDB: Open file descriptors, max | Maximum number of open file descriptors. |
DEPENDENT | tidb.process_max_fds Preprocessing: - JSONPATH: |
| TiDB node | TiDB: CPU | Total user and system CPU usage ratio. |
DEPENDENT | tidb.cpu.util Preprocessing: - JSONPATH: - CHANGE_PER_SECOND - MULTIPLIER: |
| TiDB node | TiDB: Uptime | The runtime of each TiDB instance. |
DEPENDENT | tidb.uptime Preprocessing: - JSONPATH: - JAVASCRIPT: |
| TiDB node | TiDB: Version | Version of the TiDB instance. |
DEPENDENT | tidb.version Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB node | TiDB: Time jump back, rate | The number of times that the operating system rewinds every second. |
DEPENDENT | tidb.monitor_time_jump_back.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Server critical error, rate | The number of critical errors occurred in TiDB per second. |
DEPENDENT | tidb.tidb_server_critical_error_total.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Server panic, rate | The number of panics occurred in TiDB per second. |
DEPENDENT | tidb.tidb_server_panic_total.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Server query "OK": {#TYPE}, rate | The number of queries on TiDB instance per second with success of command execution results. |
DEPENDENT | tidb.server_query.ok.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Server query "Error": {#TYPE}, rate | The number of queries on TiDB instance per second with failure of command execution results. |
DEPENDENT | tidb.server_query.error.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: SQL statements: {#TYPE}, rate | The number of SQL statements executed per second. |
DEPENDENT | tidb.statement.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: KV Commands: {#TYPE}, rate | The number of executed KV commands per second. |
DEPENDENT | tidb.tikvclient_txn.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Lock resolves: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
DEPENDENT | tidb.tikvclient_lock_resolver_action.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: KV backoff: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
DEPENDENT | tidb.tikvclient_backoff.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: GC action result: {#TYPE}, rate | The number of results of GC-related operations per second. |
DEPENDENT | tidb.tikvclient_gc_action.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| Zabbix raw items | TiDB: Get instance metrics | Get TiDB instance metrics. |
HTTP_AGENT | tidb.get_metrics Preprocessing: - CHECK_NOT_SUPPORTED ⛔️ON_FAIL: - PROMETHEUS_TO_JSON |
| Zabbix raw items | TiDB: Get instance status | Get TiDB instance status info. |
HTTP_AGENT | tidb.get_status Preprocessing: - CHECK_NOT_SUPPORTED ⛔️ON_FAIL: |
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Instance is not responding | - |
last(/TiDB by HTTP/tidb.status)=0 |
AVERAGE | |
| TiDB: Too many region related errors | - |
min(/TiDB by HTTP/tidb.tikvclient_region_err.rate,5m)>{$TIDB.REGION_ERROR.MAX.WARN} |
AVERAGE | |
| TiDB: Too many DDL waiting jobs | - |
min(/TiDB by HTTP/tidb.ddl_waiting_jobs,5m)>{$TIDB.DDL.WAITING.MAX.WARN} |
WARNING | |
| TiDB: Too many schema lease errors | - |
min(/TiDB by HTTP/tidb.domain_load_schema.failed.rate,5m)>{$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} |
AVERAGE | |
| TiDB: Too many schema lease errors | The latest schema information is not reloaded in TiDB within one lease. |
min(/TiDB by HTTP/tidb.session_schema_lease_error.outdate.rate,5m)>{$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} |
AVERAGE | |
| TiDB: Too few keep alive operations | Indicates whether the TiDB process still exists. If the number of times for tidb_monitor_keep_alive_total increases less than 10 per minute, the TiDB process might already exit and an alert is triggered. |
max(/TiDB by HTTP/tidb.monitor_keep_alive.rate,5m)<{$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} |
AVERAGE | |
| TiDB: Heap memory usage is too high | - |
min(/TiDB by HTTP/tidb.heap_bytes,5m)>{$TIDB.HEAP.USAGE.MAX.WARN} |
WARNING | |
| TiDB: Current number of open files is too high | Heavy file descriptor usage (i.e., near the process's file descriptor limit) indicates a potential file descriptor exhaustion issue. |
min(/TiDB by HTTP/tidb.process_open_fds,5m)/last(/TiDB by HTTP/tidb.process_max_fds)*100>{$TIDB.OPEN.FDS.MAX.WARN} |
WARNING | |
| TiDB: has been restarted | Uptime is less than 10 minutes. |
last(/TiDB by HTTP/tidb.uptime)<10m |
INFO | Manual close: YES |
| TiDB: Version has changed | TiDB version has changed. Ack to close. |
last(/TiDB by HTTP/tidb.version,#1)<>last(/TiDB by HTTP/tidb.version,#2) and length(last(/TiDB by HTTP/tidb.version))>0 |
INFO | Manual close: YES |
| TiDB: Too many time jump backs | - |
min(/TiDB by HTTP/tidb.monitor_time_jump_back.rate,5m)>{$TIDB.TIME_JUMP_BACK.MAX.WARN} |
WARNING | |
| TiDB: There are panicked TiDB threads | When a panic occurs, an alert is triggered. The thread is often recovered, otherwise, TiDB will frequently restart. |
last(/TiDB by HTTP/tidb.tidb_server_panic_total.rate)>0 |
AVERAGE | |
| TiDB: Too many failed GC-related operations | - |
min(/TiDB by HTTP/tidb.tikvclient_gc_action.rate[{#TYPE}],5m)>{$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} |
WARNING |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template or ask for help with it at ZABBIX forums.
The template to monitor TiDB server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
Zabbix version: 6.0 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with TiDB server of TiDB cluster. Internal service metrics are collected from TiDB /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$TIDB.URL}, {$TIDB.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$TIDB.PORT} | The port of TiDB server metrics web endpoint |
10080 |
| {$TIDB.URL} | TiDB server URL |
localhost |
| {$TIDB.OPEN.FDS.MAX.WARN} | Maximum percentage of used file descriptors |
90 |
| {$TIDB.HEAP.USAGE.MAX.WARN} | Maximum heap memory used |
10G |
| {$TIDB.DDL.WAITING.MAX.WARN} | Maximum number of DDL tasks that are waiting |
5 |
| {$TIDB.TIME_JUMP_BACK.MAX.WARN} | Maximum number of times that the operating system rewinds every second |
1 |
| {$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} | Maximum number of schema lease errors |
0 |
| {$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} | Maximum number of load schema errors |
1 |
| {$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} | Maximum number of GC-related operations failures |
1 |
| {$TIDB.REGION_ERROR.MAX.WARN} | Maximum number of region related errors |
50 |
| {$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} | Minimum number of keep alive operations |
10 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: Get instance metrics | Get TiDB instance metrics. |
HTTP agent | tidb.get_metrics Preprocessing
|
| TiDB: Get instance status | Get TiDB instance status info. |
HTTP agent | tidb.get_status Preprocessing
|
| TiDB: Status | Status of PD instance. |
Dependent item | tidb.status Preprocessing
|
| TiDB: Get total server query metrics | Get information about server queries. |
Dependent item | tidb.server_query.get_metrics Preprocessing
|
| TiDB: Total "error" server query, rate | The number of queries on TiDB instance per second with failure of command execution results. |
Dependent item | tidb.server_query.error.rate Preprocessing
|
| TiDB: Total "ok" server query, rate | The number of queries on TiDB instance per second with success of command execution results. |
Dependent item | tidb.server_query.ok.rate Preprocessing
|
| TiDB: Total server query, rate | The number of queries per second on TiDB instance. |
Dependent item | tidb.server_query.rate Preprocessing
|
| TiDB: Get SQL statements metrics | Get SQL statements metrics. |
Dependent item | tidb.statement_total.get_metrics Preprocessing
|
| TiDB: SQL statements, rate | The total number of SQL statements executed per second. |
Dependent item | tidb.statement_total.rate Preprocessing
|
| TiDB: Failed Query, rate | The number of error occurred when executing SQL statements per second (such as syntax errors and primary key conflicts). |
Dependent item | tidb.execute_error.rate Preprocessing
|
| TiDB: Get TiKV client metrics | Get TiKV client metrics. |
Dependent item | tidb.tikvclient.get_metrics Preprocessing
|
| TiDB: KV commands, rate | The number of executed KV commands per second. |
Dependent item | tidb.tikvclient_txn.rate Preprocessing
|
| TiDB: PD TSO commands, rate | The number of TSO commands that TiDB obtains from PD per second. |
Dependent item | tidb.pd_tso_cmd.rate Preprocessing
|
| TiDB: PD TSO requests, rate | The number of TSO requests that TiDB obtains from PD per second. |
Dependent item | tidb.pd_tso_request.rate Preprocessing
|
| TiDB: TiClient region errors, rate | The number of region related errors returned by TiKV per second. |
Dependent item | tidb.tikvclient_region_err.rate Preprocessing
|
| TiDB: Lock resolves, rate | The number of DDL tasks that are waiting. |
Dependent item | tidb.tikvclient_lock_resolver_action.rate Preprocessing
|
| TiDB: DDL waiting jobs | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.ddl_waiting_jobs Preprocessing
|
| TiDB: Load schema total, rate | The statistics of the schemas that TiDB obtains from TiKV per second. |
Dependent item | tidb.domain_load_schema.rate Preprocessing
|
| TiDB: Load schema failed, rate | The total number of failures to reload the latest schema information in TiDB per second. |
Dependent item | tidb.domain_load_schema.failed.rate Preprocessing
|
| TiDB: Schema lease "outdate" errors , rate | The number of schema lease errors per second. "outdate" errors means that the schema cannot be updated, which is a more serious error and triggers an alert. |
Dependent item | tidb.session_schema_lease_error.outdate.rate Preprocessing
|
| TiDB: Schema lease "change" errors, rate | The number of schema lease errors per second. "change" means that the schema has changed |
Dependent item | tidb.session_schema_lease_error.change.rate Preprocessing
|
| TiDB: KV backoff, rate | The number of errors returned by TiKV. |
Dependent item | tidb.tikvclient_backoff.rate Preprocessing
|
| TiDB: Keep alive, rate | The number of times that the metrics are refreshed on TiDB instance per minute. |
Dependent item | tidb.monitor_keep_alive.rate Preprocessing
|
| TiDB: Server connections | The connection number of current TiDB instance. |
Dependent item | tidb.tidb_server_connections Preprocessing
|
| TiDB: Heap memory usage | Number of heap bytes that are in use. |
Dependent item | tidb.heap_bytes Preprocessing
|
| TiDB: RSS memory usage | Resident memory size in bytes. |
Dependent item | tidb.rss_bytes Preprocessing
|
| TiDB: Goroutine count | The number of Goroutines on TiDB instance. |
Dependent item | tidb.goroutines Preprocessing
|
| TiDB: Open file descriptors | Number of open file descriptors. |
Dependent item | tidb.process_open_fds Preprocessing
|
| TiDB: Open file descriptors, max | Maximum number of open file descriptors. |
Dependent item | tidb.process_max_fds Preprocessing
|
| TiDB: CPU | Total user and system CPU usage ratio. |
Dependent item | tidb.cpu.util Preprocessing
|
| TiDB: Uptime | The runtime of each TiDB instance. |
Dependent item | tidb.uptime Preprocessing
|
| TiDB: Version | Version of the TiDB instance. |
Dependent item | tidb.version Preprocessing
|
| TiDB: Time jump back, rate | The number of times that the operating system rewinds every second. |
Dependent item | tidb.monitor_time_jump_back.rate Preprocessing
|
| TiDB: Server critical error, rate | The number of critical errors occurred in TiDB per second. |
Dependent item | tidb.tidb_server_critical_error_total.rate Preprocessing
|
| TiDB: Server panic, rate | The number of panics occurred in TiDB per second. |
Dependent item | tidb.tidb_server_panic_total.rate Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Instance is not responding | last(/TiDB by HTTP/tidb.status)=0 |
Average | ||
| TiDB: Too many region related errors | min(/TiDB by HTTP/tidb.tikvclient_region_err.rate,5m)>{$TIDB.REGION_ERROR.MAX.WARN} |
Average | ||
| TiDB: Too many DDL waiting jobs | min(/TiDB by HTTP/tidb.ddl_waiting_jobs,5m)>{$TIDB.DDL.WAITING.MAX.WARN} |
Warning | ||
| TiDB: Too many schema lease errors | min(/TiDB by HTTP/tidb.domain_load_schema.failed.rate,5m)>{$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} |
Average | ||
| TiDB: Too many schema lease errors | The latest schema information is not reloaded in TiDB within one lease. |
min(/TiDB by HTTP/tidb.session_schema_lease_error.outdate.rate,5m)>{$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} |
Average | |
| TiDB: Too few keep alive operations | Indicates whether the TiDB process still exists. If the number of times for tidb_monitor_keep_alive_total increases less than 10 per minute, the TiDB process might already exit and an alert is triggered. |
max(/TiDB by HTTP/tidb.monitor_keep_alive.rate,5m)<{$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} |
Average | |
| TiDB: Heap memory usage is too high | min(/TiDB by HTTP/tidb.heap_bytes,5m)>{$TIDB.HEAP.USAGE.MAX.WARN} |
Warning | ||
| TiDB: Current number of open files is too high | Heavy file descriptor usage (i.e., near the process's file descriptor limit) indicates a potential file descriptor exhaustion issue. |
min(/TiDB by HTTP/tidb.process_open_fds,5m)/last(/TiDB by HTTP/tidb.process_max_fds)*100>{$TIDB.OPEN.FDS.MAX.WARN} |
Warning | |
| TiDB: has been restarted | Uptime is less than 10 minutes. |
last(/TiDB by HTTP/tidb.uptime)<10m |
Info | Manual close: Yes |
| TiDB: Version has changed | TiDB version has changed. Acknowledge to close the problem manually. |
last(/TiDB by HTTP/tidb.version,#1)<>last(/TiDB by HTTP/tidb.version,#2) and length(last(/TiDB by HTTP/tidb.version))>0 |
Info | Manual close: Yes |
| TiDB: Too many time jump backs | min(/TiDB by HTTP/tidb.monitor_time_jump_back.rate,5m)>{$TIDB.TIME_JUMP_BACK.MAX.WARN} |
Warning | ||
| TiDB: There are panicked TiDB threads | When a panic occurs, an alert is triggered. The thread is often recovered, otherwise, TiDB will frequently restart. |
last(/TiDB by HTTP/tidb.tidb_server_panic_total.rate)>0 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS specific metrics. |
Dependent item | tidb.qps.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: Get QPS metrics: {#TYPE} | Get QPS metrics of {#TYPE}. |
Dependent item | tidb.qps.get_metrics[{#TYPE}] Preprocessing
|
| TiDB: Server query "OK": {#TYPE}, rate | The number of queries on TiDB instance per second with success of command execution results. |
Dependent item | tidb.server_query.ok.rate[{#TYPE}] Preprocessing
|
| TiDB: Server query "Error": {#TYPE}, rate | The number of queries on TiDB instance per second with failure of command execution results. |
Dependent item | tidb.server_query.error.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Statement metrics discovery | Discovery statement specific metrics. |
Dependent item | tidb.statement.discover Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: SQL statements: {#TYPE}, rate | The number of SQL statements executed per second. |
Dependent item | tidb.statement.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV metrics discovery | Discovery KV specific metrics. |
Dependent item | tidb.kv_ops.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: KV Commands: {#TYPE}, rate | The number of executed KV commands per second. |
Dependent item | tidb.tikvclient_txn.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Lock resolves discovery | Discovery lock resolves specific metrics. |
Dependent item | tidb.tikvclient_lock_resolver_action.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: Lock resolves: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.tikvclient_lock_resolver_action.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| KV backoff discovery | Discovery KV backoff specific metrics. |
Dependent item | tidb.tikvclient_backoff.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: KV backoff: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
Dependent item | tidb.tikvclient_backoff.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GC action results discovery | Discovery GC action results metrics. |
Dependent item | tidb.tikvclient_gc_action.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB: GC action result: {#TYPE}, rate | The number of results of GC-related operations per second. |
Dependent item | tidb.tikvclient_gc_action.rate[{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Too many failed GC-related operations | min(/TiDB by HTTP/tidb.tikvclient_gc_action.rate[{#TYPE}],5m)>{$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} |
Warning |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
For Zabbix version: 5.4 and higher
The template to monitor TiDB server of TiDB cluster by Zabbix that works without any external scripts.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
This template was tested on:
See Zabbix template operation for basic instructions.
This template works with TiDB server of TiDB cluster. Internal service metrics are collected from TiDB /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$TIDB.URL}, {$TIDB.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
No specific Zabbix configuration is required.
| Name | Description | Default |
|---|---|---|
| {$TIDB.DDL.WAITING.MAX.WARN} | Maximum number of DDL tasks that are waiting |
5 |
| {$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} | Maximum number of GC-related operations failures |
1 |
| {$TIDB.HEAP.USAGE.MAX.WARN} | Maximum heap memory used |
10G |
| {$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} | Minimum number of keep alive operations |
10 |
| {$TIDB.OPEN.FDS.MAX.WARN} | Maximum percentage of used file descriptors |
90 |
| {$TIDB.PORT} | The port of TiDB server metrics web endpoint |
10080 |
| {$TIDB.REGION_ERROR.MAX.WARN} | Maximum number of region related errors |
50 |
| {$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} | Maximum number of schema lease errors |
0 |
| {$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} | Maximum number of load schema errors |
1 |
| {$TIDB.TIME_JUMP_BACK.MAX.WARN} | Maximum number of times that the operating system rewinds every second |
1 |
| {$TIDB.URL} | TiDB server URL |
localhost |
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS specific metrics. |
DEPENDENT | tidb.qps.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Statement metrics discovery | Discovery statement specific metrics. |
DEPENDENT | tidb.statement.discover Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| KV metrics discovery | Discovery KV specific metrics. |
DEPENDENT | tidb.kv_ops.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Lock resolves discovery | Discovery lock resolves specific metrics. |
DEPENDENT | tidb.tikvclient_lock_resolver_action.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| KV backoff discovery | Discovery KV backoff specific metrics. |
DEPENDENT | tidb.tikvclient_backoff.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| GC action results discovery | Discovery GC action results metrics. |
DEPENDENT | tidb.tikvclient_gc_action.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: Overrides: Failed GC-related operations trigger |
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| TiDB node | TiDB: Status | Status of PD instance. |
DEPENDENT | tidb.status Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB node | TiDB: Total "error" server query, rate | The number of queries on TiDB instance per second with failure of command execution results. |
DEPENDENT | tidb.server_query.error.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Total "ok" server query, rate | The number of queries on TiDB instance per second with success of command execution results. |
DEPENDENT | tidb.server_query.ok.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Total server query, rate | The number of queries per second on TiDB instance. |
DEPENDENT | tidb.server_query.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: SQL statements, rate | The total number of SQL statements executed per second. |
DEPENDENT | tidb.statement_total.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Failed Query, rate | The number of error occurred when executing SQL statements per second (such as syntax errors and primary key conflicts). |
DEPENDENT | tidb.execute_error.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: KV commands, rate | The number of executed KV commands per second. |
DEPENDENT | tidb.tikvclient_txn.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: PD TSO commands, rate | The number of TSO commands that TiDB obtains from PD per second. |
DEPENDENT | tidb.pd_tso_cmd.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: PD TSO requests, rate | The number of TSO requests that TiDB obtains from PD per second. |
DEPENDENT | tidb.pd_tso_request.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: TiClient region errors, rate | The number of region related errors returned by TiKV per second. |
DEPENDENT | tidb.tikvclient_region_err.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Lock resolves, rate | The number of DDL tasks that are waiting. |
DEPENDENT | tidb.tikvclient_lock_resolver_action.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: DDL waiting jobs | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
DEPENDENT | tidb.ddl_waiting_jobs Preprocessing: - JSONPATH: |
| TiDB node | TiDB: Load schema total, rate | The statistics of the schemas that TiDB obtains from TiKV per second. |
DEPENDENT | tidb.domain_load_schema.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Load schema failed, rate | The total number of failures to reload the latest schema information in TiDB per second. |
DEPENDENT | tidb.domain_load_schema.failed.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Schema lease "outdate" errors , rate | The number of schema lease errors per second. "outdate" errors means that the schema cannot be updated, which is a more serious error and triggers an alert. |
DEPENDENT | tidb.session_schema_lease_error.outdate.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Schema lease "change" errors, rate | The number of schema lease errors per second. "change" means that the schema has changed |
DEPENDENT | tidb.session_schema_lease_error.change.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: KV backoff, rate | The number of errors returned by TiKV. |
DEPENDENT | tidb.tikvclient_backoff.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Keep alive, rate | The number of times that the metrics are refreshed on TiDB instance per minute. |
DEPENDENT | tidb.monitor_keep_alive.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - SIMPLE_CHANGE |
| TiDB node | TiDB: Server connections | The connection number of current TiDB instance. |
DEPENDENT | tidb.tidb_server_connections Preprocessing: - JSONPATH: |
| TiDB node | TiDB: Heap memory usage | Number of heap bytes that are in use. |
DEPENDENT | tidb.heap_bytes Preprocessing: - JSONPATH: |
| TiDB node | TiDB: RSS memory usage | Resident memory size in bytes. |
DEPENDENT | tidb.rss_bytes Preprocessing: - JSONPATH: |
| TiDB node | TiDB: Goroutine count | The number of Goroutines on TiDB instance. |
DEPENDENT | tidb.goroutines Preprocessing: - JSONPATH: |
| TiDB node | TiDB: Open file descriptors | Number of open file descriptors. |
DEPENDENT | tidb.process_open_fds Preprocessing: - JSONPATH: |
| TiDB node | TiDB: Open file descriptors, max | Maximum number of open file descriptors. |
DEPENDENT | tidb.process_max_fds Preprocessing: - JSONPATH: |
| TiDB node | TiDB: CPU | Total user and system CPU usage ratio. |
DEPENDENT | tidb.cpu.util Preprocessing: - JSONPATH: - CHANGE_PER_SECOND - MULTIPLIER: |
| TiDB node | TiDB: Uptime | The runtime of each TiDB instance. |
DEPENDENT | tidb.uptime Preprocessing: - JSONPATH: - JAVASCRIPT: |
| TiDB node | TiDB: Version | Version of the TiDB instance. |
DEPENDENT | tidb.version Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB node | TiDB: Time jump back, rate | The number of times that the operating system rewinds every second. |
DEPENDENT | tidb.monitor_time_jump_back.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Server critical error, rate | The number of critical errors occurred in TiDB per second. |
DEPENDENT | tidb.tidb_server_critical_error_total.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Server panic, rate | The number of panics occurred in TiDB per second. |
DEPENDENT | tidb.tidb_server_panic_total.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Server query "OK": {#TYPE}, rate | The number of queries on TiDB instance per second with success of command execution results. |
DEPENDENT | tidb.server_query.ok.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Server query "Error": {#TYPE}, rate | The number of queries on TiDB instance per second with failure of command execution results. |
DEPENDENT | tidb.server_query.error.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: SQL statements: {#TYPE}, rate | The number of SQL statements executed per second. |
DEPENDENT | tidb.statement.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: KV Commands: {#TYPE}, rate | The number of executed KV commands per second. |
DEPENDENT | tidb.tikvclient_txn.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: Lock resolves: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
DEPENDENT | tidb.tikvclient_lock_resolver_action.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: KV backoff: {#TYPE}, rate | The number of TiDB operations that resolve locks per second. When TiDB's read or write request encounters a lock, it tries to resolve the lock. |
DEPENDENT | tidb.tikvclient_backoff.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB node | TiDB: GC action result: {#TYPE}, rate | The number of results of GC-related operations per second. |
DEPENDENT | tidb.tikvclient_gc_action.rate[{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| Zabbix_raw_items | TiDB: Get instance metrics | Get TiDB instance metrics. |
HTTP_AGENT | tidb.get_metrics Preprocessing: - CHECK_NOT_SUPPORTED ⛔️ON_FAIL: - PROMETHEUS_TO_JSON |
| Zabbix_raw_items | TiDB: Get instance status | Get TiDB instance status info. |
HTTP_AGENT | tidb.get_status Preprocessing: - CHECK_NOT_SUPPORTED ⛔️ON_FAIL: |
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB: Instance is not responding | - |
last(/TiDB by HTTP/tidb.status)=0 |
AVERAGE | |
| TiDB: Too many region related errors (over {$TIDB.REGION_ERROR.MAX.WARN} for 5m) | - |
min(/TiDB by HTTP/tidb.tikvclient_region_err.rate,5m)>{$TIDB.REGION_ERROR.MAX.WARN} |
AVERAGE | |
| TiDB: Too many DDL waiting jobs (over {$TIDB.DDL.WAITING.MAX.WARN} for 5m) | - |
min(/TiDB by HTTP/tidb.ddl_waiting_jobs,5m)>{$TIDB.DDL.WAITING.MAX.WARN} |
WARNING | |
| TiDB: Too many schema lease errors (over {$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} for 5m) | - |
min(/TiDB by HTTP/tidb.domain_load_schema.failed.rate,5m)>{$TIDB.SCHEMA_LOAD_ERRORS.MAX.WARN} |
AVERAGE | |
| TiDB: Too many schema lease errors (over {$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} for 5m) | The latest schema information is not reloaded in TiDB within one lease. |
min(/TiDB by HTTP/tidb.session_schema_lease_error.outdate.rate,5m)>{$TIDB.SCHEMA_LEASE_ERRORS.MAX.WARN} |
AVERAGE | |
| TiDB: Too few keep alive operations (less {$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} for 5m) | Indicates whether the TiDB process still exists. If the number of times for tidb_monitor_keep_alive_total increases less than 10 per minute, the TiDB process might already exit and an alert is triggered. |
max(/TiDB by HTTP/tidb.monitor_keep_alive.rate,5m)<{$TIDB.MONITOR_KEEP_ALIVE.MAX.WARN} |
AVERAGE | |
| TiDB: Heap memory usage is too high (over {$TIDB.HEAP.USAGE.MAX.WARN} for 5m) | - |
min(/TiDB by HTTP/tidb.heap_bytes,5m)>{$TIDB.HEAP.USAGE.MAX.WARN} |
WARNING | |
| TiDB: Current number of open files is too high (over {$TIDB.OPEN.FDS.MAX.WARN}% for 5m) | Heavy file descriptor usage (i.e., near the process's file descriptor limit) indicates a potential file descriptor exhaustion issue. |
min(/TiDB by HTTP/tidb.process_open_fds,5m)/last(/TiDB by HTTP/tidb.process_max_fds)*100>{$TIDB.OPEN.FDS.MAX.WARN} |
WARNING | |
| TiDB: has been restarted (uptime < 10m) | Uptime is less than 10 minutes |
last(/TiDB by HTTP/tidb.uptime)<10m |
INFO | Manual close: YES |
| TiDB: Version has changed (new version: {ITEM.VALUE}) | TiDB version has changed. Ack to close. |
last(/TiDB by HTTP/tidb.version,#1)<>last(/TiDB by HTTP/tidb.version,#2) and length(last(/TiDB by HTTP/tidb.version))>0 |
INFO | Manual close: YES |
| TiDB: Too many time jump backs (over {$TIDB.TIME_JUMP_BACK.MAX.WARN} for 5m) | - |
min(/TiDB by HTTP/tidb.monitor_time_jump_back.rate,5m)>{$TIDB.TIME_JUMP_BACK.MAX.WARN} |
WARNING | |
| TiDB: There are panicked TiDB threads | When a panic occurs, an alert is triggered. The thread is often recovered, otherwise, TiDB will frequently restart. |
last(/TiDB by HTTP/tidb.tidb_server_panic_total.rate)>0 |
AVERAGE | |
| TiDB: Too many failed GC-related operations (over {$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} in 5m) | - |
min(/TiDB by HTTP/tidb.tikvclient_gc_action.rate[{#TYPE}],5m)>{$TIDB.GC_ACTIONS.ERRORS.MAX.WARN} |
WARNING |
Please report any issues with the template at https://support.zabbix.com
You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.
The template to monitor TiKV server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB TiKV by HTTP — collects metrics by HTTP agent from TiKV /metrics endpoint.
Zabbix version: 7.4 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with TiKV server of TiDB cluster. Internal service metrics are collected from TiKV /metrics endpoint. Don't forget to change the macros {$TIKV.URL}, {$TIKV.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$TIKV.PORT} | The port of TiKV server metrics web endpoint |
20180 |
| {$TIKV.URL} | TiKV server URL |
localhost |
| {$TIKV.COPROCESSOR.ERRORS.MAX.WARN} | Maximum number of coprocessor request errors |
1 |
| {$TIKV.STORE.ERRORS.MAX.WARN} | Maximum number of failure messages |
1 |
| {$TIKV.PENDING_COMMANDS.MAX.WARN} | Maximum number of pending commands |
1 |
| {$TIKV.PENDING_TASKS.MAX.WARN} | Maximum number of tasks currently running by the worker or pending |
1 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get instance metrics | Get TiKV instance metrics. |
HTTP agent | tikv.get_metrics Preprocessing
|
| Store size | The storage size of TiKV instance. |
Dependent item | tikv.engine_size Preprocessing
|
| Get store size metrics | Get capacity metrics of TiKV instance. |
Dependent item | tikv.store_size.metrics Preprocessing
|
| Available size | The available capacity of TiKV instance. |
Dependent item | tikv.store_size.available Preprocessing
|
| Capacity size | The capacity size of TiKV instance. |
Dependent item | tikv.store_size.capacity Preprocessing
|
| Bytes read | The total bytes of read in TiKV instance. |
Dependent item | tikv.engine_flow_bytes.read Preprocessing
|
| Bytes write | The total bytes of write in TiKV instance. |
Dependent item | tikv.engine_flow_bytes.write Preprocessing
|
| Storage: commands total, rate | Total number of commands received per second. |
Dependent item | tikv.storage_command.rate Preprocessing
|
| CPU util | The CPU usage ratio on TiKV instance. |
Dependent item | tikv.cpu.util Preprocessing
|
| RSS memory usage | Resident memory size in bytes. |
Dependent item | tikv.rss_bytes Preprocessing
|
| Regions, count | The number of regions collected in TiKV instance. |
Dependent item | tikv.region_count Preprocessing
|
| Regions, leader | The number of leaders in TiKV instance. |
Dependent item | tikv.region_leader Preprocessing
|
| Get QPS metrics | Get QPS metrics in TiKV instance. |
Dependent item | tikv.grpc_msgs.metrics Preprocessing
|
| Total query, rate | The total QPS in TiKV instance. |
Dependent item | tikv.grpc_msg.rate Preprocessing
|
| Total query errors, rate | The total number of gRPC message handling failure per second. |
Dependent item | tikv.grpc_msg_fail.rate Preprocessing
|
| Coprocessor: Errors, rate | Total number of push down request error per second. |
Dependent item | tikv.coprocessor_request_error.rate Preprocessing
|
| Get coprocessor requests metrics | Get metrics of coprocessor requests. |
Dependent item | tikv.coprocessor_requests.metrics Preprocessing
|
| Coprocessor: Requests, rate | Total number of coprocessor requests per second. |
Dependent item | tikv.coprocessor_request.rate Preprocessing
|
| Coprocessor: Scan keys, rate | Total number of scan keys observed per request per second. |
Dependent item | tikv.coprocessor_scan_keys_sum.rate Preprocessing
|
| Coprocessor: RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
Dependent item | tikv.coprocessor_rocksdb_perf.rate Preprocessing
|
| Coprocessor: Response size, rate | The total size of coprocessor response per second. |
Dependent item | tikv.coprocessor_response_bytes.rate Preprocessing
|
| Scheduler: Pending commands | The total number of pending commands. The scheduler receives commands from clients, executes them against the MVCC layer storage engine. |
Dependent item | tikv.scheduler_contex Preprocessing
|
| Scheduler: Busy, rate | The total count of too busy schedulers per second. |
Dependent item | tikv.scheduler_too_busy.rate Preprocessing
|
| Get scheduler metrics | Get metrics of scheduler commands. |
Dependent item | tikv.scheduler.metrics Preprocessing
|
| Scheduler: Commands total, rate | Total number of commands per second. |
Dependent item | tikv.scheduler_commands.rate Preprocessing
|
| Scheduler: Low priority commands total, rate | Total count of low priority commands per second. |
Dependent item | tikv.commands_pri.low.rate Preprocessing
|
| Scheduler: Normal priority commands total, rate | Total count of normal priority commands per second. |
Dependent item | tikv.commands_pri.normal.rate Preprocessing
|
| Scheduler: High priority commands total, rate | Total count of high priority commands per second. |
Dependent item | tikv.commands_pri.high.rate Preprocessing
|
| Snapshot: Pending tasks | The number of tasks currently running by the worker or pending. |
Dependent item | tikv.worker_pending_task Preprocessing
|
| Snapshot: Sending | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.sending Preprocessing
|
| Snapshot: Receiving | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.receiving Preprocessing
|
| Snapshot: Applying | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.applying Preprocessing
|
| Uptime | The runtime of each TiKV instance. |
Dependent item | tikv.uptime Preprocessing
|
| Get failure msg metrics | Get metrics of reporting failure messages. |
Dependent item | tikv.messages.failure.metrics Preprocessing
|
| Server: failure messages total, rate | Total number of reporting failure messages per second. |
Dependent item | tikv.messages.failure.rate Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB TiKV: Too many coprocessor request error | min(/TiDB TiKV by HTTP/tikv.coprocessor_request_error.rate,5m)>{$TIKV.COPROCESSOR.ERRORS.MAX.WARN} |
Warning | ||
| TiDB TiKV: Too many pending commands | min(/TiDB TiKV by HTTP/tikv.scheduler_contex,5m)>{$TIKV.PENDING_COMMANDS.MAX.WARN} |
Average | ||
| TiDB TiKV: Too many pending tasks | min(/TiDB TiKV by HTTP/tikv.worker_pending_task,5m)>{$TIKV.PENDING_TASKS.MAX.WARN} |
Average | ||
| TiDB TiKV: Instance has been restarted | Uptime is less than 10 minutes. |
last(/TiDB TiKV by HTTP/tikv.uptime)<10m |
Info | Manual close: Yes |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS metrics. |
Dependent item | tikv.qps.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Query: {#TYPE}, rate | The QPS per command in TiKV instance. |
Dependent item | tikv.grpc_msg.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Coprocessor metrics discovery | Discovery coprocessor metrics. |
Dependent item | tikv.coprocessor.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Coprocessor: {#REQ_TYPE} metrics | Get metrics of {#REQ_TYPE} requests. |
Dependent item | tikv.coprocessor_request.metrics[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} errors, rate | Total number of push down request error per second. |
Dependent item | tikv.coprocessor_request_error.rate[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} requests, rate | Total number of coprocessor requests per second. |
Dependent item | tikv.coprocessor_request.rate[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} scan keys, rate | Total number of scan keys observed per request per second. |
Dependent item | tikv.coprocessor_scan_keys.rate[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
Dependent item | tikv.coprocessor_rocksdb_perf.rate[{#REQ_TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler metrics discovery | Discovery scheduler metrics. |
Dependent item | tikv.scheduler.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler: commands {#STAGE}, rate | Total number of commands on each stage per second. |
Dependent item | tikv.scheduler_stage.rate[{#STAGE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Server errors discovery | Discovery server errors metrics. |
Dependent item | tikv.server_report_failure.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Store_id {#STORE_ID}: failure messages "{#TYPE}", rate | Total number of reporting failure messages. The metric has two labels: type and store_id. type represents the failure type, and store_id represents the destination peer store id. |
Dependent item | tikv.messages.failure.rate[{#STORE_ID},{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB TiKV: Store_id {#STORE_ID}: Too many failure messages "{#TYPE}" | Indicates that the remote TiKV cannot be connected. |
min(/TiDB TiKV by HTTP/tikv.messages.failure.rate[{#STORE_ID},{#TYPE}],5m)>{$TIKV.STORE.ERRORS.MAX.WARN} |
Warning |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
The template to monitor TiKV server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB TiKV by HTTP — collects metrics by HTTP agent from TiKV /metrics endpoint.
Zabbix version: 7.2 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with TiKV server of TiDB cluster. Internal service metrics are collected from TiKV /metrics endpoint. Don't forget to change the macros {$TIKV.URL}, {$TIKV.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$TIKV.PORT} | The port of TiKV server metrics web endpoint |
20180 |
| {$TIKV.URL} | TiKV server URL |
localhost |
| {$TIKV.COPROCESSOR.ERRORS.MAX.WARN} | Maximum number of coprocessor request errors |
1 |
| {$TIKV.STORE.ERRORS.MAX.WARN} | Maximum number of failure messages |
1 |
| {$TIKV.PENDING_COMMANDS.MAX.WARN} | Maximum number of pending commands |
1 |
| {$TIKV.PENDING_TASKS.MAX.WARN} | Maximum number of tasks currently running by the worker or pending |
1 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get instance metrics | Get TiKV instance metrics. |
HTTP agent | tikv.get_metrics Preprocessing
|
| Store size | The storage size of TiKV instance. |
Dependent item | tikv.engine_size Preprocessing
|
| Get store size metrics | Get capacity metrics of TiKV instance. |
Dependent item | tikv.store_size.metrics Preprocessing
|
| Available size | The available capacity of TiKV instance. |
Dependent item | tikv.store_size.available Preprocessing
|
| Capacity size | The capacity size of TiKV instance. |
Dependent item | tikv.store_size.capacity Preprocessing
|
| Bytes read | The total bytes of read in TiKV instance. |
Dependent item | tikv.engine_flow_bytes.read Preprocessing
|
| Bytes write | The total bytes of write in TiKV instance. |
Dependent item | tikv.engine_flow_bytes.write Preprocessing
|
| Storage: commands total, rate | Total number of commands received per second. |
Dependent item | tikv.storage_command.rate Preprocessing
|
| CPU util | The CPU usage ratio on TiKV instance. |
Dependent item | tikv.cpu.util Preprocessing
|
| RSS memory usage | Resident memory size in bytes. |
Dependent item | tikv.rss_bytes Preprocessing
|
| Regions, count | The number of regions collected in TiKV instance. |
Dependent item | tikv.region_count Preprocessing
|
| Regions, leader | The number of leaders in TiKV instance. |
Dependent item | tikv.region_leader Preprocessing
|
| Get QPS metrics | Get QPS metrics in TiKV instance. |
Dependent item | tikv.grpc_msgs.metrics Preprocessing
|
| Total query, rate | The total QPS in TiKV instance. |
Dependent item | tikv.grpc_msg.rate Preprocessing
|
| Total query errors, rate | The total number of gRPC message handling failure per second. |
Dependent item | tikv.grpc_msg_fail.rate Preprocessing
|
| Coprocessor: Errors, rate | Total number of push down request error per second. |
Dependent item | tikv.coprocessor_request_error.rate Preprocessing
|
| Get coprocessor requests metrics | Get metrics of coprocessor requests. |
Dependent item | tikv.coprocessor_requests.metrics Preprocessing
|
| Coprocessor: Requests, rate | Total number of coprocessor requests per second. |
Dependent item | tikv.coprocessor_request.rate Preprocessing
|
| Coprocessor: Scan keys, rate | Total number of scan keys observed per request per second. |
Dependent item | tikv.coprocessor_scan_keys_sum.rate Preprocessing
|
| Coprocessor: RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
Dependent item | tikv.coprocessor_rocksdb_perf.rate Preprocessing
|
| Coprocessor: Response size, rate | The total size of coprocessor response per second. |
Dependent item | tikv.coprocessor_response_bytes.rate Preprocessing
|
| Scheduler: Pending commands | The total number of pending commands. The scheduler receives commands from clients, executes them against the MVCC layer storage engine. |
Dependent item | tikv.scheduler_contex Preprocessing
|
| Scheduler: Busy, rate | The total count of too busy schedulers per second. |
Dependent item | tikv.scheduler_too_busy.rate Preprocessing
|
| Get scheduler metrics | Get metrics of scheduler commands. |
Dependent item | tikv.scheduler.metrics Preprocessing
|
| Scheduler: Commands total, rate | Total number of commands per second. |
Dependent item | tikv.scheduler_commands.rate Preprocessing
|
| Scheduler: Low priority commands total, rate | Total count of low priority commands per second. |
Dependent item | tikv.commands_pri.low.rate Preprocessing
|
| Scheduler: Normal priority commands total, rate | Total count of normal priority commands per second. |
Dependent item | tikv.commands_pri.normal.rate Preprocessing
|
| Scheduler: High priority commands total, rate | Total count of high priority commands per second. |
Dependent item | tikv.commands_pri.high.rate Preprocessing
|
| Snapshot: Pending tasks | The number of tasks currently running by the worker or pending. |
Dependent item | tikv.worker_pending_task Preprocessing
|
| Snapshot: Sending | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.sending Preprocessing
|
| Snapshot: Receiving | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.receiving Preprocessing
|
| Snapshot: Applying | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.applying Preprocessing
|
| Uptime | The runtime of each TiKV instance. |
Dependent item | tikv.uptime Preprocessing
|
| Get failure msg metrics | Get metrics of reporting failure messages. |
Dependent item | tikv.messages.failure.metrics Preprocessing
|
| Server: failure messages total, rate | Total number of reporting failure messages per second. |
Dependent item | tikv.messages.failure.rate Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB TiKV: Too many coprocessor request error | min(/TiDB TiKV by HTTP/tikv.coprocessor_request_error.rate,5m)>{$TIKV.COPROCESSOR.ERRORS.MAX.WARN} |
Warning | ||
| TiDB TiKV: Too many pending commands | min(/TiDB TiKV by HTTP/tikv.scheduler_contex,5m)>{$TIKV.PENDING_COMMANDS.MAX.WARN} |
Average | ||
| TiDB TiKV: Too many pending tasks | min(/TiDB TiKV by HTTP/tikv.worker_pending_task,5m)>{$TIKV.PENDING_TASKS.MAX.WARN} |
Average | ||
| TiDB TiKV: Instance has been restarted | Uptime is less than 10 minutes. |
last(/TiDB TiKV by HTTP/tikv.uptime)<10m |
Info | Manual close: Yes |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS metrics. |
Dependent item | tikv.qps.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Query: {#TYPE}, rate | The QPS per command in TiKV instance. |
Dependent item | tikv.grpc_msg.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Coprocessor metrics discovery | Discovery coprocessor metrics. |
Dependent item | tikv.coprocessor.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Coprocessor: {#REQ_TYPE} metrics | Get metrics of {#REQ_TYPE} requests. |
Dependent item | tikv.coprocessor_request.metrics[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} errors, rate | Total number of push down request error per second. |
Dependent item | tikv.coprocessor_request_error.rate[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} requests, rate | Total number of coprocessor requests per second. |
Dependent item | tikv.coprocessor_request.rate[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} scan keys, rate | Total number of scan keys observed per request per second. |
Dependent item | tikv.coprocessor_scan_keys.rate[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
Dependent item | tikv.coprocessor_rocksdb_perf.rate[{#REQ_TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler metrics discovery | Discovery scheduler metrics. |
Dependent item | tikv.scheduler.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler: commands {#STAGE}, rate | Total number of commands on each stage per second. |
Dependent item | tikv.scheduler_stage.rate[{#STAGE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Server errors discovery | Discovery server errors metrics. |
Dependent item | tikv.server_report_failure.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Store_id {#STORE_ID}: failure messages "{#TYPE}", rate | Total number of reporting failure messages. The metric has two labels: type and store_id. type represents the failure type, and store_id represents the destination peer store id. |
Dependent item | tikv.messages.failure.rate[{#STORE_ID},{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB TiKV: Store_id {#STORE_ID}: Too many failure messages "{#TYPE}" | Indicates that the remote TiKV cannot be connected. |
min(/TiDB TiKV by HTTP/tikv.messages.failure.rate[{#STORE_ID},{#TYPE}],5m)>{$TIKV.STORE.ERRORS.MAX.WARN} |
Warning |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
The template to monitor TiKV server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB TiKV by HTTP — collects metrics by HTTP agent from TiKV /metrics endpoint.
Zabbix version: 7.0 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with TiKV server of TiDB cluster. Internal service metrics are collected from TiKV /metrics endpoint. Don't forget to change the macros {$TIKV.URL}, {$TIKV.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$TIKV.PORT} | The port of TiKV server metrics web endpoint |
20180 |
| {$TIKV.URL} | TiKV server URL |
localhost |
| {$TIKV.COPROCESSOR.ERRORS.MAX.WARN} | Maximum number of coprocessor request errors |
1 |
| {$TIKV.STORE.ERRORS.MAX.WARN} | Maximum number of failure messages |
1 |
| {$TIKV.PENDING_COMMANDS.MAX.WARN} | Maximum number of pending commands |
1 |
| {$TIKV.PENDING_TASKS.MAX.WARN} | Maximum number of tasks currently running by the worker or pending |
1 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get instance metrics | Get TiKV instance metrics. |
HTTP agent | tikv.get_metrics Preprocessing
|
| Store size | The storage size of TiKV instance. |
Dependent item | tikv.engine_size Preprocessing
|
| Get store size metrics | Get capacity metrics of TiKV instance. |
Dependent item | tikv.store_size.metrics Preprocessing
|
| Available size | The available capacity of TiKV instance. |
Dependent item | tikv.store_size.available Preprocessing
|
| Capacity size | The capacity size of TiKV instance. |
Dependent item | tikv.store_size.capacity Preprocessing
|
| Bytes read | The total bytes of read in TiKV instance. |
Dependent item | tikv.engine_flow_bytes.read Preprocessing
|
| Bytes write | The total bytes of write in TiKV instance. |
Dependent item | tikv.engine_flow_bytes.write Preprocessing
|
| Storage: commands total, rate | Total number of commands received per second. |
Dependent item | tikv.storage_command.rate Preprocessing
|
| CPU util | The CPU usage ratio on TiKV instance. |
Dependent item | tikv.cpu.util Preprocessing
|
| RSS memory usage | Resident memory size in bytes. |
Dependent item | tikv.rss_bytes Preprocessing
|
| Regions, count | The number of regions collected in TiKV instance. |
Dependent item | tikv.region_count Preprocessing
|
| Regions, leader | The number of leaders in TiKV instance. |
Dependent item | tikv.region_leader Preprocessing
|
| Get QPS metrics | Get QPS metrics in TiKV instance. |
Dependent item | tikv.grpc_msgs.metrics Preprocessing
|
| Total query, rate | The total QPS in TiKV instance. |
Dependent item | tikv.grpc_msg.rate Preprocessing
|
| Total query errors, rate | The total number of gRPC message handling failure per second. |
Dependent item | tikv.grpc_msg_fail.rate Preprocessing
|
| Coprocessor: Errors, rate | Total number of push down request error per second. |
Dependent item | tikv.coprocessor_request_error.rate Preprocessing
|
| Get coprocessor requests metrics | Get metrics of coprocessor requests. |
Dependent item | tikv.coprocessor_requests.metrics Preprocessing
|
| Coprocessor: Requests, rate | Total number of coprocessor requests per second. |
Dependent item | tikv.coprocessor_request.rate Preprocessing
|
| Coprocessor: Scan keys, rate | Total number of scan keys observed per request per second. |
Dependent item | tikv.coprocessor_scan_keys_sum.rate Preprocessing
|
| Coprocessor: RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
Dependent item | tikv.coprocessor_rocksdb_perf.rate Preprocessing
|
| Coprocessor: Response size, rate | The total size of coprocessor response per second. |
Dependent item | tikv.coprocessor_response_bytes.rate Preprocessing
|
| Scheduler: Pending commands | The total number of pending commands. The scheduler receives commands from clients, executes them against the MVCC layer storage engine. |
Dependent item | tikv.scheduler_contex Preprocessing
|
| Scheduler: Busy, rate | The total count of too busy schedulers per second. |
Dependent item | tikv.scheduler_too_busy.rate Preprocessing
|
| Get scheduler metrics | Get metrics of scheduler commands. |
Dependent item | tikv.scheduler.metrics Preprocessing
|
| Scheduler: Commands total, rate | Total number of commands per second. |
Dependent item | tikv.scheduler_commands.rate Preprocessing
|
| Scheduler: Low priority commands total, rate | Total count of low priority commands per second. |
Dependent item | tikv.commands_pri.low.rate Preprocessing
|
| Scheduler: Normal priority commands total, rate | Total count of normal priority commands per second. |
Dependent item | tikv.commands_pri.normal.rate Preprocessing
|
| Scheduler: High priority commands total, rate | Total count of high priority commands per second. |
Dependent item | tikv.commands_pri.high.rate Preprocessing
|
| Snapshot: Pending tasks | The number of tasks currently running by the worker or pending. |
Dependent item | tikv.worker_pending_task Preprocessing
|
| Snapshot: Sending | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.sending Preprocessing
|
| Snapshot: Receiving | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.receiving Preprocessing
|
| Snapshot: Applying | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.applying Preprocessing
|
| Uptime | The runtime of each TiKV instance. |
Dependent item | tikv.uptime Preprocessing
|
| Get failure msg metrics | Get metrics of reporting failure messages. |
Dependent item | tikv.messages.failure.metrics Preprocessing
|
| Server: failure messages total, rate | Total number of reporting failure messages per second. |
Dependent item | tikv.messages.failure.rate Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB TiKV: Too many coprocessor request error | min(/TiDB TiKV by HTTP/tikv.coprocessor_request_error.rate,5m)>{$TIKV.COPROCESSOR.ERRORS.MAX.WARN} |
Warning | ||
| TiDB TiKV: Too many pending commands | min(/TiDB TiKV by HTTP/tikv.scheduler_contex,5m)>{$TIKV.PENDING_COMMANDS.MAX.WARN} |
Average | ||
| TiDB TiKV: Too many pending tasks | min(/TiDB TiKV by HTTP/tikv.worker_pending_task,5m)>{$TIKV.PENDING_TASKS.MAX.WARN} |
Average | ||
| TiDB TiKV: Instance has been restarted | Uptime is less than 10 minutes. |
last(/TiDB TiKV by HTTP/tikv.uptime)<10m |
Info | Manual close: Yes |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS metrics. |
Dependent item | tikv.qps.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Query: {#TYPE}, rate | The QPS per command in TiKV instance. |
Dependent item | tikv.grpc_msg.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Coprocessor metrics discovery | Discovery coprocessor metrics. |
Dependent item | tikv.coprocessor.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Coprocessor: {#REQ_TYPE} metrics | Get metrics of {#REQ_TYPE} requests. |
Dependent item | tikv.coprocessor_request.metrics[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} errors, rate | Total number of push down request error per second. |
Dependent item | tikv.coprocessor_request_error.rate[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} requests, rate | Total number of coprocessor requests per second. |
Dependent item | tikv.coprocessor_request.rate[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} scan keys, rate | Total number of scan keys observed per request per second. |
Dependent item | tikv.coprocessor_scan_keys.rate[{#REQ_TYPE}] Preprocessing
|
| Coprocessor: {#REQ_TYPE} RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
Dependent item | tikv.coprocessor_rocksdb_perf.rate[{#REQ_TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler metrics discovery | Discovery scheduler metrics. |
Dependent item | tikv.scheduler.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler: commands {#STAGE}, rate | Total number of commands on each stage per second. |
Dependent item | tikv.scheduler_stage.rate[{#STAGE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Server errors discovery | Discovery server errors metrics. |
Dependent item | tikv.server_report_failure.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Store_id {#STORE_ID}: failure messages "{#TYPE}", rate | Total number of reporting failure messages. The metric has two labels: type and store_id. type represents the failure type, and store_id represents the destination peer store id. |
Dependent item | tikv.messages.failure.rate[{#STORE_ID},{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB TiKV: Store_id {#STORE_ID}: Too many failure messages "{#TYPE}" | Indicates that the remote TiKV cannot be connected. |
min(/TiDB TiKV by HTTP/tikv.messages.failure.rate[{#STORE_ID},{#TYPE}],5m)>{$TIKV.STORE.ERRORS.MAX.WARN} |
Warning |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
The template to monitor TiKV server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB TiKV by HTTP — collects metrics by HTTP agent from TiKV /metrics endpoint.
Zabbix version: 6.4 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with TiKV server of TiDB cluster. Internal service metrics are collected from TiKV /metrics endpoint. Don't forget to change the macros {$TIKV.URL}, {$TIKV.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$TIKV.PORT} | The port of TiKV server metrics web endpoint |
20180 |
| {$TIKV.URL} | TiKV server URL |
localhost |
| {$TIKV.COPROCESSOR.ERRORS.MAX.WARN} | Maximum number of coprocessor request errors |
1 |
| {$TIKV.STORE.ERRORS.MAX.WARN} | Maximum number of failure messages |
1 |
| {$TIKV.PENDING_COMMANDS.MAX.WARN} | Maximum number of pending commands |
1 |
| {$TIKV.PENDING_TASKS.MAX.WARN} | Maximum number of tasks currently running by the worker or pending |
1 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiKV: Get instance metrics | Get TiKV instance metrics. |
HTTP agent | tikv.get_metrics Preprocessing
|
| TiKV: Store size | The storage size of TiKV instance. |
Dependent item | tikv.engine_size Preprocessing
|
| TiKV: Get store size metrics | Get capacity metrics of TiKV instance. |
Dependent item | tikv.store_size.metrics Preprocessing
|
| TiKV: Available size | The available capacity of TiKV instance. |
Dependent item | tikv.store_size.available Preprocessing
|
| TiKV: Capacity size | The capacity size of TiKV instance. |
Dependent item | tikv.store_size.capacity Preprocessing
|
| TiKV: Bytes read | The total bytes of read in TiKV instance. |
Dependent item | tikv.engine_flow_bytes.read Preprocessing
|
| TiKV: Bytes write | The total bytes of write in TiKV instance. |
Dependent item | tikv.engine_flow_bytes.write Preprocessing
|
| TiKV: Storage: commands total, rate | Total number of commands received per second. |
Dependent item | tikv.storage_command.rate Preprocessing
|
| TiKV: CPU util | The CPU usage ratio on TiKV instance. |
Dependent item | tikv.cpu.util Preprocessing
|
| TiKV: RSS memory usage | Resident memory size in bytes. |
Dependent item | tikv.rss_bytes Preprocessing
|
| TiKV: Regions, count | The number of regions collected in TiKV instance. |
Dependent item | tikv.region_count Preprocessing
|
| TiKV: Regions, leader | The number of leaders in TiKV instance. |
Dependent item | tikv.region_leader Preprocessing
|
| TiKV: Get QPS metrics | Get QPS metrics in TiKV instance. |
Dependent item | tikv.grpc_msgs.metrics Preprocessing
|
| TiKV: Total query, rate | The total QPS in TiKV instance. |
Dependent item | tikv.grpc_msg.rate Preprocessing
|
| TiKV: Total query errors, rate | The total number of gRPC message handling failure per second. |
Dependent item | tikv.grpc_msg_fail.rate Preprocessing
|
| TiKV: Coprocessor: Errors, rate | Total number of push down request error per second. |
Dependent item | tikv.coprocessor_request_error.rate Preprocessing
|
| TiKV: Get coprocessor requests metrics | Get metrics of coprocessor requests. |
Dependent item | tikv.coprocessor_requests.metrics Preprocessing
|
| TiKV: Coprocessor: Requests, rate | Total number of coprocessor requests per second. |
Dependent item | tikv.coprocessor_request.rate Preprocessing
|
| TiKV: Coprocessor: Scan keys, rate | Total number of scan keys observed per request per second. |
Dependent item | tikv.coprocessor_scan_keys_sum.rate Preprocessing
|
| TiKV: Coprocessor: RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
Dependent item | tikv.coprocessor_rocksdb_perf.rate Preprocessing
|
| TiKV: Coprocessor: Response size, rate | The total size of coprocessor response per second. |
Dependent item | tikv.coprocessor_response_bytes.rate Preprocessing
|
| TiKV: Scheduler: Pending commands | The total number of pending commands. The scheduler receives commands from clients, executes them against the MVCC layer storage engine. |
Dependent item | tikv.scheduler_contex Preprocessing
|
| TiKV: Scheduler: Busy, rate | The total count of too busy schedulers per second. |
Dependent item | tikv.scheduler_too_busy.rate Preprocessing
|
| TiKV: Get scheduler metrics | Get metrics of scheduler commands. |
Dependent item | tikv.scheduler.metrics Preprocessing
|
| TiKV: Scheduler: Commands total, rate | Total number of commands per second. |
Dependent item | tikv.scheduler_commands.rate Preprocessing
|
| TiKV: Scheduler: Low priority commands total, rate | Total count of low priority commands per second. |
Dependent item | tikv.commands_pri.low.rate Preprocessing
|
| TiKV: Scheduler: Normal priority commands total, rate | Total count of normal priority commands per second. |
Dependent item | tikv.commands_pri.normal.rate Preprocessing
|
| TiKV: Scheduler: High priority commands total, rate | Total count of high priority commands per second. |
Dependent item | tikv.commands_pri.high.rate Preprocessing
|
| TiKV: Snapshot: Pending tasks | The number of tasks currently running by the worker or pending. |
Dependent item | tikv.worker_pending_task Preprocessing
|
| TiKV: Snapshot: Sending | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.sending Preprocessing
|
| TiKV: Snapshot: Receiving | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.receiving Preprocessing
|
| TiKV: Snapshot: Applying | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.applying Preprocessing
|
| TiKV: Uptime | The runtime of each TiKV instance. |
Dependent item | tikv.uptime Preprocessing
|
| TiKV: Get failure msg metrics | Get metrics of reporting failure messages. |
Dependent item | tikv.messages.failure.metrics Preprocessing
|
| TiKV: Server: failure messages total, rate | Total number of reporting failure messages per second. |
Dependent item | tikv.messages.failure.rate Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiKV: Too many coprocessor request error | min(/TiDB TiKV by HTTP/tikv.coprocessor_request_error.rate,5m)>{$TIKV.COPROCESSOR.ERRORS.MAX.WARN} |
Warning | ||
| TiKV: Too many pending commands | min(/TiDB TiKV by HTTP/tikv.scheduler_contex,5m)>{$TIKV.PENDING_COMMANDS.MAX.WARN} |
Average | ||
| TiKV: Too many pending tasks | min(/TiDB TiKV by HTTP/tikv.worker_pending_task,5m)>{$TIKV.PENDING_TASKS.MAX.WARN} |
Average | ||
| TiKV: has been restarted | Uptime is less than 10 minutes. |
last(/TiDB TiKV by HTTP/tikv.uptime)<10m |
Info | Manual close: Yes |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS metrics. |
Dependent item | tikv.qps.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiKV: Query: {#TYPE}, rate | The QPS per command in TiKV instance. |
Dependent item | tikv.grpc_msg.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Coprocessor metrics discovery | Discovery coprocessor metrics. |
Dependent item | tikv.coprocessor.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiKV: Coprocessor: {#REQ_TYPE} metrics | Get metrics of {#REQ_TYPE} requests. |
Dependent item | tikv.coprocessor_request.metrics[{#REQ_TYPE}] Preprocessing
|
| TiKV: Coprocessor: {#REQ_TYPE} errors, rate | Total number of push down request error per second. |
Dependent item | tikv.coprocessor_request_error.rate[{#REQ_TYPE}] Preprocessing
|
| TiKV: Coprocessor: {#REQ_TYPE} requests, rate | Total number of coprocessor requests per second. |
Dependent item | tikv.coprocessor_request.rate[{#REQ_TYPE}] Preprocessing
|
| TiKV: Coprocessor: {#REQ_TYPE} scan keys, rate | Total number of scan keys observed per request per second. |
Dependent item | tikv.coprocessor_scan_keys.rate[{#REQ_TYPE}] Preprocessing
|
| TiKV: Coprocessor: {#REQ_TYPE} RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
Dependent item | tikv.coprocessor_rocksdb_perf.rate[{#REQ_TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler metrics discovery | Discovery scheduler metrics. |
Dependent item | tikv.scheduler.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiKV: Scheduler: commands {#STAGE}, rate | Total number of commands on each stage per second. |
Dependent item | tikv.scheduler_stage.rate[{#STAGE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Server errors discovery | Discovery server errors metrics. |
Dependent item | tikv.server_report_failure.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiKV: Store_id {#STORE_ID}: failure messages "{#TYPE}", rate | Total number of reporting failure messages. The metric has two labels: type and store_id. type represents the failure type, and store_id represents the destination peer store id. |
Dependent item | tikv.messages.failure.rate[{#STORE_ID},{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiKV: Store_id {#STORE_ID}: Too many failure messages "{#TYPE}" | Indicates that the remote TiKV cannot be connected. |
min(/TiDB TiKV by HTTP/tikv.messages.failure.rate[{#STORE_ID},{#TYPE}],5m)>{$TIKV.STORE.ERRORS.MAX.WARN} |
Warning |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
For Zabbix version: 6.2 and higher
The template to monitor TiKV server of TiDB cluster by Zabbix that works without any external scripts.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB TiKV by HTTP — collects metrics by HTTP agent from TiKV /metrics endpoint.
This template was tested on:
See Zabbix template operation for basic instructions.
This template works with TiKV server of TiDB cluster. Internal service metrics are collected from TiKV /metrics endpoint. Don't forget to change the macros {$TIKV.URL}, {$TIKV.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
No specific Zabbix configuration is required.
| Name | Description | Default |
|---|---|---|
| {$TIKV.COPOCESSOR.ERRORS.MAX.WARN} | Maximum number of coprocessor request errors |
1 |
| {$TIKV.PENDING_COMMANDS.MAX.WARN} | Maximum number of pending commands |
1 |
| {$TIKV.PENDING_TASKS.MAX.WARN} | Maximum number of tasks currently running by the worker or pending |
1 |
| {$TIKV.PORT} | The port of TiKV server metrics web endpoint |
20180 |
| {$TIKV.STORE.ERRORS.MAX.WARN} | Maximum number of failure messages |
1 |
| {$TIKV.URL} | TiKV server URL |
localhost |
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Coprocessor metrics discovery | Discovery coprocessor metrics. |
DEPENDENT | tikv.coprocessor.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| QPS metrics discovery | Discovery QPS metrics. |
DEPENDENT | tikv.qps.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Scheduler metrics discovery | Discovery scheduler metrics. |
DEPENDENT | tikv.scheduler.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Server errors discovery | Discovery server errors metrics. |
DEPENDENT | tikv.server_report_failure.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: Overrides: Too many unreachable messages trigger |
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| TiKV node | TiKV: Store size | The storage size of TiKV instance. |
DEPENDENT | tikv.engine_size Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Available size | The available capacity of TiKV instance. |
DEPENDENT | tikv.store_size.available Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Capacity size | The capacity size of TiKV instance. |
DEPENDENT | tikv.store_size.capacity Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Bytes read | The total bytes of read in TiKV instance. |
DEPENDENT | tikv.engine_flow_bytes.read Preprocessing: - JSONPATH: `$[?(@.name == "tikv_engine_flow_bytes" && @.labels.db == "kv" && @.labels.type =~ "bytes_read |
| TiKV node | TiKV: Bytes write | The total bytes of write in TiKV instance. |
DEPENDENT | tikv.engine_flow_bytes.write Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Storage: commands total, rate | Total number of commands received per second. |
DEPENDENT | tikv.storage_command.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: CPU util | The CPU usage ratio on TiKV instance. |
DEPENDENT | tikv.cpu.util Preprocessing: - JSONPATH: - CHANGE_PER_SECOND - MULTIPLIER: |
| TiKV node | TiKV: RSS memory usage | Resident memory size in bytes. |
DEPENDENT | tikv.rss_bytes Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Regions, count | The number of regions collected in TiKV instance. |
DEPENDENT | tikv.region_count Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Regions, leader | The number of leaders in TiKV instance. |
DEPENDENT | tikv.region_leader Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Total query, rate | The total QPS in TiKV instance. |
DEPENDENT | tikv.grpc_msg.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Total query errors, rate | The total number of gRPC message handling failure per second. |
DEPENDENT | tikv.grpc_msg_fail.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: Errors, rate | Total number of push down request error per second. |
DEPENDENT | tikv.coprocessor_request_error.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: Requests, rate | Total number of coprocessor requests per second. |
DEPENDENT | tikv.coprocessor_request.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: Scan keys, rate | Total number of scan keys observed per request per second. |
DEPENDENT | tikv.coprocessor_scan_keys_sum.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
DEPENDENT | tikv.coprocessor_rocksdb_perf.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: Response size, rate | The total size of coprocessor response per second. |
DEPENDENT | tikv.coprocessor_response_bytes.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: Pending commands | The total number of pending commands. The scheduler receives commands from clients, executes them against the MVCC layer storage engine. |
DEPENDENT | tikv.scheduler_contex Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Scheduler: Busy, rate | The total count of too busy schedulers per second. |
DEPENDENT | tikv.scheduler_too_busy.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: Commands total, rate | Total number of commands per second. |
DEPENDENT | tikv.scheduler_commands.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: Low priority commands total, rate | Total count of low priority commands per second. |
DEPENDENT | tikv.commands_pri.low.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: Normal priority commands total, rate | Total count of normal priority commands per second. |
DEPENDENT | tikv.commands_pri.normal.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: High priority commands total, rate | Total count of high priority commands per second. |
DEPENDENT | tikv.commands_pri.high.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Snapshot: Pending tasks | The number of tasks currently running by the worker or pending. |
DEPENDENT | tikv.worker_pending_task Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Snapshot: Sending | The total amount of raftstore snapshot traffic. |
DEPENDENT | tikv.snapshot.sending Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Snapshot: Receiving | The total amount of raftstore snapshot traffic. |
DEPENDENT | tikv.snapshot.receiving Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Snapshot: Applying | The total amount of raftstore snapshot traffic. |
DEPENDENT | tikv.snapshot.applying Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Uptime | The runtime of each TiKV instance. |
DEPENDENT | tikv.uptime Preprocessing: - JSONPATH: - JAVASCRIPT: |
| TiKV node | TiKV: Server: failure messages total, rate | Total number of reporting failure messages per second. |
DEPENDENT | tikv.messages.failure.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Query: {#TYPE}, rate | The QPS per command in TiKV instance. |
DEPENDENT | tikv.grpc_msg.rate[{#TYPE}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| TiKV node | TiKV: Coprocessor: {#REQ_TYPE} errors, rate | Total number of push down request error per second. |
DEPENDENT | tikv.coprocessor_request_error.rate[{#REQ_TYPE}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: {#REQ_TYPE} requests, rate | Total number of coprocessor requests per second. |
DEPENDENT | tikv.coprocessor_request.rate[{#REQ_TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: {#REQ_TYPE} scan keys, rate | Total number of scan keys observed per request per second. |
DEPENDENT | tikv.coprocessor_scan_keys.rate[{#REQ_TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: {#REQ_TYPE} RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
DEPENDENT | tikv.coprocessor_rocksdb_perf.rate[{#REQ_TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: commands {#STAGE}, rate | Total number of commands on each stage per second. |
DEPENDENT | tikv.scheduler_stage.rate[{#STAGE}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Store_id {#STORE_ID}: failure messages "{#TYPE}", rate | Total number of reporting failure messages. The metric has two labels: type and store_id. type represents the failure type, and store_id represents the destination peer store id. |
DEPENDENT | tikv.messages.failure.rate[{#STORE_ID},{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| Zabbix raw items | TiKV: Get instance metrics | Get TiKV instance metrics. |
HTTP_AGENT | tikv.get_metrics Preprocessing: - CHECK_NOT_SUPPORTED ⛔️ON_FAIL: - PROMETHEUS_TO_JSON |
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiKV: Too many coprocessor request error | - |
min(/TiDB TiKV by HTTP/tikv.coprocessor_request_error.rate,5m)>{$TIKV.COPOCESSOR.ERRORS.MAX.WARN} |
WARNING | |
| TiKV: Too many pending commands | - |
min(/TiDB TiKV by HTTP/tikv.scheduler_contex,5m)>{$TIKV.PENDING_COMMANDS.MAX.WARN} |
AVERAGE | |
| TiKV: Too many pending tasks | - |
min(/TiDB TiKV by HTTP/tikv.worker_pending_task,5m)>{$TIKV.PENDING_TASKS.MAX.WARN} |
AVERAGE | |
| TiKV: has been restarted | Uptime is less than 10 minutes. |
last(/TiDB TiKV by HTTP/tikv.uptime)<10m |
INFO | Manual close: YES |
| TiKV: Store_id {#STORE_ID}: Too many failure messages "{#TYPE}" | Indicates that the remote TiKV cannot be connected. |
min(/TiDB TiKV by HTTP/tikv.messages.failure.rate[{#STORE_ID},{#TYPE}],5m)>{$TIKV.STORE.ERRORS.MAX.WARN} |
WARNING |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template or ask for help with it at ZABBIX forums.
The template to monitor TiKV server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB TiKV by HTTP — collects metrics by HTTP agent from TiKV /metrics endpoint.
Zabbix version: 6.0 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with TiKV server of TiDB cluster. Internal service metrics are collected from TiKV /metrics endpoint. Don't forget to change the macros {$TIKV.URL}, {$TIKV.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$TIKV.PORT} | The port of TiKV server metrics web endpoint |
20180 |
| {$TIKV.URL} | TiKV server URL |
localhost |
| {$TIKV.COPROCESSOR.ERRORS.MAX.WARN} | Maximum number of coprocessor request errors |
1 |
| {$TIKV.STORE.ERRORS.MAX.WARN} | Maximum number of failure messages |
1 |
| {$TIKV.PENDING_COMMANDS.MAX.WARN} | Maximum number of pending commands |
1 |
| {$TIKV.PENDING_TASKS.MAX.WARN} | Maximum number of tasks currently running by the worker or pending |
1 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiKV: Get instance metrics | Get TiKV instance metrics. |
HTTP agent | tikv.get_metrics Preprocessing
|
| TiKV: Store size | The storage size of TiKV instance. |
Dependent item | tikv.engine_size Preprocessing
|
| TiKV: Get store size metrics | Get capacity metrics of TiKV instance. |
Dependent item | tikv.store_size.metrics Preprocessing
|
| TiKV: Available size | The available capacity of TiKV instance. |
Dependent item | tikv.store_size.available Preprocessing
|
| TiKV: Capacity size | The capacity size of TiKV instance. |
Dependent item | tikv.store_size.capacity Preprocessing
|
| TiKV: Bytes read | The total bytes of read in TiKV instance. |
Dependent item | tikv.engine_flow_bytes.read Preprocessing
|
| TiKV: Bytes write | The total bytes of write in TiKV instance. |
Dependent item | tikv.engine_flow_bytes.write Preprocessing
|
| TiKV: Storage: commands total, rate | Total number of commands received per second. |
Dependent item | tikv.storage_command.rate Preprocessing
|
| TiKV: CPU util | The CPU usage ratio on TiKV instance. |
Dependent item | tikv.cpu.util Preprocessing
|
| TiKV: RSS memory usage | Resident memory size in bytes. |
Dependent item | tikv.rss_bytes Preprocessing
|
| TiKV: Regions, count | The number of regions collected in TiKV instance. |
Dependent item | tikv.region_count Preprocessing
|
| TiKV: Regions, leader | The number of leaders in TiKV instance. |
Dependent item | tikv.region_leader Preprocessing
|
| TiKV: Get QPS metrics | Get QPS metrics in TiKV instance. |
Dependent item | tikv.grpc_msgs.metrics Preprocessing
|
| TiKV: Total query, rate | The total QPS in TiKV instance. |
Dependent item | tikv.grpc_msg.rate Preprocessing
|
| TiKV: Total query errors, rate | The total number of gRPC message handling failure per second. |
Dependent item | tikv.grpc_msg_fail.rate Preprocessing
|
| TiKV: Coprocessor: Errors, rate | Total number of push down request error per second. |
Dependent item | tikv.coprocessor_request_error.rate Preprocessing
|
| TiKV: Get coprocessor requests metrics | Get metrics of coprocessor requests. |
Dependent item | tikv.coprocessor_requests.metrics Preprocessing
|
| TiKV: Coprocessor: Requests, rate | Total number of coprocessor requests per second. |
Dependent item | tikv.coprocessor_request.rate Preprocessing
|
| TiKV: Coprocessor: Scan keys, rate | Total number of scan keys observed per request per second. |
Dependent item | tikv.coprocessor_scan_keys_sum.rate Preprocessing
|
| TiKV: Coprocessor: RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
Dependent item | tikv.coprocessor_rocksdb_perf.rate Preprocessing
|
| TiKV: Coprocessor: Response size, rate | The total size of coprocessor response per second. |
Dependent item | tikv.coprocessor_response_bytes.rate Preprocessing
|
| TiKV: Scheduler: Pending commands | The total number of pending commands. The scheduler receives commands from clients, executes them against the MVCC layer storage engine. |
Dependent item | tikv.scheduler_contex Preprocessing
|
| TiKV: Scheduler: Busy, rate | The total count of too busy schedulers per second. |
Dependent item | tikv.scheduler_too_busy.rate Preprocessing
|
| TiKV: Get scheduler metrics | Get metrics of scheduler commands. |
Dependent item | tikv.scheduler.metrics Preprocessing
|
| TiKV: Scheduler: Commands total, rate | Total number of commands per second. |
Dependent item | tikv.scheduler_commands.rate Preprocessing
|
| TiKV: Scheduler: Low priority commands total, rate | Total count of low priority commands per second. |
Dependent item | tikv.commands_pri.low.rate Preprocessing
|
| TiKV: Scheduler: Normal priority commands total, rate | Total count of normal priority commands per second. |
Dependent item | tikv.commands_pri.normal.rate Preprocessing
|
| TiKV: Scheduler: High priority commands total, rate | Total count of high priority commands per second. |
Dependent item | tikv.commands_pri.high.rate Preprocessing
|
| TiKV: Snapshot: Pending tasks | The number of tasks currently running by the worker or pending. |
Dependent item | tikv.worker_pending_task Preprocessing
|
| TiKV: Snapshot: Sending | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.sending Preprocessing
|
| TiKV: Snapshot: Receiving | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.receiving Preprocessing
|
| TiKV: Snapshot: Applying | The total amount of raftstore snapshot traffic. |
Dependent item | tikv.snapshot.applying Preprocessing
|
| TiKV: Uptime | The runtime of each TiKV instance. |
Dependent item | tikv.uptime Preprocessing
|
| TiKV: Get failure msg metrics | Get metrics of reporting failure messages. |
Dependent item | tikv.messages.failure.metrics Preprocessing
|
| TiKV: Server: failure messages total, rate | Total number of reporting failure messages per second. |
Dependent item | tikv.messages.failure.rate Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiKV: Too many coprocessor request error | min(/TiDB TiKV by HTTP/tikv.coprocessor_request_error.rate,5m)>{$TIKV.COPROCESSOR.ERRORS.MAX.WARN} |
Warning | ||
| TiKV: Too many pending commands | min(/TiDB TiKV by HTTP/tikv.scheduler_contex,5m)>{$TIKV.PENDING_COMMANDS.MAX.WARN} |
Average | ||
| TiKV: Too many pending tasks | min(/TiDB TiKV by HTTP/tikv.worker_pending_task,5m)>{$TIKV.PENDING_TASKS.MAX.WARN} |
Average | ||
| TiKV: has been restarted | Uptime is less than 10 minutes. |
last(/TiDB TiKV by HTTP/tikv.uptime)<10m |
Info | Manual close: Yes |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS metrics. |
Dependent item | tikv.qps.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiKV: Query: {#TYPE}, rate | The QPS per command in TiKV instance. |
Dependent item | tikv.grpc_msg.rate[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Coprocessor metrics discovery | Discovery coprocessor metrics. |
Dependent item | tikv.coprocessor.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiKV: Coprocessor: {#REQ_TYPE} metrics | Get metrics of {#REQ_TYPE} requests. |
Dependent item | tikv.coprocessor_request.metrics[{#REQ_TYPE}] Preprocessing
|
| TiKV: Coprocessor: {#REQ_TYPE} errors, rate | Total number of push down request error per second. |
Dependent item | tikv.coprocessor_request_error.rate[{#REQ_TYPE}] Preprocessing
|
| TiKV: Coprocessor: {#REQ_TYPE} requests, rate | Total number of coprocessor requests per second. |
Dependent item | tikv.coprocessor_request.rate[{#REQ_TYPE}] Preprocessing
|
| TiKV: Coprocessor: {#REQ_TYPE} scan keys, rate | Total number of scan keys observed per request per second. |
Dependent item | tikv.coprocessor_scan_keys.rate[{#REQ_TYPE}] Preprocessing
|
| TiKV: Coprocessor: {#REQ_TYPE} RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
Dependent item | tikv.coprocessor_rocksdb_perf.rate[{#REQ_TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler metrics discovery | Discovery scheduler metrics. |
Dependent item | tikv.scheduler.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiKV: Scheduler: commands {#STAGE}, rate | Total number of commands on each stage per second. |
Dependent item | tikv.scheduler_stage.rate[{#STAGE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Server errors discovery | Discovery server errors metrics. |
Dependent item | tikv.server_report_failure.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiKV: Store_id {#STORE_ID}: failure messages "{#TYPE}", rate | Total number of reporting failure messages. The metric has two labels: type and store_id. type represents the failure type, and store_id represents the destination peer store id. |
Dependent item | tikv.messages.failure.rate[{#STORE_ID},{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiKV: Store_id {#STORE_ID}: Too many failure messages "{#TYPE}" | Indicates that the remote TiKV cannot be connected. |
min(/TiDB TiKV by HTTP/tikv.messages.failure.rate[{#STORE_ID},{#TYPE}],5m)>{$TIKV.STORE.ERRORS.MAX.WARN} |
Warning |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
For Zabbix version: 5.4 and higher
The template to monitor TiKV server of TiDB cluster by Zabbix that works without any external scripts.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB TiKV by HTTP — collects metrics by HTTP agent from TiKV /metrics endpoint.
This template was tested on:
See Zabbix template operation for basic instructions.
This template works with TiKV server of TiDB cluster. Internal service metrics are collected from TiKV /metrics endpoint. Don't forget to change the macros {$TIKV.URL}, {$TIKV.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
No specific Zabbix configuration is required.
| Name | Description | Default |
|---|---|---|
| {$TIKV.COPOCESSOR.ERRORS.MAX.WARN} | Maximum number of coprocessor request errors |
1 |
| {$TIKV.PENDING_COMMANDS.MAX.WARN} | Maximum number of pending commands |
1 |
| {$TIKV.PENDING_TASKS.MAX.WARN} | Maximum number of tasks currently running by the worker or pending |
1 |
| {$TIKV.PORT} | The port of TiKV server metrics web endpoint |
20180 |
| {$TIKV.STORE.ERRORS.MAX.WARN} | Maximum number of failure messages |
1 |
| {$TIKV.URL} | TiKV server URL |
localhost |
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| QPS metrics discovery | Discovery QPS metrics. |
DEPENDENT | tikv.qps.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Coprocessor metrics discovery | Discovery coprocessor metrics. |
DEPENDENT | tikv.coprocessor.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Scheduler metrics discovery | Discovery scheduler metrics. |
DEPENDENT | tikv.scheduler.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Server errors discovery | Discovery server errors metrics. |
DEPENDENT | tikv.server_report_failure.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: Overrides: Too many unreachable messages trigger |
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| TiKV node | TiKV: Store size | The storage size of TiKV instance. |
DEPENDENT | tikv.engine_size Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Available size | The available capacity of TiKV instance. |
DEPENDENT | tikv.store_size.available Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Capacity size | The capacity size of TiKV instance. |
DEPENDENT | tikv.store_size.capacity Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Bytes read | The total bytes of read in TiKV instance. |
DEPENDENT | tikv.engine_flow_bytes.read Preprocessing: - JSONPATH: `$[?(@.name == "tikv_engine_flow_bytes" && @.labels.db == "kv" && @.labels.type =~ "bytes_read |
| TiKV node | TiKV: Bytes write | The total bytes of write in TiKV instance. |
DEPENDENT | tikv.engine_flow_bytes.write Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Storage: commands total, rate | Total number of commands received per second. |
DEPENDENT | tikv.storage_command.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: CPU util | The CPU usage ratio on TiKV instance. |
DEPENDENT | tikv.cpu.util Preprocessing: - JSONPATH: - CHANGE_PER_SECOND - MULTIPLIER: |
| TiKV node | TiKV: RSS memory usage | Resident memory size in bytes. |
DEPENDENT | tikv.rss_bytes Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Regions, count | The number of regions collected in TiKV instance. |
DEPENDENT | tikv.region_count Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Regions, leader | The number of leaders in TiKV instance. |
DEPENDENT | tikv.region_leader Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Total query, rate | The total QPS in TiKV instance. |
DEPENDENT | tikv.grpc_msg.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Total query errors, rate | The total number of gRPC message handling failure per second. |
DEPENDENT | tikv.grpc_msg_fail.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: Errors, rate | Total number of push down request error per second. |
DEPENDENT | tikv.coprocessor_request_error.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: Requests, rate | Total number of coprocessor requests per second. |
DEPENDENT | tikv.coprocessor_request.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
DEPENDENT | tikv.coprocessor_rocksdb_perf.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: Response size, rate | The total size of coprocessor response per second. |
DEPENDENT | tikv.coprocessor_scan_keys.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: Busy, rate | The total count of too busy schedulers per second. |
DEPENDENT | tikv.scheduler_too_busy.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: Commands total, rate | Total number of commands per second. |
DEPENDENT | tikv.scheduler_commands.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: Low priority commands total, rate | Total count of low priority commands per second. |
DEPENDENT | tikv.commands_pri.low.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: Normal priority commands total, rate | Total count of normal priority commands per second. |
DEPENDENT | tikv.commands_pri.normal.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: High priority commands total, rate | Total count of high priority commands per second. |
DEPENDENT | tikv.commands_pri.high.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Snapshot: Pending tasks | The number of tasks currently running by the worker or pending. |
DEPENDENT | tikv.scheduler_contex Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Snapshot: Sending | The total amount of raftstore snapshot traffic. |
DEPENDENT | tikv.snapshot.sending Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Snapshot: Receiving | The total amount of raftstore snapshot traffic. |
DEPENDENT | tikv.snapshot.receiving Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Snapshot: Applying | The total amount of raftstore snapshot traffic. |
DEPENDENT | tikv.snapshot.applying Preprocessing: - JSONPATH: |
| TiKV node | TiKV: Uptime | The runtime of each TiKV instance. |
DEPENDENT | tikv.uptime Preprocessing: - JSONPATH: - JAVASCRIPT: |
| TiKV node | TiKV: Server: failure messages total, rate | Total number of reporting failure messages per second. |
DEPENDENT | tikv.messages.failure.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Query: {#TYPE}, rate | The QPS per command in TiKV instance. |
DEPENDENT | tikv.grpc_msg.rate[{#TYPE}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| TiKV node | TiKV: Coprocessor: {#REQ_TYPE} errors, rate | Total number of push down request error per second. |
DEPENDENT | tikv.coprocessor_request_error.rate[{#REQ_TYPE}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: {#REQ_TYPE} requests, rate | Total number of coprocessor requests per second. |
DEPENDENT | tikv.coprocessor_request.rate[{#REQ_TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: {#REQ_TYPE} scan keys, rate | Total number of scan keys observed per request per second. |
DEPENDENT | tikv.coprocessor_scan_keys.rate[{#REQ_TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Coprocessor: {#REQ_TYPE} RocksDB ops, rate | Total number of RocksDB internal operations from PerfContext per second. |
DEPENDENT | tikv.coprocessor_rocksdb_perf.rate[{#REQ_TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Scheduler: commands {#STAGE}, rate | Total number of commands on each stage per second. |
DEPENDENT | tikv.scheduler_stage.rate[{#STAGE}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiKV node | TiKV: Store_id {#STORE_ID}: failure messages "{#TYPE}", rate | Total number of reporting failure messages. The metric has two labels: type and store_id. type represents the failure type, and store_id represents the destination peer store id. |
DEPENDENT | tikv.messages.failure.rate[{#STORE_ID},{#TYPE}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| Zabbix_raw_items | TiKV: Get instance metrics | Get TiKV instance metrics. |
HTTP_AGENT | tikv.get_metrics Preprocessing: - CHECK_NOT_SUPPORTED ⛔️ON_FAIL: - PROMETHEUS_TO_JSON |
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiKV: Too many coprocessor request error (over {$TIKV.COPOCESSOR.ERRORS.MAX.WARN} in 5m) | - |
min(/TiDB TiKV by HTTP/tikv.coprocessor_request_error.rate,5m)>{$TIKV.COPOCESSOR.ERRORS.MAX.WARN} |
WARNING | |
| TiKV: Too many pending commands (over {$TIKV.PENDING_COMMANDS.MAX.WARN} for 5m) | - |
min(/TiDB TiKV by HTTP/tikv.scheduler_contex,5m)>{$TIKV.PENDING_COMMANDS.MAX.WARN} |
AVERAGE | |
| TiKV: Too many pending commands (over {$TIKV.PENDING_TASKS.MAX.WARN} for 5m) | - |
min(/TiDB TiKV by HTTP/tikv.scheduler_contex,5m)>{$TIKV.PENDING_TASKS.MAX.WARN} |
AVERAGE | |
| TiKV: has been restarted (uptime < 10m) | Uptime is less than 10 minutes |
last(/TiDB TiKV by HTTP/tikv.uptime)<10m |
INFO | Manual close: YES |
| TiKV: Store_id {#STORE_ID}: Too many failure messages "{#TYPE}" (over {$TIKV.STORE.ERRORS.MAX.WARN} in 5m) | Indicates that the remote TiKV cannot be connected. |
min(/TiDB TiKV by HTTP/tikv.messages.failure.rate[{#STORE_ID},{#TYPE}],5m)>{$TIKV.STORE.ERRORS.MAX.WARN} |
WARNING |
Please report any issues with the template at https://support.zabbix.com
You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.
The template to monitor PD server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB PD by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
Zabbix version: 7.4 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with PD server of TiDB cluster. Internal service metrics are collected from PD /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$PD.URL}, {$PD.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$PD.PORT} | The port of PD server metrics web endpoint |
2379 |
| {$PD.URL} | PD server URL |
localhost |
| {$PD.MISS_REGION.MAX.WARN} | Maximum number of missed regions |
100 |
| {$PD.STORAGE_USAGE.MAX.WARN} | Maximum percentage of cluster space used |
80 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get instance metrics | Get TiDB PD instance metrics. |
HTTP agent | pd.get_metrics Preprocessing
|
| Get instance status | Get TiDB PD instance status info. |
HTTP agent | pd.get_status Preprocessing
|
| Status | Status of PD instance. |
Dependent item | pd.status Preprocessing
|
| gRPC Commands total, rate | The rate at which gRPC commands are completed. |
Dependent item | pd.grpc_command.rate Preprocessing
|
| Version | Version of the PD instance. |
Dependent item | pd.version Preprocessing
|
| Uptime | The runtime of each PD instance. |
Dependent item | pd.uptime Preprocessing
|
| Get cluster metrics | Get cluster metrics. |
Dependent item | pd.cluster_status.get_metrics Preprocessing
|
| Get region metrics | Get region metrics. |
Dependent item | pd.regions.get_metrics Preprocessing
|
| Get region label metrics | Get region label metrics. |
Dependent item | pd.region_labels.get_metrics Preprocessing
|
| Get region status metrics | Get region status metrics. |
Dependent item | pd.region_status.get_metrics Preprocessing
|
| Get gRPC command metrics | Get gRPC command metrics. |
Dependent item | pd.grpc_commands.get_metrics Preprocessing
|
| Get scheduler metrics | Get scheduler metrics. |
Dependent item | pd.scheduler.get_metrics Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB PD: Instance is not responding | last(/TiDB PD by HTTP/pd.status)=0 |
Average | ||
| TiDB PD: Version has changed | PD version has changed. Acknowledge to close the problem manually. |
last(/TiDB PD by HTTP/pd.version,#1)<>last(/TiDB PD by HTTP/pd.version,#2) and length(last(/TiDB PD by HTTP/pd.version))>0 |
Info | Manual close: Yes |
| TiDB PD: Instance has been restarted | Uptime is less than 10 minutes. |
last(/TiDB PD by HTTP/pd.uptime)<10m |
Info | Manual close: Yes |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Cluster metrics discovery | Discovery cluster specific metrics. |
Dependent item | pd.cluster.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Offline stores | Dependent item | pd.cluster_status.store_offline[{#SINGLETON}] Preprocessing
|
|
| Tombstone stores | The count of tombstone stores. |
Dependent item | pd.cluster_status.store_tombstone[{#SINGLETON}] Preprocessing
|
| Down stores | The count of down stores. |
Dependent item | pd.cluster_status.store_down[{#SINGLETON}] Preprocessing
|
| Lowspace stores | The count of low space stores. |
Dependent item | pd.cluster_status.store_low_space[{#SINGLETON}] Preprocessing
|
| Unhealth stores | The count of unhealthy stores. |
Dependent item | pd.cluster_status.store_unhealth[{#SINGLETON}] Preprocessing
|
| Disconnect stores | The count of disconnected stores. |
Dependent item | pd.cluster_status.store_disconnected[{#SINGLETON}] Preprocessing
|
| Normal stores | The count of healthy storage instances. |
Dependent item | pd.cluster_status.store_up[{#SINGLETON}] Preprocessing
|
| Storage capacity | The total storage capacity for this TiDB cluster. |
Dependent item | pd.cluster_status.storage_capacity[{#SINGLETON}] Preprocessing
|
| Storage size | The storage size that is currently used by the TiDB cluster. |
Dependent item | pd.cluster_status.storage_size[{#SINGLETON}] Preprocessing
|
| Number of regions | The total count of cluster Regions. |
Dependent item | pd.cluster_status.leader_count[{#SINGLETON}] Preprocessing
|
| Current peer count | The current count of all cluster peers. |
Dependent item | pd.cluster_status.region_count[{#SINGLETON}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB PD: There are offline TiKV nodes | PD has not received a TiKV heartbeat for a long time. |
last(/TiDB PD by HTTP/pd.cluster_status.store_down[{#SINGLETON}])>0 |
Average | |
| TiDB PD: There are low space TiKV nodes | Indicates that there is no sufficient space on the TiKV node. |
last(/TiDB PD by HTTP/pd.cluster_status.store_low_space[{#SINGLETON}])>0 |
Average | |
| TiDB PD: There are disconnected TiKV nodes | PD does not receive a TiKV heartbeat within 20 seconds. Normally a TiKV heartbeat comes in every 10 seconds. |
last(/TiDB PD by HTTP/pd.cluster_status.store_disconnected[{#SINGLETON}])>0 |
Warning | |
| TiDB PD: Current storage usage is too high | Over {$PD.STORAGE_USAGE.MAX.WARN}% of the cluster space is occupied. |
min(/TiDB PD by HTTP/pd.cluster_status.storage_size[{#SINGLETON}],5m)/last(/TiDB PD by HTTP/pd.cluster_status.storage_capacity[{#SINGLETON}])*100>{$PD.STORAGE_USAGE.MAX.WARN} |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region labels discovery | Discovery region labels specific metrics. |
Dependent item | pd.region_labels.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Regions label: {#TYPE} | The number of Regions in different label levels. |
Dependent item | pd.region_labels[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region status discovery | Discovery region status specific metrics. |
Dependent item | pd.region_status.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Regions status: {#TYPE} | The health status of Regions indicated via the count of unusual Regions including pending peers, down peers, extra peers, offline peers, missing peers, learner peers and incorrect namespaces. |
Dependent item | pd.region_status[{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB PD: Too many missed regions | The number of Region replicas is smaller than the value of max-replicas. When a TiKV machine is down and its downtime exceeds max-down-time, it usually leads to missing replicas for some Regions during a period of time. When a TiKV node is made offline, it might result in a small number of Regions with missing replicas. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>{$PD.MISS_REGION.MAX.WARN} |
Warning | |
| TiDB PD: There are unresponsive peers | The number of Regions with an unresponsive peer reported by the Raft leader. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>0 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Running scheduler discovery | Discovery scheduler specific metrics. |
Dependent item | pd.scheduler.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler status: {#KIND} | The current running schedulers. |
Dependent item | pd.scheduler[{#KIND}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| gRPC commands discovery | Discovery grpc commands specific metrics. |
Dependent item | pd.grpc_command.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| gRPC Commands: {#GRPC_METHOD}, rate | The rate per command type at which gRPC commands are completed. |
Dependent item | pd.grpc_command.rate[{#GRPC_METHOD}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region discovery | Discovery region specific metrics. |
Dependent item | pd.region.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get metrics: {#STORE_ADDRESS} | Get region metrics for {#STORE_ADDRESS}. |
Dependent item | pd.region_heartbeat.get_metrics[{#STORE_ADDRESS}] Preprocessing
|
| Region heartbeat: active, rate | The count of heartbeats with the ok status per second. |
Dependent item | pd.region_heartbeat.ok.rate[{#STORE_ADDRESS}] Preprocessing
|
| Region heartbeat: error, rate | The count of heartbeats with the error status per second. |
Dependent item | pd.region_heartbeat.error.rate[{#STORE_ADDRESS}] Preprocessing
|
| Region heartbeat: total, rate | The count of heartbeats reported to PD per instance per second. |
Dependent item | pd.region_heartbeat.rate[{#STORE_ADDRESS}] Preprocessing
|
| Region schedule push: total, rate | Dependent item | pd.region_heartbeat.push.err.rate[{#STORE_ADDRESS}] Preprocessing
|
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
The template to monitor PD server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB PD by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
Zabbix version: 7.2 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with PD server of TiDB cluster. Internal service metrics are collected from PD /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$PD.URL}, {$PD.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$PD.PORT} | The port of PD server metrics web endpoint |
2379 |
| {$PD.URL} | PD server URL |
localhost |
| {$PD.MISS_REGION.MAX.WARN} | Maximum number of missed regions |
100 |
| {$PD.STORAGE_USAGE.MAX.WARN} | Maximum percentage of cluster space used |
80 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get instance metrics | Get TiDB PD instance metrics. |
HTTP agent | pd.get_metrics Preprocessing
|
| Get instance status | Get TiDB PD instance status info. |
HTTP agent | pd.get_status Preprocessing
|
| Status | Status of PD instance. |
Dependent item | pd.status Preprocessing
|
| gRPC Commands total, rate | The rate at which gRPC commands are completed. |
Dependent item | pd.grpc_command.rate Preprocessing
|
| Version | Version of the PD instance. |
Dependent item | pd.version Preprocessing
|
| Uptime | The runtime of each PD instance. |
Dependent item | pd.uptime Preprocessing
|
| Get cluster metrics | Get cluster metrics. |
Dependent item | pd.cluster_status.get_metrics Preprocessing
|
| Get region metrics | Get region metrics. |
Dependent item | pd.regions.get_metrics Preprocessing
|
| Get region label metrics | Get region label metrics. |
Dependent item | pd.region_labels.get_metrics Preprocessing
|
| Get region status metrics | Get region status metrics. |
Dependent item | pd.region_status.get_metrics Preprocessing
|
| Get gRPC command metrics | Get gRPC command metrics. |
Dependent item | pd.grpc_commands.get_metrics Preprocessing
|
| Get scheduler metrics | Get scheduler metrics. |
Dependent item | pd.scheduler.get_metrics Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB PD: Instance is not responding | last(/TiDB PD by HTTP/pd.status)=0 |
Average | ||
| TiDB PD: Version has changed | PD version has changed. Acknowledge to close the problem manually. |
last(/TiDB PD by HTTP/pd.version,#1)<>last(/TiDB PD by HTTP/pd.version,#2) and length(last(/TiDB PD by HTTP/pd.version))>0 |
Info | Manual close: Yes |
| TiDB PD: Instance has been restarted | Uptime is less than 10 minutes. |
last(/TiDB PD by HTTP/pd.uptime)<10m |
Info | Manual close: Yes |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Cluster metrics discovery | Discovery cluster specific metrics. |
Dependent item | pd.cluster.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Offline stores | Dependent item | pd.cluster_status.store_offline[{#SINGLETON}] Preprocessing
|
|
| Tombstone stores | The count of tombstone stores. |
Dependent item | pd.cluster_status.store_tombstone[{#SINGLETON}] Preprocessing
|
| Down stores | The count of down stores. |
Dependent item | pd.cluster_status.store_down[{#SINGLETON}] Preprocessing
|
| Lowspace stores | The count of low space stores. |
Dependent item | pd.cluster_status.store_low_space[{#SINGLETON}] Preprocessing
|
| Unhealth stores | The count of unhealthy stores. |
Dependent item | pd.cluster_status.store_unhealth[{#SINGLETON}] Preprocessing
|
| Disconnect stores | The count of disconnected stores. |
Dependent item | pd.cluster_status.store_disconnected[{#SINGLETON}] Preprocessing
|
| Normal stores | The count of healthy storage instances. |
Dependent item | pd.cluster_status.store_up[{#SINGLETON}] Preprocessing
|
| Storage capacity | The total storage capacity for this TiDB cluster. |
Dependent item | pd.cluster_status.storage_capacity[{#SINGLETON}] Preprocessing
|
| Storage size | The storage size that is currently used by the TiDB cluster. |
Dependent item | pd.cluster_status.storage_size[{#SINGLETON}] Preprocessing
|
| Number of regions | The total count of cluster Regions. |
Dependent item | pd.cluster_status.leader_count[{#SINGLETON}] Preprocessing
|
| Current peer count | The current count of all cluster peers. |
Dependent item | pd.cluster_status.region_count[{#SINGLETON}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB PD: There are offline TiKV nodes | PD has not received a TiKV heartbeat for a long time. |
last(/TiDB PD by HTTP/pd.cluster_status.store_down[{#SINGLETON}])>0 |
Average | |
| TiDB PD: There are low space TiKV nodes | Indicates that there is no sufficient space on the TiKV node. |
last(/TiDB PD by HTTP/pd.cluster_status.store_low_space[{#SINGLETON}])>0 |
Average | |
| TiDB PD: There are disconnected TiKV nodes | PD does not receive a TiKV heartbeat within 20 seconds. Normally a TiKV heartbeat comes in every 10 seconds. |
last(/TiDB PD by HTTP/pd.cluster_status.store_disconnected[{#SINGLETON}])>0 |
Warning | |
| TiDB PD: Current storage usage is too high | Over {$PD.STORAGE_USAGE.MAX.WARN}% of the cluster space is occupied. |
min(/TiDB PD by HTTP/pd.cluster_status.storage_size[{#SINGLETON}],5m)/last(/TiDB PD by HTTP/pd.cluster_status.storage_capacity[{#SINGLETON}])*100>{$PD.STORAGE_USAGE.MAX.WARN} |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region labels discovery | Discovery region labels specific metrics. |
Dependent item | pd.region_labels.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Regions label: {#TYPE} | The number of Regions in different label levels. |
Dependent item | pd.region_labels[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region status discovery | Discovery region status specific metrics. |
Dependent item | pd.region_status.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Regions status: {#TYPE} | The health status of Regions indicated via the count of unusual Regions including pending peers, down peers, extra peers, offline peers, missing peers, learner peers and incorrect namespaces. |
Dependent item | pd.region_status[{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB PD: Too many missed regions | The number of Region replicas is smaller than the value of max-replicas. When a TiKV machine is down and its downtime exceeds max-down-time, it usually leads to missing replicas for some Regions during a period of time. When a TiKV node is made offline, it might result in a small number of Regions with missing replicas. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>{$PD.MISS_REGION.MAX.WARN} |
Warning | |
| TiDB PD: There are unresponsive peers | The number of Regions with an unresponsive peer reported by the Raft leader. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>0 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Running scheduler discovery | Discovery scheduler specific metrics. |
Dependent item | pd.scheduler.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler status: {#KIND} | The current running schedulers. |
Dependent item | pd.scheduler[{#KIND}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| gRPC commands discovery | Discovery grpc commands specific metrics. |
Dependent item | pd.grpc_command.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| gRPC Commands: {#GRPC_METHOD}, rate | The rate per command type at which gRPC commands are completed. |
Dependent item | pd.grpc_command.rate[{#GRPC_METHOD}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region discovery | Discovery region specific metrics. |
Dependent item | pd.region.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get metrics: {#STORE_ADDRESS} | Get region metrics for {#STORE_ADDRESS}. |
Dependent item | pd.region_heartbeat.get_metrics[{#STORE_ADDRESS}] Preprocessing
|
| Region heartbeat: active, rate | The count of heartbeats with the ok status per second. |
Dependent item | pd.region_heartbeat.ok.rate[{#STORE_ADDRESS}] Preprocessing
|
| Region heartbeat: error, rate | The count of heartbeats with the error status per second. |
Dependent item | pd.region_heartbeat.error.rate[{#STORE_ADDRESS}] Preprocessing
|
| Region heartbeat: total, rate | The count of heartbeats reported to PD per instance per second. |
Dependent item | pd.region_heartbeat.rate[{#STORE_ADDRESS}] Preprocessing
|
| Region schedule push: total, rate | Dependent item | pd.region_heartbeat.push.err.rate[{#STORE_ADDRESS}] Preprocessing
|
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
The template to monitor PD server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB PD by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
Zabbix version: 7.0 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with PD server of TiDB cluster. Internal service metrics are collected from PD /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$PD.URL}, {$PD.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$PD.PORT} | The port of PD server metrics web endpoint |
2379 |
| {$PD.URL} | PD server URL |
localhost |
| {$PD.MISS_REGION.MAX.WARN} | Maximum number of missed regions |
100 |
| {$PD.STORAGE_USAGE.MAX.WARN} | Maximum percentage of cluster space used |
80 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get instance metrics | Get TiDB PD instance metrics. |
HTTP agent | pd.get_metrics Preprocessing
|
| Get instance status | Get TiDB PD instance status info. |
HTTP agent | pd.get_status Preprocessing
|
| Status | Status of PD instance. |
Dependent item | pd.status Preprocessing
|
| gRPC Commands total, rate | The rate at which gRPC commands are completed. |
Dependent item | pd.grpc_command.rate Preprocessing
|
| Version | Version of the PD instance. |
Dependent item | pd.version Preprocessing
|
| Uptime | The runtime of each PD instance. |
Dependent item | pd.uptime Preprocessing
|
| Get cluster metrics | Get cluster metrics. |
Dependent item | pd.cluster_status.get_metrics Preprocessing
|
| Get region metrics | Get region metrics. |
Dependent item | pd.regions.get_metrics Preprocessing
|
| Get region label metrics | Get region label metrics. |
Dependent item | pd.region_labels.get_metrics Preprocessing
|
| Get region status metrics | Get region status metrics. |
Dependent item | pd.region_status.get_metrics Preprocessing
|
| Get gRPC command metrics | Get gRPC command metrics. |
Dependent item | pd.grpc_commands.get_metrics Preprocessing
|
| Get scheduler metrics | Get scheduler metrics. |
Dependent item | pd.scheduler.get_metrics Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB PD: Instance is not responding | last(/TiDB PD by HTTP/pd.status)=0 |
Average | ||
| TiDB PD: Version has changed | PD version has changed. Acknowledge to close the problem manually. |
last(/TiDB PD by HTTP/pd.version,#1)<>last(/TiDB PD by HTTP/pd.version,#2) and length(last(/TiDB PD by HTTP/pd.version))>0 |
Info | Manual close: Yes |
| TiDB PD: Instance has been restarted | Uptime is less than 10 minutes. |
last(/TiDB PD by HTTP/pd.uptime)<10m |
Info | Manual close: Yes |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Cluster metrics discovery | Discovery cluster specific metrics. |
Dependent item | pd.cluster.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Offline stores | Dependent item | pd.cluster_status.store_offline[{#SINGLETON}] Preprocessing
|
|
| Tombstone stores | The count of tombstone stores. |
Dependent item | pd.cluster_status.store_tombstone[{#SINGLETON}] Preprocessing
|
| Down stores | The count of down stores. |
Dependent item | pd.cluster_status.store_down[{#SINGLETON}] Preprocessing
|
| Lowspace stores | The count of low space stores. |
Dependent item | pd.cluster_status.store_low_space[{#SINGLETON}] Preprocessing
|
| Unhealth stores | The count of unhealthy stores. |
Dependent item | pd.cluster_status.store_unhealth[{#SINGLETON}] Preprocessing
|
| Disconnect stores | The count of disconnected stores. |
Dependent item | pd.cluster_status.store_disconnected[{#SINGLETON}] Preprocessing
|
| Normal stores | The count of healthy storage instances. |
Dependent item | pd.cluster_status.store_up[{#SINGLETON}] Preprocessing
|
| Storage capacity | The total storage capacity for this TiDB cluster. |
Dependent item | pd.cluster_status.storage_capacity[{#SINGLETON}] Preprocessing
|
| Storage size | The storage size that is currently used by the TiDB cluster. |
Dependent item | pd.cluster_status.storage_size[{#SINGLETON}] Preprocessing
|
| Number of regions | The total count of cluster Regions. |
Dependent item | pd.cluster_status.leader_count[{#SINGLETON}] Preprocessing
|
| Current peer count | The current count of all cluster peers. |
Dependent item | pd.cluster_status.region_count[{#SINGLETON}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB PD: There are offline TiKV nodes | PD has not received a TiKV heartbeat for a long time. |
last(/TiDB PD by HTTP/pd.cluster_status.store_down[{#SINGLETON}])>0 |
Average | |
| TiDB PD: There are low space TiKV nodes | Indicates that there is no sufficient space on the TiKV node. |
last(/TiDB PD by HTTP/pd.cluster_status.store_low_space[{#SINGLETON}])>0 |
Average | |
| TiDB PD: There are disconnected TiKV nodes | PD does not receive a TiKV heartbeat within 20 seconds. Normally a TiKV heartbeat comes in every 10 seconds. |
last(/TiDB PD by HTTP/pd.cluster_status.store_disconnected[{#SINGLETON}])>0 |
Warning | |
| TiDB PD: Current storage usage is too high | Over {$PD.STORAGE_USAGE.MAX.WARN}% of the cluster space is occupied. |
min(/TiDB PD by HTTP/pd.cluster_status.storage_size[{#SINGLETON}],5m)/last(/TiDB PD by HTTP/pd.cluster_status.storage_capacity[{#SINGLETON}])*100>{$PD.STORAGE_USAGE.MAX.WARN} |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region labels discovery | Discovery region labels specific metrics. |
Dependent item | pd.region_labels.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Regions label: {#TYPE} | The number of Regions in different label levels. |
Dependent item | pd.region_labels[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region status discovery | Discovery region status specific metrics. |
Dependent item | pd.region_status.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Regions status: {#TYPE} | The health status of Regions indicated via the count of unusual Regions including pending peers, down peers, extra peers, offline peers, missing peers, learner peers and incorrect namespaces. |
Dependent item | pd.region_status[{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB PD: Too many missed regions | The number of Region replicas is smaller than the value of max-replicas. When a TiKV machine is down and its downtime exceeds max-down-time, it usually leads to missing replicas for some Regions during a period of time. When a TiKV node is made offline, it might result in a small number of Regions with missing replicas. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>{$PD.MISS_REGION.MAX.WARN} |
Warning | |
| TiDB PD: There are unresponsive peers | The number of Regions with an unresponsive peer reported by the Raft leader. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>0 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Running scheduler discovery | Discovery scheduler specific metrics. |
Dependent item | pd.scheduler.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Scheduler status: {#KIND} | The current running schedulers. |
Dependent item | pd.scheduler[{#KIND}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| gRPC commands discovery | Discovery grpc commands specific metrics. |
Dependent item | pd.grpc_command.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| gRPC Commands: {#GRPC_METHOD}, rate | The rate per command type at which gRPC commands are completed. |
Dependent item | pd.grpc_command.rate[{#GRPC_METHOD}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region discovery | Discovery region specific metrics. |
Dependent item | pd.region.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get metrics: {#STORE_ADDRESS} | Get region metrics for {#STORE_ADDRESS}. |
Dependent item | pd.region_heartbeat.get_metrics[{#STORE_ADDRESS}] Preprocessing
|
| Region heartbeat: active, rate | The count of heartbeats with the ok status per second. |
Dependent item | pd.region_heartbeat.ok.rate[{#STORE_ADDRESS}] Preprocessing
|
| Region heartbeat: error, rate | The count of heartbeats with the error status per second. |
Dependent item | pd.region_heartbeat.error.rate[{#STORE_ADDRESS}] Preprocessing
|
| Region heartbeat: total, rate | The count of heartbeats reported to PD per instance per second. |
Dependent item | pd.region_heartbeat.rate[{#STORE_ADDRESS}] Preprocessing
|
| Region schedule push: total, rate | Dependent item | pd.region_heartbeat.push.err.rate[{#STORE_ADDRESS}] Preprocessing
|
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
The template to monitor PD server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB PD by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
Zabbix version: 6.4 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with PD server of TiDB cluster. Internal service metrics are collected from PD /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$PD.URL}, {$PD.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$PD.PORT} | The port of PD server metrics web endpoint |
2379 |
| {$PD.URL} | PD server URL |
localhost |
| {$PD.MISS_REGION.MAX.WARN} | Maximum number of missed regions |
100 |
| {$PD.STORAGE_USAGE.MAX.WARN} | Maximum percentage of cluster space used |
80 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| PD: Get instance metrics | Get TiDB PD instance metrics. |
HTTP agent | pd.get_metrics Preprocessing
|
| PD: Get instance status | Get TiDB PD instance status info. |
HTTP agent | pd.get_status Preprocessing
|
| PD: Status | Status of PD instance. |
Dependent item | pd.status Preprocessing
|
| PD: gRPC Commands total, rate | The rate at which gRPC commands are completed. |
Dependent item | pd.grpc_command.rate Preprocessing
|
| PD: Version | Version of the PD instance. |
Dependent item | pd.version Preprocessing
|
| PD: Uptime | The runtime of each PD instance. |
Dependent item | pd.uptime Preprocessing
|
| PD: Get cluster metrics | Get cluster metrics. |
Dependent item | pd.cluster_status.get_metrics Preprocessing
|
| PD: Get region metrics | Get region metrics. |
Dependent item | pd.regions.get_metrics Preprocessing
|
| PD: Get region label metrics | Get region label metrics. |
Dependent item | pd.region_labels.get_metrics Preprocessing
|
| PD: Get region status metrics | Get region status metrics. |
Dependent item | pd.region_status.get_metrics Preprocessing
|
| PD: Get gRPC command metrics | Get gRPC command metrics. |
Dependent item | pd.grpc_commands.get_metrics Preprocessing
|
| PD: Get scheduler metrics | Get scheduler metrics. |
Dependent item | pd.scheduler.get_metrics Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| PD: Instance is not responding | last(/TiDB PD by HTTP/pd.status)=0 |
Average | ||
| PD: Version has changed | PD version has changed. Acknowledge to close the problem manually. |
last(/TiDB PD by HTTP/pd.version,#1)<>last(/TiDB PD by HTTP/pd.version,#2) and length(last(/TiDB PD by HTTP/pd.version))>0 |
Info | Manual close: Yes |
| PD: has been restarted | Uptime is less than 10 minutes. |
last(/TiDB PD by HTTP/pd.uptime)<10m |
Info | Manual close: Yes |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Cluster metrics discovery | Discovery cluster specific metrics. |
Dependent item | pd.cluster.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB cluster: Offline stores | Dependent item | pd.cluster_status.store_offline[{#SINGLETON}] Preprocessing
|
|
| TiDB cluster: Tombstone stores | The count of tombstone stores. |
Dependent item | pd.cluster_status.store_tombstone[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Down stores | The count of down stores. |
Dependent item | pd.cluster_status.store_down[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Lowspace stores | The count of low space stores. |
Dependent item | pd.cluster_status.store_low_space[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Unhealth stores | The count of unhealthy stores. |
Dependent item | pd.cluster_status.store_unhealth[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Disconnect stores | The count of disconnected stores. |
Dependent item | pd.cluster_status.store_disconnected[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Normal stores | The count of healthy storage instances. |
Dependent item | pd.cluster_status.store_up[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Storage capacity | The total storage capacity for this TiDB cluster. |
Dependent item | pd.cluster_status.storage_capacity[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Storage size | The storage size that is currently used by the TiDB cluster. |
Dependent item | pd.cluster_status.storage_size[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Number of regions | The total count of cluster Regions. |
Dependent item | pd.cluster_status.leader_count[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Current peer count | The current count of all cluster peers. |
Dependent item | pd.cluster_status.region_count[{#SINGLETON}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB cluster: There are offline TiKV nodes | PD has not received a TiKV heartbeat for a long time. |
last(/TiDB PD by HTTP/pd.cluster_status.store_down[{#SINGLETON}])>0 |
Average | |
| TiDB cluster: There are low space TiKV nodes | Indicates that there is no sufficient space on the TiKV node. |
last(/TiDB PD by HTTP/pd.cluster_status.store_low_space[{#SINGLETON}])>0 |
Average | |
| TiDB cluster: There are disconnected TiKV nodes | PD does not receive a TiKV heartbeat within 20 seconds. Normally a TiKV heartbeat comes in every 10 seconds. |
last(/TiDB PD by HTTP/pd.cluster_status.store_disconnected[{#SINGLETON}])>0 |
Warning | |
| TiDB cluster: Current storage usage is too high | Over {$PD.STORAGE_USAGE.MAX.WARN}% of the cluster space is occupied. |
min(/TiDB PD by HTTP/pd.cluster_status.storage_size[{#SINGLETON}],5m)/last(/TiDB PD by HTTP/pd.cluster_status.storage_capacity[{#SINGLETON}])*100>{$PD.STORAGE_USAGE.MAX.WARN} |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region labels discovery | Discovery region labels specific metrics. |
Dependent item | pd.region_labels.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB cluster: Regions label: {#TYPE} | The number of Regions in different label levels. |
Dependent item | pd.region_labels[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region status discovery | Discovery region status specific metrics. |
Dependent item | pd.region_status.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB cluster: Regions status: {#TYPE} | The health status of Regions indicated via the count of unusual Regions including pending peers, down peers, extra peers, offline peers, missing peers, learner peers and incorrect namespaces. |
Dependent item | pd.region_status[{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB cluster: Too many missed regions | The number of Region replicas is smaller than the value of max-replicas. When a TiKV machine is down and its downtime exceeds max-down-time, it usually leads to missing replicas for some Regions during a period of time. When a TiKV node is made offline, it might result in a small number of Regions with missing replicas. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>{$PD.MISS_REGION.MAX.WARN} |
Warning | |
| TiDB cluster: There are unresponsive peers | The number of Regions with an unresponsive peer reported by the Raft leader. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>0 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Running scheduler discovery | Discovery scheduler specific metrics. |
Dependent item | pd.scheduler.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB cluster: Scheduler status: {#KIND} | The current running schedulers. |
Dependent item | pd.scheduler[{#KIND}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| gRPC commands discovery | Discovery grpc commands specific metrics. |
Dependent item | pd.grpc_command.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| PD: gRPC Commands: {#GRPC_METHOD}, rate | The rate per command type at which gRPC commands are completed. |
Dependent item | pd.grpc_command.rate[{#GRPC_METHOD}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region discovery | Discovery region specific metrics. |
Dependent item | pd.region.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| PD: Get metrics: {#STORE_ADDRESS} | Get region metrics for {#STORE_ADDRESS}. |
Dependent item | pd.region_heartbeat.get_metrics[{#STORE_ADDRESS}] Preprocessing
|
| PD: Region heartbeat: active, rate | The count of heartbeats with the ok status per second. |
Dependent item | pd.region_heartbeat.ok.rate[{#STORE_ADDRESS}] Preprocessing
|
| PD: Region heartbeat: error, rate | The count of heartbeats with the error status per second. |
Dependent item | pd.region_heartbeat.error.rate[{#STORE_ADDRESS}] Preprocessing
|
| PD: Region heartbeat: total, rate | The count of heartbeats reported to PD per instance per second. |
Dependent item | pd.region_heartbeat.rate[{#STORE_ADDRESS}] Preprocessing
|
| PD: Region schedule push: total, rate | Dependent item | pd.region_heartbeat.push.err.rate[{#STORE_ADDRESS}] Preprocessing
|
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
For Zabbix version: 6.2 and higher
The template to monitor PD server of TiDB cluster by Zabbix that works without any external scripts.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB PD by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
This template was tested on:
See Zabbix template operation for basic instructions.
This template works with PD server of TiDB cluster. Internal service metrics are collected from PD /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$PD.URL}, {$PD.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
No specific Zabbix configuration is required.
| Name | Description | Default |
|---|---|---|
| {$PD.MISS_REGION.MAX.WARN} | Maximum number of missed regions |
100 |
| {$PD.PORT} | The port of PD server metrics web endpoint |
2379 |
| {$PD.STORAGE_USAGE.MAX.WARN} | Maximum percentage of cluster space used |
80 |
| {$PD.URL} | PD server URL |
localhost |
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Cluster metrics discovery | Discovery cluster specific metrics. |
DEPENDENT | pd.cluster.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| gRPC commands discovery | Discovery grpc commands specific metrics. |
DEPENDENT | pd.grpc_command.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Region discovery | Discovery region specific metrics. |
DEPENDENT | pd.region.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Region labels discovery | Discovery region labels specific metrics. |
DEPENDENT | pd.region_labels.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Region status discovery | Discovery region status specific metrics. |
DEPENDENT | pd.region_status.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: Overrides: Too many missed regions trigger Unresponsive peers trigger |
| Running scheduler discovery | Discovery scheduler specific metrics. |
DEPENDENT | pd.scheduler.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| PD instance | PD: Status | Status of PD instance. |
DEPENDENT | pd.status Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| PD instance | PD: GRPC Commands total, rate | The rate at which gRPC commands are completed. |
DEPENDENT | pd.grpc_command.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| PD instance | PD: Version | Version of the PD instance. |
DEPENDENT | pd.version Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| PD instance | PD: Uptime | The runtime of each PD instance. |
DEPENDENT | pd.uptime Preprocessing: - JSONPATH: - JAVASCRIPT: |
| PD instance | PD: GRPC Commands: {#GRPC_METHOD}, rate | The rate per command type at which gRPC commands are completed. |
DEPENDENT | pd.grpc_command.rate[{#GRPC_METHOD}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB cluster | TiDB cluster: Offline stores | - |
DEPENDENT | pd.cluster_status.store_offline[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Tombstone stores | The count of tombstone stores. |
DEPENDENT | pd.cluster_status.store_tombstone[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Down stores | The count of down stores. |
DEPENDENT | pd.cluster_status.store_down[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Lowspace stores | The count of low space stores. |
DEPENDENT | pd.cluster_status.store_low_space[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Unhealth stores | The count of unhealthy stores. |
DEPENDENT | pd.cluster_status.store_unhealth[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Disconnect stores | The count of disconnected stores. |
DEPENDENT | pd.cluster_status.store_disconnected[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Normal stores | The count of healthy storage instances. |
DEPENDENT | pd.cluster_status.store_up[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Storage capacity | The total storage capacity for this TiDB cluster. |
DEPENDENT | pd.cluster_status.storage_capacity[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Storage size | The storage size that is currently used by the TiDB cluster. |
DEPENDENT | pd.cluster_status.storage_size[{#SINGLETON}] Preprocessing: - JSONPATH: |
| TiDB cluster | TiDB cluster: Number of regions | The total count of cluster Regions. |
DEPENDENT | pd.cluster_status.leader_count[{#SINGLETON}] Preprocessing: - JSONPATH: |
| TiDB cluster | TiDB cluster: Current peer count | The current count of all cluster peers. |
DEPENDENT | pd.cluster_status.region_count[{#SINGLETON}] Preprocessing: - JSONPATH: |
| TiDB cluster | TiDB cluster: Regions label: {#TYPE} | The number of Regions in different label levels. |
DEPENDENT | pd.region_labels[{#TYPE}] Preprocessing: - JSONPATH: |
| TiDB cluster | TiDB cluster: Regions status: {#TYPE} | The health status of Regions indicated via the count of unusual Regions including pending peers, down peers, extra peers, offline peers, missing peers, learner peers and incorrect namespaces. |
DEPENDENT | pd.region_status[{#TYPE}] Preprocessing: - JSONPATH: |
| TiDB cluster | TiDB cluster: Scheduler status: {#KIND} | The current running schedulers. |
DEPENDENT | pd.scheduler[{#KIND}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| TiDB cluster | PD: Region heartbeat: active, rate | The count of heartbeats with the ok status per second. |
DEPENDENT | pd.region_heartbeat.ok.rate[{#STORE_ADDRESS}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB cluster | PD: Region heartbeat: error, rate | The count of heartbeats with the error status per second. |
DEPENDENT | pd.region_heartbeat.error.rate[{#STORE_ADDRESS}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB cluster | PD: Region heartbeat: total, rate | The count of heartbeats reported to PD per instance per second. |
DEPENDENT | pd.region_heartbeat.rate[{#STORE_ADDRESS}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB cluster | PD: Region schedule push: total, rate | - |
DEPENDENT | pd.region_heartbeat.push.err.rate[{#STORE_ADDRESS}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| Zabbix raw items | PD: Get instance metrics | Get TiDB PD instance metrics. |
HTTP_AGENT | pd.get_metrics Preprocessing: - CHECK_NOT_SUPPORTED ⛔️ON_FAIL: - PROMETHEUS_TO_JSON |
| Zabbix raw items | PD: Get instance status | Get TiDB PD instance status info. |
HTTP_AGENT | pd.get_status Preprocessing: - CHECK_NOT_SUPPORTED ⛔️ON_FAIL: |
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| PD: Instance is not responding | - |
last(/TiDB PD by HTTP/pd.status)=0 |
AVERAGE | |
| PD: Version has changed | PD version has changed. Ack to close. |
last(/TiDB PD by HTTP/pd.version,#1)<>last(/TiDB PD by HTTP/pd.version,#2) and length(last(/TiDB PD by HTTP/pd.version))>0 |
INFO | Manual close: YES |
| PD: has been restarted | Uptime is less than 10 minutes. |
last(/TiDB PD by HTTP/pd.uptime)<10m |
INFO | Manual close: YES |
| TiDB cluster: There are offline TiKV nodes | PD has not received a TiKV heartbeat for a long time. |
last(/TiDB PD by HTTP/pd.cluster_status.store_down[{#SINGLETON}])>0 |
AVERAGE | |
| TiDB cluster: There are low space TiKV nodes | Indicates that there is no sufficient space on the TiKV node. |
last(/TiDB PD by HTTP/pd.cluster_status.store_low_space[{#SINGLETON}])>0 |
AVERAGE | |
| TiDB cluster: There are disconnected TiKV nodes | PD does not receive a TiKV heartbeat within 20 seconds. Normally a TiKV heartbeat comes in every 10 seconds. |
last(/TiDB PD by HTTP/pd.cluster_status.store_disconnected[{#SINGLETON}])>0 |
WARNING | |
| TiDB cluster: Current storage usage is too high | Over {$PD.STORAGE_USAGE.MAX.WARN}% of the cluster space is occupied. |
min(/TiDB PD by HTTP/pd.cluster_status.storage_size[{#SINGLETON}],5m)/last(/TiDB PD by HTTP/pd.cluster_status.storage_capacity[{#SINGLETON}])*100>{$PD.STORAGE_USAGE.MAX.WARN} |
WARNING | |
| TiDB cluster: Too many missed regions | The number of Region replicas is smaller than the value of max-replicas. When a TiKV machine is down and its downtime exceeds max-down-time, it usually leads to missing replicas for some Regions during a period of time. When a TiKV node is made offline, it might result in a small number of Regions with missing replicas. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>{$PD.MISS_REGION.MAX.WARN} |
WARNING | |
| TiDB cluster: There are unresponsive peers | The number of Regions with an unresponsive peer reported by the Raft leader. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>0 |
WARNING |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template or ask for help with it at ZABBIX forums.
The template to monitor PD server of TiDB cluster by Zabbix that works without any external scripts. Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB PD by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
Zabbix version: 6.0 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
This template works with PD server of TiDB cluster. Internal service metrics are collected from PD /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$PD.URL}, {$PD.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
| Name | Description | Default |
|---|---|---|
| {$PD.PORT} | The port of PD server metrics web endpoint |
2379 |
| {$PD.URL} | PD server URL |
localhost |
| {$PD.MISS_REGION.MAX.WARN} | Maximum number of missed regions |
100 |
| {$PD.STORAGE_USAGE.MAX.WARN} | Maximum percentage of cluster space used |
80 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| PD: Get instance metrics | Get TiDB PD instance metrics. |
HTTP agent | pd.get_metrics Preprocessing
|
| PD: Get instance status | Get TiDB PD instance status info. |
HTTP agent | pd.get_status Preprocessing
|
| PD: Status | Status of PD instance. |
Dependent item | pd.status Preprocessing
|
| PD: gRPC Commands total, rate | The rate at which gRPC commands are completed. |
Dependent item | pd.grpc_command.rate Preprocessing
|
| PD: Version | Version of the PD instance. |
Dependent item | pd.version Preprocessing
|
| PD: Uptime | The runtime of each PD instance. |
Dependent item | pd.uptime Preprocessing
|
| PD: Get cluster metrics | Get cluster metrics. |
Dependent item | pd.cluster_status.get_metrics Preprocessing
|
| PD: Get region metrics | Get region metrics. |
Dependent item | pd.regions.get_metrics Preprocessing
|
| PD: Get region label metrics | Get region label metrics. |
Dependent item | pd.region_labels.get_metrics Preprocessing
|
| PD: Get region status metrics | Get region status metrics. |
Dependent item | pd.region_status.get_metrics Preprocessing
|
| PD: Get gRPC command metrics | Get gRPC command metrics. |
Dependent item | pd.grpc_commands.get_metrics Preprocessing
|
| PD: Get scheduler metrics | Get scheduler metrics. |
Dependent item | pd.scheduler.get_metrics Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| PD: Instance is not responding | last(/TiDB PD by HTTP/pd.status)=0 |
Average | ||
| PD: Version has changed | PD version has changed. Acknowledge to close the problem manually. |
last(/TiDB PD by HTTP/pd.version,#1)<>last(/TiDB PD by HTTP/pd.version,#2) and length(last(/TiDB PD by HTTP/pd.version))>0 |
Info | Manual close: Yes |
| PD: has been restarted | Uptime is less than 10 minutes. |
last(/TiDB PD by HTTP/pd.uptime)<10m |
Info | Manual close: Yes |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Cluster metrics discovery | Discovery cluster specific metrics. |
Dependent item | pd.cluster.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB cluster: Offline stores | Dependent item | pd.cluster_status.store_offline[{#SINGLETON}] Preprocessing
|
|
| TiDB cluster: Tombstone stores | The count of tombstone stores. |
Dependent item | pd.cluster_status.store_tombstone[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Down stores | The count of down stores. |
Dependent item | pd.cluster_status.store_down[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Lowspace stores | The count of low space stores. |
Dependent item | pd.cluster_status.store_low_space[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Unhealth stores | The count of unhealthy stores. |
Dependent item | pd.cluster_status.store_unhealth[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Disconnect stores | The count of disconnected stores. |
Dependent item | pd.cluster_status.store_disconnected[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Normal stores | The count of healthy storage instances. |
Dependent item | pd.cluster_status.store_up[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Storage capacity | The total storage capacity for this TiDB cluster. |
Dependent item | pd.cluster_status.storage_capacity[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Storage size | The storage size that is currently used by the TiDB cluster. |
Dependent item | pd.cluster_status.storage_size[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Number of regions | The total count of cluster Regions. |
Dependent item | pd.cluster_status.leader_count[{#SINGLETON}] Preprocessing
|
| TiDB cluster: Current peer count | The current count of all cluster peers. |
Dependent item | pd.cluster_status.region_count[{#SINGLETON}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB cluster: There are offline TiKV nodes | PD has not received a TiKV heartbeat for a long time. |
last(/TiDB PD by HTTP/pd.cluster_status.store_down[{#SINGLETON}])>0 |
Average | |
| TiDB cluster: There are low space TiKV nodes | Indicates that there is no sufficient space on the TiKV node. |
last(/TiDB PD by HTTP/pd.cluster_status.store_low_space[{#SINGLETON}])>0 |
Average | |
| TiDB cluster: There are disconnected TiKV nodes | PD does not receive a TiKV heartbeat within 20 seconds. Normally a TiKV heartbeat comes in every 10 seconds. |
last(/TiDB PD by HTTP/pd.cluster_status.store_disconnected[{#SINGLETON}])>0 |
Warning | |
| TiDB cluster: Current storage usage is too high | Over {$PD.STORAGE_USAGE.MAX.WARN}% of the cluster space is occupied. |
min(/TiDB PD by HTTP/pd.cluster_status.storage_size[{#SINGLETON}],5m)/last(/TiDB PD by HTTP/pd.cluster_status.storage_capacity[{#SINGLETON}])*100>{$PD.STORAGE_USAGE.MAX.WARN} |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region labels discovery | Discovery region labels specific metrics. |
Dependent item | pd.region_labels.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB cluster: Regions label: {#TYPE} | The number of Regions in different label levels. |
Dependent item | pd.region_labels[{#TYPE}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region status discovery | Discovery region status specific metrics. |
Dependent item | pd.region_status.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB cluster: Regions status: {#TYPE} | The health status of Regions indicated via the count of unusual Regions including pending peers, down peers, extra peers, offline peers, missing peers, learner peers and incorrect namespaces. |
Dependent item | pd.region_status[{#TYPE}] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| TiDB cluster: Too many missed regions | The number of Region replicas is smaller than the value of max-replicas. When a TiKV machine is down and its downtime exceeds max-down-time, it usually leads to missing replicas for some Regions during a period of time. When a TiKV node is made offline, it might result in a small number of Regions with missing replicas. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>{$PD.MISS_REGION.MAX.WARN} |
Warning | |
| TiDB cluster: There are unresponsive peers | The number of Regions with an unresponsive peer reported by the Raft leader. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>0 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Running scheduler discovery | Discovery scheduler specific metrics. |
Dependent item | pd.scheduler.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| TiDB cluster: Scheduler status: {#KIND} | The current running schedulers. |
Dependent item | pd.scheduler[{#KIND}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| gRPC commands discovery | Discovery grpc commands specific metrics. |
Dependent item | pd.grpc_command.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| PD: gRPC Commands: {#GRPC_METHOD}, rate | The rate per command type at which gRPC commands are completed. |
Dependent item | pd.grpc_command.rate[{#GRPC_METHOD}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Region discovery | Discovery region specific metrics. |
Dependent item | pd.region.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| PD: Get metrics: {#STORE_ADDRESS} | Get region metrics for {#STORE_ADDRESS}. |
Dependent item | pd.region_heartbeat.get_metrics[{#STORE_ADDRESS}] Preprocessing
|
| PD: Region heartbeat: active, rate | The count of heartbeats with the ok status per second. |
Dependent item | pd.region_heartbeat.ok.rate[{#STORE_ADDRESS}] Preprocessing
|
| PD: Region heartbeat: error, rate | The count of heartbeats with the error status per second. |
Dependent item | pd.region_heartbeat.error.rate[{#STORE_ADDRESS}] Preprocessing
|
| PD: Region heartbeat: total, rate | The count of heartbeats reported to PD per instance per second. |
Dependent item | pd.region_heartbeat.rate[{#STORE_ADDRESS}] Preprocessing
|
| PD: Region schedule push: total, rate | Dependent item | pd.region_heartbeat.push.err.rate[{#STORE_ADDRESS}] Preprocessing
|
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
For Zabbix version: 5.4 and higher
The template to monitor PD server of TiDB cluster by Zabbix that works without any external scripts.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
Template TiDB PD by HTTP — collects metrics by HTTP agent from PD /metrics endpoint and from monitoring API.
See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api.
This template was tested on:
See Zabbix template operation for basic instructions.
This template works with PD server of TiDB cluster. Internal service metrics are collected from PD /metrics endpoint and from monitoring API. See https://docs.pingcap.com/tidb/stable/tidb-monitoring-api. Don't forget to change the macros {$PD.URL}, {$PD.PORT}. Also, see the Macros section for a list of macros used to set trigger values.
No specific Zabbix configuration is required.
| Name | Description | Default |
|---|---|---|
| {$PD.MISS_REGION.MAX.WARN} | Maximum number of missed regions |
100 |
| {$PD.PORT} | The port of PD server metrics web endpoint |
2379 |
| {$PD.STORAGE_USAGE.MAX.WARN} | Maximum percentage of cluster space used |
80 |
| {$PD.URL} | PD server URL |
localhost |
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Cluster metrics discovery | Discovery cluster specific metrics. |
DEPENDENT | pd.cluster.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Region labels discovery | Discovery region labels specific metrics. |
DEPENDENT | pd.region_labels.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Region status discovery | Discovery region status specific metrics. |
DEPENDENT | pd.region_status.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: Overrides: Too many missed regions trigger Unresponsive peers trigger |
| Running scheduler discovery | Discovery scheduler specific metrics. |
DEPENDENT | pd.scheduler.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| gRPC commands discovery | Discovery grpc commands specific metrics. |
DEPENDENT | pd.grpc_command.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Region discovery | Discovery region specific metrics. |
DEPENDENT | pd.region.discovery Preprocessing: - JSONPATH: - JAVASCRIPT: - DISCARD_UNCHANGED_HEARTBEAT: |
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| PD instance | PD: Status | Status of PD instance. |
DEPENDENT | pd.status Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| PD instance | PD: GRPC Commands total, rate | The rate at which gRPC commands are completed. |
DEPENDENT | pd.grpc_command.rate Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| PD instance | PD: Version | Version of the PD instance. |
DEPENDENT | pd.version Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| PD instance | PD: Uptime | The runtime of each PD instance. |
DEPENDENT | pd.uptime Preprocessing: - JSONPATH: - JAVASCRIPT: |
| PD instance | PD: GRPC Commands: {#GRPC_METHOD}, rate | The rate per command type at which gRPC commands are completed. |
DEPENDENT | pd.grpc_command.rate[{#GRPC_METHOD}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| TiDB cluster | TiDB cluster: Offline stores | - |
DEPENDENT | pd.cluster_status.store_offline[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Tombstone stores | The count of tombstone stores. |
DEPENDENT | pd.cluster_status.store_tombstone[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Down stores | The count of down stores. |
DEPENDENT | pd.cluster_status.store_down[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Lowspace stores | The count of low space stores. |
DEPENDENT | pd.cluster_status.store_low_space[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Unhealth stores | The count of unhealthy stores. |
DEPENDENT | pd.cluster_status.store_unhealth[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Disconnect stores | The count of disconnected stores. |
DEPENDENT | pd.cluster_status.store_disconnected[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Normal stores | The count of healthy storage instances. |
DEPENDENT | pd.cluster_status.store_up[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Storage capacity | The total storage capacity for this TiDB cluster. |
DEPENDENT | pd.cluster_status.storage_capacity[{#SINGLETON}] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| TiDB cluster | TiDB cluster: Storage size | The storage size that is currently used by the TiDB cluster. |
DEPENDENT | pd.cluster_status.storage_size[{#SINGLETON}] Preprocessing: - JSONPATH: |
| TiDB cluster | TiDB cluster: Number of regions | The total count of cluster Regions. |
DEPENDENT | pd.cluster_status.leader_count[{#SINGLETON}] Preprocessing: - JSONPATH: |
| TiDB cluster | TiDB cluster: Current peer count | The current count of all cluster peers. |
DEPENDENT | pd.cluster_status.region_count[{#SINGLETON}] Preprocessing: - JSONPATH: |
| TiDB cluster | TiDB cluster: Regions label: {#TYPE} | The number of Regions in different label levels. |
DEPENDENT | pd.region_labels[{#TYPE}] Preprocessing: - JSONPATH: |
| TiDB cluster | TiDB cluster: Regions status: {#TYPE} | The health status of Regions indicated via the count of unusual Regions including pending peers, down peers, extra peers, offline peers, missing peers, learner peers and incorrect namespaces. |
DEPENDENT | pd.region_status[{#TYPE}] Preprocessing: - JSONPATH: |
| TiDB cluster | TiDB cluster: Scheduler status: {#KIND} | The current running schedulers. |
DEPENDENT | pd.scheduler[{#KIND}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| TiDB cluster | PD: Region heartbeat: active, rate | The count of heartbeats with the ok status per second. |
DEPENDENT | pd.region_heartbeat.ok.rate[{#STORE_ADDRESS}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB cluster | PD: Region heartbeat: error, rate | The count of heartbeats with the error status per second. |
DEPENDENT | pd.region_heartbeat.error.rate[{#STORE_ADDRESS}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB cluster | PD: Region heartbeat: total, rate | The count of heartbeats reported to PD per instance per second. |
DEPENDENT | pd.region_heartbeat.rate[{#STORE_ADDRESS}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| TiDB cluster | PD: Region schedule push: total, rate | - |
DEPENDENT | pd.region_heartbeat.push.err.rate[{#STORE_ADDRESS}] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - CHANGE_PER_SECOND |
| Zabbix_raw_items | PD: Get instance metrics | Get TiDB PD instance metrics. |
HTTP_AGENT | pd.get_metrics Preprocessing: - CHECK_NOT_SUPPORTED ⛔️ON_FAIL: - PROMETHEUS_TO_JSON |
| Zabbix_raw_items | PD: Get instance status | Get TiDB PD instance status info. |
HTTP_AGENT | pd.get_status Preprocessing: - CHECK_NOT_SUPPORTED ⛔️ON_FAIL: |
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| PD: Instance is not responding | - |
last(/TiDB PD by HTTP/pd.status)=0 |
AVERAGE | |
| PD: Version has changed (new version: {ITEM.VALUE}) | PD version has changed. Ack to close. |
last(/TiDB PD by HTTP/pd.version,#1)<>last(/TiDB PD by HTTP/pd.version,#2) and length(last(/TiDB PD by HTTP/pd.version))>0 |
INFO | Manual close: YES |
| PD: has been restarted (uptime < 10m) | Uptime is less than 10 minutes |
last(/TiDB PD by HTTP/pd.uptime)<10m |
INFO | Manual close: YES |
| TiDB cluster: There are offline TiKV nodes | PD has not received a TiKV heartbeat for a long time. |
last(/TiDB PD by HTTP/pd.cluster_status.store_down[{#SINGLETON}])>0 |
AVERAGE | |
| TiDB cluster: There are low space TiKV nodes | Indicates that there is no sufficient space on the TiKV node. |
last(/TiDB PD by HTTP/pd.cluster_status.store_low_space[{#SINGLETON}])>0 |
AVERAGE | |
| TiDB cluster: There are disconnected TiKV nodes | PD does not receive a TiKV heartbeat within 20 seconds. Normally a TiKV heartbeat comes in every 10 seconds. |
last(/TiDB PD by HTTP/pd.cluster_status.store_disconnected[{#SINGLETON}])>0 |
WARNING | |
| TiDB cluster: Current storage usage is too high (over {$PD.STORAGE_USAGE.MAX.WARN}% for 5m) | Over {$PD.STORAGE_USAGE.MAX.WARN}% of the cluster space is occupied. |
min(/TiDB PD by HTTP/pd.cluster_status.storage_size[{#SINGLETON}],5m)/last(/TiDB PD by HTTP/pd.cluster_status.storage_capacity[{#SINGLETON}])*100>{$PD.STORAGE_USAGE.MAX.WARN} |
WARNING | |
| TiDB cluster: Too many missed regions (over {$PD.MISS_REGION.MAX.WARN} in 5m) | The number of Region replicas is smaller than the value of max-replicas. When a TiKV machine is down and its downtime exceeds max-down-time, it usually leads to missing replicas for some Regions during a period of time. When a TiKV node is made offline, it might result in a small number of Regions with missing replicas. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>{$PD.MISS_REGION.MAX.WARN} |
WARNING | |
| TiDB cluster: There are unresponsive peers | The number of Regions with an unresponsive peer reported by the Raft leader. |
min(/TiDB PD by HTTP/pd.region_status[{#TYPE}],5m)>0 |
WARNING |
Please report any issues with the template at https://support.zabbix.com
You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.