Hello,
I am struggling to come up with a solution to the following case. I have a lot of servers which contain more than 1000 databases.
Currently, the mk_mysql does a great job with fetching their size, etc, but the execution happens every 5 minutes as I know.
Unfortunately, querying the MySQL service every 5 minutes and waiting for the actual data causes a stutter in the agent itself.
The monitoring host is waiting for the data which reflects on all of the services.
Would it be possible to provide me with some suggestions how to handle this.
Currently I am testing:
/usr/lib/check_mk_agent/plugins/mk_mysql
This mk_mysql has:
#!/bin/sh
mysqladmin ping 2>&1 || return
echo "<<<mysql>>>"
mysql -sN -e "show global status ; show global variables ;"
echo "<<<mysql_slave>>>"
echo "ERROR 1227 (42000) at line 1: Access denied; you need (at least one of) the SUPER, SLAVE MONITOR privilege(s) for this operation"
And in:
/usr/lib/check_mk_agent/plugins/86400 (for once a day execution) has another mk_mysql which executes:
#!/bin/sh
echo "<<<mysql_capacity>>>"
mysql -sN -e "SELECT table_schema, sum(data_length + index_length), sum(data_free)
FROM information_schema.TABLES GROUP BY table_schema"
Will this work?
Thanks a ton for taking the time on this case.
Appreciate it.
Best regards,
Marcus