![]() |
3 лет назад | |
---|---|---|
.. | ||
Makefile.inc | 6 лет назад | |
README.md | 3 лет назад | |
mysql.chart.py | 3 лет назад | |
mysql.conf | 6 лет назад |
Monitors one or more MySQL servers.
netdata
local user to connect to the MySQL server.To create the netdata
user, execute the following in the MySQL shell:
create user 'netdata'@'localhost';
grant usage, replication client on *.* to 'netdata'@'localhost';
flush privileges;
The netdata
user will have the ability to connect to the MySQL server on localhost
without a password.
It will only be able to gather MySQL statistics without being able to alter or affect MySQL operations in any way.
This module will produce following charts (if data is available):
Bandwidth in kilobits/s
Queries in queries/sec
Queries By Type in queries/s
Handlers in handlers/s
Table Locks in locks/s
Table Select Join Issues in joins/s
Table Sort Issues in joins/s
Tmp Operations in created/s
Connections in connections/s
Connections Active in connections/s
Binlog Cache in threads
Threads in transactions/s
Threads Creation Rate in threads/s
Threads Cache Misses in misses
InnoDB I/O Bandwidth in KiB/s
InnoDB I/O Operations in operations/s
InnoDB Pending I/O Operations in operations/s
InnoDB Log Operations in operations/s
InnoDB OS Log Pending Operations in operations
InnoDB OS Log Operations in operations/s
InnoDB OS Log Bandwidth in KiB/s
InnoDB Current Row Locks in operations
InnoDB Row Operations in operations/s
InnoDB Buffer Pool Pages in pages
InnoDB Buffer Pool Flush Pages Requests in requests/s
InnoDB Buffer Pool Bytes in MiB
InnoDB Buffer Pool Operations in operations/s
QCache Operations in queries/s
QCache Queries in Cache in queries
QCache Free Memory in MiB
QCache Memory Blocks in blocks
MyISAM Key Cache Blocks in blocks
MyISAM Key Cache Requests in requests/s
MyISAM Key Cache Requests in requests/s
MyISAM Key Cache Disk Operations in operations/s
Open Files in files
Opened Files Rate in files/s
Binlog Statement Cache in statements/s
Connection Errors in errors/s
Slave Behind Seconds in seconds
I/O / SQL Thread Running State in bool
Galera Replicated Writesets in writesets/s
Galera Replicated Bytes in KiB/s
Galera Queue in writesets
Galera Replication Conflicts in transactions
Galera Flow Control in ms
Galera Cluster Status in status
Galera Cluster State in state
Galera Number of Nodes in the Cluster in num
Galera Total Weight of the Current Members in the Cluster in weight
Galera Whether the Node is Connected to the Cluster in boolean
Galera Whether the Node is Ready to Accept Queries in boolean
Galera Open Transactions in num
Galera Total Number of WSRep (applier/rollbacker) Threads in num
Users CPU time in percentage
Per user statistics:
Rows Operations in operations/s
Commands in commands/s
Edit the python.d/mysql.conf
configuration file using edit-config
from the Netdata config
directory, which is typically at /etc/netdata
.
cd /etc/netdata # Replace this path with your Netdata config directory, if different
sudo ./edit-config python.d/mysql.conf
You can provide, per server, the following:
ssl connection parameters
Here is an example for 3 servers:
update_every : 10
priority : 90100
local:
'my.cnf' : '/etc/mysql/my.cnf'
priority : 90000
local_2:
user : 'root'
pass : 'blablablabla'
socket : '/var/run/mysqld/mysqld.sock'
update_every : 1
remote:
user : 'admin'
pass : 'bla'
host : 'example.org'
port : 9000
If no configuration is given, the module will attempt to connect to MySQL server via a unix socket at
/var/run/mysqld/mysqld.sock
without password and with username root
or netdata
(you granted permissions for netdata
user in the Requirements section of this document).
userstats
graph works only if you enable the plugin in MariaDB server and set proper MySQL privileges (SUPER or
PROCESS). For more details, please check the MariaDB User Statistics
page