MySQL Monitoring
Author: slerena Create in: 08/11/2009 Update in: 08/13/2009Rating:









Status: Module type : Local module
Several modules for doing a general MySQL monitoring using the SQL/Cli engine. This could be done in any OS, just using the Pandora FMS agent.
Module data
Active threads
module_begin
module_name Mysql_Threads
module_description Mysql Threads
module_type generic_data
module_exec mysqladmin status -u root -pxxxx | grep -o "Threads: [0-9]*" | awk '{ print $2 }'
module_end
SQL Queries
module_begin
module_name Mysql_Questions
module_description Mysql Questions
module_type generic_data_inc
module_exec mysqladmin status -u root -pxxxx | grep -o "Questions: [0-9]*" | awk '{ print $2 }'
module_end
SQL Open (DB)
module_begin
module_name Mysql_Opens
module_description Mysql Opens
module_type generic_data_inc
module_exec mysqladmin status -u root -pxxxx | grep -o "Opens: [0-9]*" | awk '{ print $2 }'
module_end
SQL Open (Table access)
module_begin
module_name Mysql_OpenTables
module_description Mysql Opened tables
module_type generic_data
module_exec mysqladmin status -u root -pxxxx | grep -o "Open tables: [0-9]*" | awk '{ print $3 }'
module_end
SQL Queries per second
module_begin
module_name Mysql_QPS
module_description Mysql Queries per second
module_type generic_data
module_exec mysqladmin status -u root -pxxxx | grep -o "Queries per second avg: [.0-9]*" | awk '{ print $5 }'
module_end
MySQL process (mysqld) CPU usage (%)
module_begin
module_name Mysql_CPU
module_description Mysql CPU usage (%)
module_type generic_data
module_exec ps aux | grep "mysqld --basedir" | grep -v "grep" | awk '{ print $3 }'
module_end
MySQL Process (mysqld) RAM usage (%)
module_begin
module_name Mysql_RAM
module_description Mysql RAM usage (%)
module_type generic_data
module_exec ps aux | grep "mysqld --basedir" | grep -v "grep" | awk '{ print $4 }'
module_end

