Check mysql-aria

Overview

Checks metrics of the Aria storage engine in MariaDB, including the page cache size relative to total Aria index size and the page cache hit rate. Aria is the crash-safe, non-transactional storage engine used for internal temporary tables in MariaDB. It is not shipped with MySQL or Percona Server.

Important Notes:

Data Collection:

  • Queries SHOW GLOBAL VARIABLES for aria_pagecache_buffer_size

  • Queries SHOW GLOBAL STATUS for Aria_pagecache_reads and Aria_pagecache_read_requests

  • Queries information_schema.tables to sum all Aria index sizes

  • Logic is taken from MySQLTuner script:mariadb_aria()

Fact Sheet

Fact

Value

Check Plugin Download

https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/mysql-aria

Nagios/Icinga Check Name

check_mysql_aria

Check Interval Recommendation

Every hour

Can be called without parameters

No

Runs on

Cross-platform

Compiled for Windows

No

3rd Party Python modules

pymysql

Help

usage: mysql-aria [-h] [-V] [--always-ok] [--defaults-file DEFAULTS_FILE]
                  [--defaults-group DEFAULTS_GROUP] [--timeout TIMEOUT]

Checks metrics of the Aria storage engine in MySQL/MariaDB, including page
cache read and write hit rates. Alerts when cache efficiency drops below
optimal levels.

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --always-ok           Always returns OK.
  --defaults-file DEFAULTS_FILE
                        MySQL/MariaDB cnf file to read user, host and password
                        from (instead of specifying them on the command line).
                        Example: `/var/spool/icinga2/.my.cnf`. Default:
                        /var/spool/icinga2/.my.cnf
  --defaults-group DEFAULTS_GROUP
                        Group/section to read from in the cnf file. Default:
                        client
  --timeout TIMEOUT     Network timeout in seconds. Default: 3 (seconds)

Usage Examples

./mysql-aria --defaults-file=/var/spool/icinga2/.my.cnf

Output:

Aria pagecache size / total Aria indexes: 128.0MiB/328.0KiB, 97.2% Aria pagecache hit rate (1.1K cached / 30.0 reads)

States

  • WARN if aria_pagecache_buffer_size < total Aria indexes and the page cache hit rate is below 95%.

  • --always-ok suppresses all alerts and always returns OK.

Perfdata / Metrics

Name

Type

Description

mysql_aria_pagecache_buffer_size

Bytes

The size of the buffer used for index and data blocks for Aria tables.

mysql_aria_pagecache_read_requests

Continuous Counter

The number of requests to read something from the Aria page cache.

mysql_aria_pagecache_reads

Continuous Counter

The number of Aria page cache read requests that caused a block to be read from the disk.

mysql_pct_aria_keys_from_mem

Percentage

aria_pagecache_reads / aria_pagecache_read_requests * 100

mysql_total_aria_indexes

Bytes

Sum of all Aria index sizes.

Credits, License