Percona

Percona is an American company based in Durham and the developer of a number of open source software projects for MySQL, MariaDB, PostgreSQL, MongoDB and RocksDB users.

Available solutions

Zabbix version 8.0
Download

Percona by Zabbix agent

Overview

This template is designed for the effortless deployment of Percona monitoring by Zabbix via Zabbix agent and doesn't require any external scripts.

Requirements

Zabbix version: 8.0 and higher.

Tested versions

This template has been tested on:

  • Percona 8.0, 8.4, 8.4.7-7

Configuration

Zabbix should be configured according to the instructions in the Templates out of the box section.

Setup

  1. Install Zabbix agent and MySQL client. If necessary, add the path to the mysql and mysqladmin utilities to the global environment variable PATH.
  2. Copy the template_db_percona.conf file with user parameters into folder with Zabbix agent configuration (/etc/zabbix/zabbix_agentd.d/ by default). Don't forget to restart Zabbix agent.
  3. Create the Percona user that will be used for monitoring (<password> at your discretion). For example:
CREATE USER 'zbx_monitor'@'%' IDENTIFIED BY '<password>';
GRANT REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON *.* TO 'zbx_monitor'@'%';

For more information, please see MySQL documentation.

  1. Create .my.cnf configuration file in the home directory of Zabbix agent for Linux distributions (/var/lib/zabbix by default) or my.cnf in c:\ for Windows. For example:
[client]
protocol=tcp
user='zbx_monitor'
password='<password>'

For more information, please see MySQL documentation.

NOTE: Linux distributions that use SELinux may require additional steps for access configuration.

For example, the following rule could be added to the SELinux policy:

# cat <<EOF > zabbix_home.te
module zabbix_home 1.0;

require {
        type zabbix_agent_t;
        type zabbix_var_lib_t;
        type mysqld_etc_t;
        type mysqld_port_t;
        type mysqld_var_run_t;
        class file { open read };
        class tcp_socket name_connect;
        class sock_file write;
}

#============= zabbix_agent_t ==============

allow zabbix_agent_t zabbix_var_lib_t:file read;
allow zabbix_agent_t zabbix_var_lib_t:file open;
allow zabbix_agent_t mysqld_etc_t:file read;
allow zabbix_agent_t mysqld_port_t:tcp_socket name_connect;
allow zabbix_agent_t mysqld_var_run_t:sock_file write;
EOF
# checkmodule -M -m -o zabbix_home.mod zabbix_home.te
# semodule_package -o zabbix_home.pp -m zabbix_home.mod
# semodule -i zabbix_home.pp
# restorecon -R /var/lib/zabbix

Optionally, it is possible to customize the template:

  • The discovery of tables is disabled by default. To enable table discovery, change the value of the macro {$PERCONA.TABLE.NAMES.MATCHES} to the name of a single table, or use a regex string to include multiple tables.
  • You can also add an additional context macro {$PERCONA.TABLE.NAMES.MATCHES:<dbname>} for specific databases to precisely control which tables should be discovered.
  • To exclude certain tables from discovery, change the value of the macro {$PERCONA.TABLE.NAMES.NOT_MATCHES} to the name of a single table, or use a regex string to exclude multiple tables.
  • You can also add an additional context macro {$PERCONA.TABLE.NAMES.NOT_MATCHES:<dbname>} for specific databases to precisely control which tables should be excluded.

Macros used

Name Description Default
{$PERCONA.HOST}

Hostname or IP of Percona host or container.

127.0.0.1
{$PERCONA.PORT}

Percona service port.

3306
{$PERCONA.ABORTED_CONN.MAX.WARN}

Number of failed attempts to connect to the Percona server for trigger expressions.

3
{$PERCONA.REPL_LAG.MAX.WARN}

Amount of time the replica is behind the source for trigger expressions.

30m
{$PERCONA.SLOW_QUERIES.MAX.WARN}

Number of slow queries for trigger expressions.

3
{$PERCONA.FULLSCAN.RATIO.WARN}

Warning threshold for full table scan ratio.

0.1
{$PERCONA.FULLSCAN.SELECT_RATE.MIN.WARN}

The minimum SELECT statement rate (per second) for trigger expressions.

5
{$PERCONA.BUFF_UTIL.MIN.WARN}

The minimum buffer pool utilization in percent for trigger expressions.

50
{$PERCONA.CREATED_TMP_TABLES.MAX.WARN}

The maximum number of temporary tables created in memory per second for trigger expressions.

30
{$PERCONA.CREATED_TMP_DISK_TABLES.MAX.WARN}

The maximum number of temporary tables created on a disk per second for trigger expressions.

