MySQL monitoring
Add support for configuring these plugins (creating a database account, installing the dependencies etc):
- check_mysql
- check_mysql_query
-
check_mysql_health see this article. Note there is no documneted support for reading a
~/.my.cnf
file to get the username and password however it can do this.
/usr/lib/nagios/plugins/check_mysql_health --mycnf="/var/lib/nagios/.my.cnf" --username="nagios" --hostname="localhost" --socket="/run/mysqld/mysqld.sock" --database="nagios" --mode="uptime"
OK - database is up since 712 minutes | uptime=42776s