Check mysql-aria

Overview

Checks some metrics of the Aria Storage Engine in MySQL/MariaDB. The logic is taken from MySQLTuner script:mariadb_aria(), v1.9.8.

Installing the Python MySQL Connector:

  • RHEL 7+: pip3 install mysql-connector-python

Hints:

  • Compared to MySQLTuner this check currently:

    • supports only simple login with username/password

    • does not support a connection via socket

Fact Sheet

Check Plugin Download

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

Check Interval Recommendation

Once an hour

Can be called without parameters

No

Available for

Python 3, Windows

Requirements

Python module mysql.connector; User with no privileges, locked down to 127.0.0.1 - for example mon-aria@127.0.0.1. Usernames in MySQL/MariaDB are limited to 16 chars in specific versions.

Help

usage: mysql-aria [-h] [-V] [--always-ok] [-H HOSTNAME] -p PASSWORD
                  [--port PORT] -u USERNAME

Checks some metrics of the Aria Storage Engine in MySQL/MariaDB.

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --always-ok           Always returns OK.
  -H HOSTNAME, --hostname HOSTNAME
                        MySQL/MariaDB hostname. Default: 127.0.0.1
  -p PASSWORD, --password PASSWORD
                        Use the indicated password to authenticate the
                        connection.
  --port PORT           MySQL/MariaDB port. Default: 3306
  -u USERNAME, --username USERNAME
                        MySQL/MariaDB username.

Usage Examples

./mysql-aria --username mon-aria --password mypassword

Output:

Aria pagecache size / total Aria indexes: 128.0MiB/336.0KiB, Aria pagecache hit rate: 95.5% (33.8M cached / 1.5M reads)

States

  • WARN if unable to calculate Aria index size on MySQL/MariaDB server.

  • WARN if aria_pagecache_buffer_size < total_aria_indexes and pct_aria_keys_from_mem < 95%.

  • WARN if Aria_pagecache_read_requests > 0 and pct_aria_keys_from_mem < 95%.

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_total_aria_indexes

Bytes

Sum of all Aria Indexes.

mysql_pct_aria_keys_from_mem

Percentage

aria_pagecache_reads / aria_pagecache_read_requests * 100

mysql_aria_pagecache_read_requests

Number

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

mysql_aria_pagecache_reads

Number

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

Credits, License