Added skel for ndb status collector

This commit is contained in:
Fernando Ipar
2017-10-09 22:26:46 -03:00
parent b44138fd7c
commit 58d1d2c3b4
3 changed files with 29 additions and 55 deletions

View File

@@ -108,6 +108,10 @@ collect_mysql_innodb_status () {
$CMD_MYSQL $EXT_ARGV -ssE -e 'SHOW /*!50000 ENGINE*/ INNODB STATUS' 2>/dev/null
}
collect_mysql_ndb_status () {
$CMD_MYSQL $EXT_ARGV -ssE -e 'show /*!50000 ENGINE*/ NDB STATUS' 2>/dev/null
}
collect_mysql_processlist () {
$CMD_MYSQL $EXT_ARGV -ssE -e 'SHOW FULL PROCESSLIST' 2>/dev/null
}
@@ -223,6 +227,7 @@ collect_mysql_info () {
collect_mysql_plugins > "$dir/mysql-plugins"
collect_mysql_slave_status > "$dir/mysql-slave"
collect_mysql_innodb_status > "$dir/innodb-status"
collect_mysql_ndb_status > "$dir/ndb-status"
collect_mysql_processlist > "$dir/mysql-processlist"
collect_mysql_users > "$dir/mysql-users"

View File

@@ -557,6 +557,14 @@ format_innodb_status () {
fi
}
format_ndb_status() {
local file=$1
[ -e "$file" ] || return
# at the time being, just cat the file.
cat "$file"
}
# Summarizes per-database statistics for a bunch of different things: count of
# tables, views, etc. $1 is the file name. $2 is the database name; if none,
# then there should be multiple databases.