Using Healthcheck.sh script
The healthcheck.sh script is part of the Docker Official Images of MariaDB Server. The script is part of the respository of the Docker Official Image of MariaDB Server.
The script processes a number of argument and tests in strict order. Arguments pertaining to a test must occur before the test name. If a test fails, no further processing is performed. Both arguments and tests begin with a double-hyphen.
Tests
--connect
This is active when a external user can connect to the TCP port of MariaDB Server. This strictly tests just the TCP connection and not if any authentication works.
--innodb_initialized
This test is true when InnoDB has completed initializing. This includes any rollback or crash recovery that may be occurring in the background as MariaDB is starting.
The connecting user must have USAGE privileges to perform this test.
--innodb_buffer_pool_loaded
This indicates that the buffer pool dump previously saved has been completed loaded into the InnoDB Buffer Pool and as such the server has a hot cache ready for use. This checks the innodb_buffer_pool_load_status for a "complete" indicator.
This test doesn't check if innodb-system-variables/#innodb_buffer_pool_load_at_startupinnodb_buffer_pool_load_at_startup is set at startup.
The connecting user must have USAGE privileges to perform this test.
--galera_online
This indicates that the galera node is online by the wsrep_local_state variable. This includes states like "joining" and "donor" where it cannot serve SQL queries.
The connecting user must have USAGE privileges to perform this test.
--replication
This tests a replica based on its arguments. The replica test must pass all of the subtests to be true. The subtests are:
- io - the IO thread is running
- sql - the sql thread is running
- seconds_behind_master - the replica is less than X seconds behind the master.
- sql_remaining_delay - the delayed replica is less than X seconds behind the master's execution of the same SQL.
--mariadbupgrade
This healthcheck indicates that the mariadb is upgrade to the current version.