10
{$PERCONA.CREATED_TMP_FILES.MAX.WARN}

The maximum number of temporary files created on a disk per second for trigger expressions.

10
{$PERCONA.INNODB_LOG_FILES}

Number of physical files in the InnoDB redo log for calculating innodb_log_file_size.

2
{$PERCONA.INNODB_SCANS.MIN.WARN}

The minimum total InnoDB scans for warning trigger expressions.

0
{$PERCONA.INNODB_SCANS.MIN.CRIT}

The minimum total InnoDB scans for critical trigger expressions.

1
{$PERCONA.INNODB_EFFICIENCY.MIN.WARN}

The minimum InnoDB scan efficiency in percent for warning trigger expressions.

80
{$PERCONA.INNODB_EFFICIENCY.MIN.CRIT}

The minimum InnoDB scan efficiency in percent for critical trigger expressions.

50
{$PERCONA.DBNAME.MATCHES}

Filter of discoverable databases.

.+
{$PERCONA.DBNAME.NOT_MATCHES}

Filter to exclude discovered databases.

information_schema|performance_schema|percona|sys|mysql
{$PERCONA.TABLE.NAMES.MATCHES}

Filter of discoverable tables. Use a context to change the filter of discoverable tables for a specific database.

CHANGE_IF_NEEDED
{$PERCONA.TABLE.NAMES.NOT_MATCHES}

Filter to exclude discovered tables. Use a context to change the filter to exclude discovered tables for a specific database.

CHANGE_IF_NEEDED
{$PERCONA.TOTALSIZE.GROWTH.MAX.WARN}

The warning threshold of the total table size growth for trigger expressions.

300M
{$PERCONA.TOTALSIZE.GROWTH.MAX.CRIT}

The critical threshold of the total table size growth for trigger expressions.

1G
{$PERCONA.FRAGMENTATION.WARN}

The free ratio threshold for warning fragmentation trigger expressions.

0.3
{$PERCONA.FRAGMENTATION.CRIT}

The free ratio threshold for critical fragmentation trigger expressions.

0.6
{$PERCONA.DATA_FREE.MIN.WARN}

The minimum Data_free value for warning fragmentation trigger expressions.

1G
{$PERCONA.DATA_FREE.MIN.CRIT}

The minimum Data_free value for critical fragmentation trigger expressions.

5G
{$PERCONA.TABLE_SIZE.MIN.WARN}

The minimum table size for warning fragmentation trigger expressions.

3G
{$PERCONA.TABLE_SIZE.MIN.CRIT}

The minimum table size for critical fragmentation trigger expressions.

10G
{$PERCONA.THREADPOOL.UTILIZATION.MAX.WARN}

The maximum thread pool utilization in percent for trigger expressions.

85
{$PERCONA.THREADPOOL.IDLE_RATIO.MIN.WARN}

The minimum thread pool idle ratio in percent for trigger expressions.

20

Items

Name Description Type Key and additional info
Get status variables

Gets server global status information.

Zabbix agent percona.get_status_variables["{$PERCONA.HOST}","{$PERCONA.PORT}"]
Get global variables

Gets server global variables for thread pool configuration.

Zabbix agent percona.get_global_variables["{$PERCONA.HOST}","{$PERCONA.PORT}"]
Status

Percona server status.

Zabbix agent percona.ping["{$PERCONA.HOST}","{$PERCONA.PORT}"]

Preprocessing

  • JavaScript: return value.indexOf('is alive') !== -1 ? 1 : 0;

  • Discard unchanged with heartbeat: 10m

Version

Percona server version.

Zabbix agent percona.version["{$PERCONA.HOST}","{$PERCONA.PORT}"]

Preprocessing

  • Regular expression: (Server version)\s+(.+) \2

  • Discard unchanged with heartbeat: 1d

Uptime

Number of seconds that the server has been up.

Dependent item percona.uptime

Preprocessing

  • XML XPath: The text is too long. Please see the template.

Aborted clients per second

Number of connections that were aborted because the client died without closing the connection properly.

Dependent item percona.aborted_clients.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Aborted connections per second

Number of failed attempts to connect to the Percona server.

Dependent item percona.aborted_connects.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Connection errors accept per second

Number of errors that occurred during calls to accept() on the listening port.

Dependent item percona.connection_errors_accept.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Connection errors internal per second

Number of refused connections due to internal server errors, for example, out of memory errors, or failed thread starts.

Dependent item percona.connection_errors_internal.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Connection errors max connections per second

Number of refused connections due to the max_connections limit being reached.

Dependent item percona.connection_errors_max_connections.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Connection errors peer address per second

Number of errors while searching for the connecting client's IP address.

