Welcome to the Pandora FMS Module Library

 
This is a library with modules, documentation and tools for Pandora FMS users, both public Open Source and Enterprise. Please use your support credentials (same as used to enter support/ticketing system) in the menu to your right. You will be granted access to a resourceful module library, such as Oracle, VMware, JBoss and others, ready to be used in production enviroments, with official professional support from Artica. If you do not own an enterprise account, you still can browse and download lots of modules, you can even register a free account and contribute with your own modules/tools for other public users.

Home > Application monitoring > Databases

MySQL Monitoring

Author: slerena2 Create in: 08/11/2009 Update in: 08/13/2009
Rating:
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