Munin: Difference between revisions
Jump to navigation
Jump to search
Anthoanthop (talk | contribs) (Created page with "== MySQL plugins configuration == vi /etc/munin/plugin-conf.d/munin-node <syntaxhighlight lang="bash"> [mysql*] user root env.mysqlopts --defaults-file=/etc/mysql/debian.cn...") |
Anthoanthop (talk | contribs) No edit summary |
||
Line 38: | Line 38: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* You have to symlink plugins you want to be graphed: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 83: | Line 83: | ||
force install DBD::mysql ) | force install DBD::mysql ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* I got this issue during the installation, here's the resolution: | * I got this issue during the installation, here's the resolution: | ||
Line 93: | Line 92: | ||
You have replace in this file /usr/share/munin/plugins/mysql_ : | You have replace in this file /usr/share/munin/plugins/mysql_ : | ||
<syntaxhighlight lang="bash"> | |||
my %section_map = ( | my %section_map = ( | ||
[[User:Anthoanthop|Anthoanthop]] ([[User talk:Anthoanthop|talk]]) 17:14, 5 May 2015 (CEST) | [[User:Anthoanthop|Anthoanthop]] ([[User talk:Anthoanthop|talk]]) 17:14, 5 May 2015 (CEST) |
Revision as of 16:15, 5 May 2015
MySQL plugins configuration
vi /etc/munin/plugin-conf.d/munin-node
[mysql*]
user root
env.mysqlopts --defaults-file=/etc/mysql/debian.cnf
env.mysqluser debian-sys-maint
env.mysqlconnection DBI:mysql:mysql;mysql_read_default_file=/etc/mysql/debian.cnf
- If this user doesn't exist:
GRANT ALL PRIVILEGES on *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'exampleeeee' WITH GRANT OPTION;
- If this user exist but we have to update the password:
UPDATE user SET Password=PASSWORD('exampleeeee') WHERE User='debian-sys-maint';
- Edit /etc/mysql/debian.cnf:
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = exampleeeee
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = exampleeeee
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
- You have to symlink plugins you want to be graphed:
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_bin_relay_log
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_commands
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_connections
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_files_tables
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_bpool
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_bpool_act
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_insert_buf
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_io
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_io_pend
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_log
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_rows
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_semaphores
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_tnx
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_myisam_indexes
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_network_traffic
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_qcache
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_qcache_mem
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_replication
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_select_types
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_slow
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_sorts
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_table_locks
ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_tmp_tables
- Debian / Ubuntu requirements:
aptitude update
aptitude install make gcc libcache-{perl,cache-perl} libmysqlclient-dev liblz-dev zlib1g-dev libgz-devel liblz-dev
cpan Module::Pluggable
cpan DBI
cpan DBD::mysql
- If you get an error, you could enventually force install:
$ cpan
force install DBD::mysql )
- I got this issue during the installation, here's the resolution:
DBI connect('mysql;mysql_connect_timeout=5','root',...) failed: Access denied for user 'root'@'localhost' (using password: NO) at ./mysql_replication line 903
You have replace in this file /usr/share/munin/plugins/mysql_ :
my %section_map = (
[[User:Anthoanthop|Anthoanthop]] ([[User talk:Anthoanthop|talk]]) 17:14, 5 May 2015 (CEST)
'BACKGROUND THREAD' => \&skip,
);
With:
my %section_map = (
~~~~
'BACKGROUND THREAD' => \&skip,
'INDIVIDUAL BUFFER POOL INFO' => \&skip,
);