Dependent item percona.connection_errors_peer_address.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Connection errors select per second

Number of errors during calls to select() or poll() on the listening port. The client would not necessarily have been rejected in these cases.

Dependent item percona.connection_errors_select.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Connection errors tcpwrap per second

Number of connections the libwrap library has refused.

Dependent item percona.connection_errors_tcpwrap.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Connections per second

Number of connection attempts (successful or not) to the Percona server.

Dependent item percona.connections.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Max used connections

The maximum number of connections that have been in use simultaneously since the server start.

Dependent item percona.max_used_connections

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Threads cached

Number of threads in the thread cache.

Dependent item percona.threads_cached

Preprocessing

  • XML XPath: The text is too long. Please see the template.

Threads connected

Number of currently open connections.

Dependent item percona.threads_connected

Preprocessing

  • XML XPath: The text is too long. Please see the template.

Threads created per second

Number of threads created to handle connections. If the value of Threads_created is large, you may want to increase the thread_cache_size value. The cache miss rate can be calculated as Threads_created/Connections.

Dependent item percona.threads_created.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Threads running

Number of threads that are not sleeping.

Dependent item percona.threads_running

Preprocessing

  • XML XPath: The text is too long. Please see the template.

Buffer pool efficiency

Shows how effectively the buffer pool is serving reads.

Calculated percona.buffer_pool_efficiency
Buffer pool utilization

Ratio of used to total pages in the buffer pool.

Calculated percona.buffer_pool_utilization
Created tmp files on disk per second

How many temporary files mysqld has created.

Dependent item percona.created_tmp_files.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Created tmp tables on disk per second

Number of internal on-disk temporary tables created by the server while executing statements.

Dependent item percona.created_tmp_disk_tables.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Created tmp tables in memory per second

Number of internal temporary tables created by the server while executing statements.

Dependent item percona.created_tmp_tables.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
InnoDB buffer pool pages free

The number of free pages in the InnoDB buffer pool.

Dependent item percona.innodb_buffer_pool_pages_free

Preprocessing

  • XML XPath: The text is too long. Please see the template.

InnoDB buffer pool pages total

The total size of the InnoDB buffer pool, in pages.

Dependent item percona.innodb_buffer_pool_pages_total

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

InnoDB buffer pool read requests

Number of logical read requests.

Dependent item percona.innodb_buffer_pool_read_requests

Preprocessing

  • XML XPath: The text is too long. Please see the template.

InnoDB buffer pool read requests per second

Number of logical read requests per second.

Dependent item percona.innodb_buffer_pool_read_requests.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
InnoDB buffer pool reads

Number of logical reads that InnoDB could not satisfy from the buffer pool and had to read directly from the disk.

Dependent item percona.innodb_buffer_pool_reads

Preprocessing

  • XML XPath: The text is too long. Please see the template.

InnoDB buffer pool reads per second

Number of logical reads per second that InnoDB could not satisfy from the buffer pool and had to read directly from the disk.

Dependent item percona.innodb_buffer_pool_reads.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
InnoDB log waits per second

Number of InnoDB log waits per second. An increase in this per-second value

indicates that threads are increasingly waiting for redo log writes, which typically

points to disk subsystem performance issues or an innodb_log_file_size that is too small.

Dependent item percona.innodb_log_waits.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
  • Discard unchanged with heartbeat: 1h

InnoDB row lock time

The total time spent in acquiring row locks for InnoDB tables.

Dependent item percona.innodb_row_lock_time

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Custom multiplier: 0.001

  • Discard unchanged with heartbeat: 1h

InnoDB row lock wait time avg

Average time spent waiting for row locks in InnoDB.

Dependent item percona.innodb_row_lock_time_avg

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Custom multiplier: 0.001

  • Discard unchanged with heartbeat: 1h

InnoDB row lock time max

The maximum time to acquire a row lock for InnoDB tables.

Dependent item percona.innodb_row_lock_time_max

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Custom multiplier: 0.001

  • Discard unchanged with heartbeat: 1h

InnoDB row lock waits

Number of times operations on InnoDB tables had to wait for a row lock.

Dependent item percona.innodb_row_lock_waits

Preprocessing

  • XML XPath: The text is too long. Please see the template.

InnoDB row lock current waits

Current number of active row lock waits in InnoDB.

Dependent item percona.innodb_row_lock_current_waits

Preprocessing

  • XML XPath: The text is too long. Please see the template.

InnoDB rows deleted per second

Number of rows deleted from InnoDB tables per second.

Dependent item percona.innodb_rows_deleted.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
  • Discard unchanged with heartbeat: 1h

InnoDB rows inserted per second

