Hi!
I wonder how can to monitor size own zabbix's database, MySQL database?
I wonder how can to monitor size own zabbix's database, MySQL database?
# mkdir -p /var/lib/zabbix # chwon zabbix:zabbix /var/lib/zabbix # chmod 700 /var/lib/zabbix # su - zabbix -s /bin/bash -c "mysql_config_editor set --login-path=monitoring --user monitoring --password"
mysql> SELECT table_schema "databases name", sum(data_length + index_length)/1024/1024 "DВ size in MB" FROM information_schema.TABLES GROUP BY table_schema; +--------------------+----------------+ | databases name | DВ size in MB | +--------------------+----------------+ | information_schema | 0.15625000 | | mysql | 2.75522137 | | performance_schema | 0.00000000 | | sys | 0.01562500 | | zabbix | 13.46875000 | +--------------------+----------------+ 5 rows in set (0.15 sec)
B:" LLD filters off those databases.{#DB}::data size system.run[{$MYSQL_CMD} "SELECT SUM(data_length) FROM information_schema.tables WHERE table_schema='{#DB}';",]
{#DB}::index size system.run[{$MYSQL_CMD} "SELECT SUM(index_length) FROM information_schema.tables WHERE table_schema='{#DB}';",]




Comment