Number of rows inserted into InnoDB tables per second.

Dependent item percona.innodb_rows_inserted.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
  • Discard unchanged with heartbeat: 1h

InnoDB rows read per second

Number of rows read from InnoDB tables per second.

Dependent item percona.innodb_rows_read.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
  • Discard unchanged with heartbeat: 1h

InnoDB rows updated per second

Number of rows updated in InnoDB tables per second.

Dependent item percona.innodb_rows_updated.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
  • Discard unchanged with heartbeat: 1h

InnoDB buffered aio submitted per second

Number of submitted buffered asynchronous I/O requests per second.

Dependent item percona.innodb_buffered_aio_submitted.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
  • Discard unchanged with heartbeat: 1h

InnoDB scan pages contiguous per second

Number of contiguous page reads inside a query per second.

Dependent item percona.innodb_scan_pages_contiguous.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
  • Discard unchanged with heartbeat: 1h

InnoDB scan pages disjointed per second

Number of disjointed page reads inside a query per second.

Dependent item percona.innodb_scan_pages_disjointed.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
  • Discard unchanged with heartbeat: 1h

InnoDB scan data size

The size of data in all InnoDB pages read inside a query in bytes.

Dependent item percona.innodb_scan_data_size

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

InnoDB total scan pages per second

Total InnoDB table/index scan pages per second.

Calculated percona.innodb_total_scans.rate

Preprocessing

  • Discard unchanged with heartbeat: 1h

InnoDB scan efficiency

Percentage of efficiently scanned pages, where lower values may indicate increased InnoDB fragmentation.

Calculated percona.innodb_scan.efficiency

Preprocessing

  • Discard unchanged with heartbeat: 1h

Slow queries per second

Number of queries that have taken more than long_query_time seconds.

Dependent item percona.slow_queries.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Bytes received

Number of bytes received from all clients.

Dependent item percona.bytes_received.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Bytes sent

Number of bytes sent to all clients.

Dependent item percona.bytes_sent.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Command delete per second

The Com_delete counter variable indicates the number of times the DELETE statement has been executed.

Dependent item percona.com_delete.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Command insert per second

The Com_insert counter variable indicates the number of times the INSERT statement has been executed.

Dependent item percona.com_insert.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Command select per second

The Com_select counter variable indicates the number of times the SELECT statement has been executed.

Dependent item percona.com_select.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Command update per second

The Com_update counter variable indicates the number of times the UPDATE statement has been executed.

Dependent item percona.com_update.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Queries per second

Number of statements executed by the server. This variable includes statements executed within stored programs, unlike the Questions variable.

Dependent item percona.queries.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Questions per second

Number of statements executed by the server. This includes only statements sent to the server by clients and not statements executed within stored programs, unlike the Queries variable.

Dependent item percona.questions.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
Binlog cache disk use

Number of transactions that used a temporary disk cache because they could not fit in the regular binary log cache, being larger than binlog_cache_size.

Dependent item percona.binlog_cache_disk_use

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 6h

Select scan per second

The number of SELECT queries that required a full table scan. A high value indicates a lack of or improper use of indexes.

Dependent item percona.select_scan.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
  • Discard unchanged with heartbeat: 1h

Full table scan ratio

The ratio of SELECT statements executed as full table scans to all SELECT statements.

Calculated percona.full_scans.ratio

Preprocessing

  • Discard unchanged with heartbeat: 1h

InnoDB buffer pool wait free

Number of times InnoDB waited for a free page before reading or creating a page.

Normally, writes to the InnoDB buffer pool happen in the background.

When no clean pages are available, dirty pages are flushed first

in order to free some up. This counts the number of waits for this operation

to finish. If this value is not small, consider increasing innodb_buffer_pool_size.

Dependent item percona.innodb_buffer_pool_wait_free

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 6h

InnoDB buffer pool wait free per second

Number of times per second InnoDB waited for a free page before reading or creating a page.

Non-zero values indicate the buffer pool is too small; increase innodb_buffer_pool_size.

Dependent item percona.innodb_buffer_pool_wait_free.rate

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Change per second
  • Discard unchanged with heartbeat: 6h

InnoDB number open files

Number of open files held by InnoDB. InnoDB only.

Dependent item percona.innodb_num_open_files

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 6h

Open table definitions

Number of cached table definitions.

Dependent item percona.open_table_definitions

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 6h

Open tables

Number of tables that are open.

Dependent item percona.open_tables

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 6h

InnoDB log written

Number of bytes written to the InnoDB log.

Dependent item percona.innodb_os_log_written

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 6h

Calculated value of innodb_log_file_size

Innodb_log_file_size is calculated as: (innodb_os_log_written-innodb_os_log_written(time shift -1h))/{$PERCONA.INNODB_LOG_FILES}. Innodb_log_file_size is the size in bytes of each InnoDB redo log file in the log group. The combined size can be no more than 512 GB. Larger values mean less disk I/O due to less flushing checkpoint activity, but also slower recovery from a crash.

Calculated percona.innodb_log_file_size

Preprocessing

  • Discard unchanged with heartbeat: 6h

Triggers

Name Description Expression Severity Dependencies and additional info
Percona: Service is unreachable

Percona is unreachable.

last(/Percona by Zabbix agent/percona.ping["{$PERCONA.HOST}","{$PERCONA.PORT}"])=0 High
Percona: Version has changed

The Percona version has changed. Acknowledge to close the problem manually.

last(/Percona by Zabbix agent/percona.version["{$PERCONA.HOST}","{$PERCONA.PORT}"],#1)<>last(/Percona by Zabbix agent/percona.version["{$PERCONA.HOST}","{$PERCONA.PORT}"],#2) and length(last(/Percona by Zabbix agent/percona.version["{$PERCONA.HOST}","{$PERCONA.PORT}"]))>0 Info Manual close: Yes
Percona: Service has been restarted

Percona uptime is less than 10 minutes.

last(/Percona by Zabbix agent/percona.uptime)<10m Info
Percona: Failed to fetch data

Zabbix has not received any data for the last 30 minutes.

nodata(/Percona by Zabbix agent/percona.uptime,30m)=1 Info Depends on:
  • Percona: Service is unreachable
Percona: Server has aborted connections

The number of failed attempts to connect to the Percona server has been more than {$PERCONA.ABORTED_CONN.MAX.WARN} in the last 5 minutes.

min(/Percona by Zabbix agent/percona.aborted_connects.rate,5m)>{$PERCONA.ABORTED_CONN.MAX.WARN} Average Depends on:
  • Percona: Refused connections
Percona: Refused connections

Number of refused connections due to the max_connections limit being reached.

last(/Percona by Zabbix agent/percona.connection_errors_max_connections.rate)>0 Average
Percona: Buffer pool utilization is too low

The buffer pool utilization has been less than {$PERCONA.BUFF_UTIL.MIN.WARN}% in the last 5 minutes with server uptime over 1 hour. This means that there is a lot of unused RAM allocated for the buffer pool, which you can easily reallocate at the moment.

max(/Percona by Zabbix agent/percona.buffer_pool_utilization,5m)<{$PERCONA.BUFF_UTIL.MIN.WARN} and last(/Percona by Zabbix agent/percona.uptime)>3600 Warning
Percona: Number of temporary files created per second is high

The application using the database may be in need of query optimization.

min(/Percona by Zabbix agent/percona.created_tmp_files.rate,5m)>{$PERCONA.CREATED_TMP_FILES.MAX.WARN} Warning
Percona: Number of on-disk temporary tables created per second is high

The application using the database may be in need of query optimization.

min(/Percona by Zabbix agent/percona.created_tmp_disk_tables.rate,5m)>{$PERCONA.CREATED_TMP_DISK_TABLES.MAX.WARN} Warning
Percona: Number of internal temporary tables created per second is high

The application using the database may be in need of query optimization.

min(/Percona by Zabbix agent/percona.created_tmp_tables.rate,5m)>{$PERCONA.CREATED_TMP_TABLES.MAX.WARN} Warning
Percona: InnoDB efficiency is too low

The InnoDB efficiency has been less than {$PERCONA.INNODB_EFFICIENCY.MIN.CRIT}% in the last 5 minutes.

max(/Percona by Zabbix agent/percona.innodb_scan.efficiency,5m)<{$PERCONA.INNODB_EFFICIENCY.MIN.CRIT} and last(/Percona by Zabbix agent/percona.innodb_total_scans.rate)>{$PERCONA.INNODB_SCANS.MIN.CRIT} High
Percona: InnoDB efficiency is low

The InnoDB efficiency has been less than {$PERCONA.INNODB_EFFICIENCY.MIN.WARN}% in the last 5 minutes.

max(/Percona by Zabbix agent/percona.innodb_scan.efficiency,5m)<{$PERCONA.INNODB_EFFICIENCY.MIN.WARN} and last(/Percona by Zabbix agent/percona.innodb_total_scans.rate)>{$PERCONA.INNODB_SCANS.MIN.WARN} Warning Depends on:
  • Percona: InnoDB efficiency is too low
Percona: Server has slow queries

The number of slow queries has been more than {$PERCONA.SLOW_QUERIES.MAX.WARN} in the last 5 minutes.

min(/Percona by Zabbix agent/percona.slow_queries.rate,5m)>{$PERCONA.SLOW_QUERIES.MAX.WARN} Warning
Percona: High rate of full table scans

The rate of SELECT statements exceeds {$PERCONA.FULLSCAN.SELECT_RATE.MIN.WARN} per second and the full table scan ratio has been above {$PERCONA.FULLSCAN.RATIO.WARN} for the last 5 minutes.

avg(/Percona by Zabbix agent/percona.full_scans.ratio,5m)>{$PERCONA.FULLSCAN.RATIO.WARN} and avg(/Percona by Zabbix agent/percona.com_select.rate,5m)>{$PERCONA.FULLSCAN.SELECT_RATE.MIN.WARN} Warning

LLD rule Database discovery

Name Description Type Key and additional info
Database discovery

Used for the discovery of databases.

Zabbix agent percona.db.discovery["{$PERCONA.HOST}","{$PERCONA.PORT}"]

Preprocessing

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1d

Item prototypes for Database discovery

Name Description Type Key and additional info
Database [{#DBNAME}]: Size

Database size.

Zabbix agent percona.dbsize["{$PERCONA.HOST}","{$PERCONA.PORT}","{#DBNAME}"]

Preprocessing

  • Discard unchanged with heartbeat: 1h

LLD rule Database [{#DBNAME}]: Table discovery

Name Description Type Key and additional info
Database [{#DBNAME}]: Table discovery

Used for the discovery of tables of the databases.

Zabbix agent percona.table.discovery["{$PERCONA.HOST}","{$PERCONA.PORT}","{#DBNAME}"]

Preprocessing

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1d

Item prototypes for Database [{#DBNAME}]: Table discovery

Name Description Type Key and additional info
Table [{#DBNAME}/{#TABLE_NAME}]: Get data

Database table data.

Zabbix agent percona.tabledata["{$PERCONA.HOST}","{$PERCONA.PORT}","{#DBNAME}","{#TABLE_NAME}"]
Table [{#DBNAME}/{#TABLE_NAME}]: Data length

The size of the data in the table.

Dependent item percona.table.data_length["{#DBNAME}","{#TABLE_NAME}"]

Preprocessing

  • XML XPath: /resultset/row/field[@name='DATA_LENGTH']/text()

  • Custom multiplier: 1

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Table [{#DBNAME}/{#TABLE_NAME}]: Index length

The size occupied by the table's indexes.

Dependent item percona.table.index_length["{#DBNAME}","{#TABLE_NAME}"]

Preprocessing

  • XML XPath: /resultset/row/field[@name='INDEX_LENGTH']/text()

  • Custom multiplier: 1

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Table [{#DBNAME}/{#TABLE_NAME}]: Total size

The sum of DATA_LENGTH and INDEX_LENGTH represents the total size of the table.

Calculated percona.table.total_size["{#DBNAME}","{#TABLE_NAME}"]

Preprocessing

  • Check for not supported value: any error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Table [{#DBNAME}/{#TABLE_NAME}]: Data free

The amount of unused but allocated space.

Dependent item percona.table.data_free["{#DBNAME}","{#TABLE_NAME}"]

Preprocessing

  • XML XPath: /resultset/row/field[@name='DATA_FREE']/text()

  • Custom multiplier: 1

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Table [{#DBNAME}/{#TABLE_NAME}]: Free ratio

The fraction of allocated table space that is currently unused (DATA_FREE / (DATA_LENGTH + INDEX_LENGTH)).

High values indicate potential table fragmentation or inefficient space usage.

Calculated percona.table.free_ratio["{#DBNAME}","{#TABLE_NAME}"]

Preprocessing

  • Check for not supported value: any error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Table [{#DBNAME}/{#TABLE_NAME}]: Rows

The approximate number of rows in the table. For InnoDB, the TABLE_ROWS value is approximate and may differ from the actual count.

Dependent item percona.table.rows["{#DBNAME}","{#TABLE_NAME}"]

Preprocessing

  • XML XPath: /resultset/row/field[@name='TABLE_ROWS']/text()

  • Check for not supported value: any error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Trigger prototypes for Database [{#DBNAME}]: Table discovery

Name Description Expression Severity Dependencies and additional info
Percona: Table [{#DBNAME}/{#TABLE_NAME}]: Total size growth is too high

Total table size growth is too high.

(last(/Percona by Zabbix agent/percona.table.total_size["{#DBNAME}","{#TABLE_NAME}"])-min(/Percona by Zabbix agent/percona.table.total_size["{#DBNAME}","{#TABLE_NAME}"],5m))>{$PERCONA.TOTALSIZE.GROWTH.MAX.CRIT} High
Percona: Table [{#DBNAME}/{#TABLE_NAME}]: Total size growth is high

Total table size growth is high.

(last(/Percona by Zabbix agent/percona.table.total_size["{#DBNAME}","{#TABLE_NAME}"])-min(/Percona by Zabbix agent/percona.table.total_size["{#DBNAME}","{#TABLE_NAME}"],5m))>{$PERCONA.TOTALSIZE.GROWTH.MAX.WARN} Warning Depends on:
  • Percona: Table [{#DBNAME}/{#TABLE_NAME}]: Total size growth is too high
Percona: Table [{#DBNAME}/{#TABLE_NAME}]: Free space very high

Free table space is very high (fragmentation critical).

last(/Percona by Zabbix agent/percona.table.free_ratio["{#DBNAME}","{#TABLE_NAME}"]) > {$PERCONA.FRAGMENTATION.CRIT} and last(/Percona by Zabbix agent/percona.table.data_free["{#DBNAME}","{#TABLE_NAME}"]) > {$PERCONA.DATA_FREE.MIN.CRIT} and last(/Percona by Zabbix agent/percona.table.total_size["{#DBNAME}","{#TABLE_NAME}"]) > {$PERCONA.TABLE_SIZE.MIN.CRIT} High
Percona: Table [{#DBNAME}/{#TABLE_NAME}]: Free space high

Free table space is high (fragmentation warning).

last(/Percona by Zabbix agent/percona.table.free_ratio["{#DBNAME}","{#TABLE_NAME}"]) > {$PERCONA.FRAGMENTATION.WARN} and last(/Percona by Zabbix agent/percona.table.data_free["{#DBNAME}","{#TABLE_NAME}"]) > {$PERCONA.DATA_FREE.MIN.WARN} and last(/Percona by Zabbix agent/percona.table.total_size["{#DBNAME}","{#TABLE_NAME}"]) > {$PERCONA.TABLE_SIZE.MIN.WARN} Warning Depends on:
  • Percona: Table [{#DBNAME}/{#TABLE_NAME}]: Free space very high

LLD rule Replication discovery

Name Description Type Key and additional info
Replication discovery

Discovery of the replication.

Zabbix agent percona.replication.discovery["{$PERCONA.HOST}","{$PERCONA.PORT}"]

Preprocessing

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1d

Item prototypes for Replication discovery

Name Description Type Key and additional info
Replication: Replica status {#MASTER_HOST}

Gets status information on the essential parameters of the replica threads.

Zabbix agent percona.slave_status["{$PERCONA.HOST}","{$PERCONA.PORT}","{#SQL_STATEMENT}"]

Preprocessing

  • JavaScript: The text is too long. Please see the template.

Replication: Replica SQL running state {#MASTER_HOST}

Shows the state of the SQL thread.

Dependent item percona.slave_sql_running_state["{#MASTER_HOST}"]

Preprocessing

  • XML XPath: /resultset/row/field[@name='Slave_SQL_Running_State']/text()

  • Discard unchanged with heartbeat: 6h

Replication: Seconds behind source {#MASTER_HOST}

The number of seconds the replica SQL thread has been behind processing the source binary log.

A high number (or an increasing one) can indicate that the replica is unable to handle events

from the source in a timely fashion.

Dependent item percona.seconds_behind_master["{#MASTER_HOST}"]

Preprocessing

  • XML XPath: /resultset/row/field[@name='Seconds_Behind_Master']/text()

  • Discard unchanged with heartbeat: 1h

  • Matches regular expression: \d+

    ⛔️Custom on fail: Set error to: Replication is not performed.

Replication: Replica IO running {#MASTER_HOST}

Indicates whether the I/O thread for reading the source's binary log is running.

Normally, you want this to be Yes unless you have not yet started a replication or have

explicitly stopped it with STOP REPLICA.

Dependent item percona.slave_io_running["{#MASTER_HOST}"]

Preprocessing

  • XML XPath: /resultset/row/field[@name='Slave_IO_Running']/text()

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Replication: Replica SQL running {#MASTER_HOST}

Indicates whether the SQL thread for executing events in the relay log is running.

As with the I/O thread, this should normally be Yes.

Dependent item percona.slave_sql_running["{#MASTER_HOST}"]

Preprocessing

  • XML XPath: /resultset/row/field[@name='Slave_SQL_Running']/text()

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Replication: Last IO error {#MASTER_HOST}

Describes the last I/O error message reported by the replica I/O thread that caused replication to stop or behave incorrectly.

Dependent item percona.slave_io_error["{#MASTER_HOST}"]

Preprocessing

  • XML XPath: /resultset/row/field[@name='Last_IO_Error']/text()

  • Discard unchanged with heartbeat: 6h

Replication: Last SQL error {#MASTER_HOST}

Describes the last SQL error message reported by the replica SQL thread that caused replication to stop or behave incorrectly.

Dependent item percona.slave_sql_error["{#MASTER_HOST}"]

Preprocessing

  • XML XPath: /resultset/row/field[@name='Last_SQL_Error']/text()

  • Discard unchanged with heartbeat: 6h

Trigger prototypes for Replication discovery

Name Description Expression Severity Dependencies and additional info
Percona: Replication lag is too high

Replication delay is too long.

min(/Percona by Zabbix agent/percona.seconds_behind_master["{#MASTER_HOST}"],5m)>{$PERCONA.REPL_LAG.MAX.WARN} Warning
Percona: The replica I/O thread is not running

Indicates whether the I/O thread for reading the source's binary log is running.

last(/Percona by Zabbix agent/percona.slave_io_running["{#MASTER_HOST}"])=2 Average
Percona: The replica I/O thread is not connected to a replication source

Indicates whether the replica I/O thread is connected to the source.

last(/Percona by Zabbix agent/percona.slave_io_running["{#MASTER_HOST}"])<>1 Warning Depends on:
  • Percona: The replica I/O thread is not running
Percona: The SQL thread is not running

Indicates whether the SQL thread for executing events in the relay log is running.

last(/Percona by Zabbix agent/percona.slave_sql_running["{#MASTER_HOST}"])=2 Warning Depends on:
  • Percona: The replica I/O thread is not running

LLD rule Thread pool metric discovery

Name Description Type Key and additional info
Thread pool metric discovery

The discovery of additional thread pool metrics when thread_handling='pool-of-threads'.

Learn more.

Dependent item percona.threadpool.enable.discovery

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 3h

Item prototypes for Thread pool metric discovery

Name Description Type Key and additional info
Thread pool max threads

The maximum number of threads in the pool.

Dependent item percona.thread_pool_max_threads[{#SINGLETON}]

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Thread pool idle threads

Number of idle threads in the pool.

Dependent item percona.threadpool_idle_threads[{#SINGLETON}]

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Thread pool threads

Number of threads in the pool.

Dependent item percona.threadpool_threads[{#SINGLETON}]

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Thread pool stall limit

Amount of time before a running thread is considered stalled.

Dependent item percona.thread_pool_stall_limit[{#SINGLETON}]

Preprocessing

  • XML XPath: The text is too long. Please see the template.

  • Custom multiplier: 0.001

  • Discard unchanged with heartbeat: 1h

Thread pool utilization

Percentage of the configured thread pool capacity currently in use.

Calculated percona.thread_pool_utilization[{#SINGLETON}]

Preprocessing

  • Discard unchanged with heartbeat: 1h

Thread pool idle ratio

Percentage of thread pool worker threads that are currently idle.

Calculated percona.thread_pool_idle_ratio[{#SINGLETON}]

Preprocessing

  • Discard unchanged with heartbeat: 1h

Trigger prototypes for Thread pool metric discovery

Name Description Expression Severity Dependencies and additional info
Percona: Thread pool max threads reached

Thread pool has reached the configured max thread limit.

last(/Percona by Zabbix agent/percona.threadpool_threads[{#SINGLETON}])>=last(/Percona by Zabbix agent/percona.thread_pool_max_threads[{#SINGLETON}]) and last(/Percona by Zabbix agent/percona.thread_pool_max_threads[{#SINGLETON}])>0 High
Percona: Thread pool utilization is too high

Thread pool utilization has been above {$PERCONA.THREADPOOL.UTILIZATION.MAX.WARN}% in the last 5 minutes.

min(/Percona by Zabbix agent/percona.thread_pool_utilization[{#SINGLETON}],5m)>{$PERCONA.THREADPOOL.UTILIZATION.MAX.WARN} and last(/Percona by Zabbix agent/percona.thread_pool_max_threads[{#SINGLETON}])>0 Warning
Percona: Thread pool idle ratio is too low

Thread pool idle ratio has been less than {$PERCONA.THREADPOOL.IDLE_RATIO.MIN.WARN}% in the last 5 minutes.

max(/Percona by Zabbix agent/percona.thread_pool_idle_ratio[{#SINGLETON}],5m)<{$PERCONA.THREADPOOL.IDLE_RATIO.MIN.WARN} and last(/Percona by Zabbix agent/percona.threadpool_threads[{#SINGLETON}])>0 Warning

Feedback

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

Articles and documentation

+ Propose new article

Sie können die Integration nicht finden, die Sie benötigen?