How to Monitor MySQL
-
Upload
server-density -
Category
Technology
-
view
24.043 -
download
1
Transcript of How to Monitor MySQL
![Page 2: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/2.jpg)
![Page 3: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/3.jpg)
![Page 4: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/4.jpg)
obviously ;-)
WhenProcess_count (/usr/sbin/mysqld)
!= 1alert
![Page 5: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/5.jpg)
● Load● CPU● Memory● Swap● Network
● Read/Write requests● IO queue length● Average IO wait● Average R/W time● Read/Write bandwidth
![Page 6: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/6.jpg)
Is MySQL available?
● Uptime● Threads_connected● Connection usage %● Aborted_connects
![Page 7: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/7.jpg)
Typical points of failure:
● Errors in mysql.log● Are logs being rotated?● Deleted files with FD still open?● Enough disk space?
![Page 8: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/8.jpg)
Are queries actually being run?
● Questions/s● Queries/s● Read/Writes● Commands
![Page 9: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/9.jpg)
The bad queries (not necessarily):
● Slow_queries● Select_full_join● Created_tmp_disk_tables● Full table scans
![Page 10: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/10.jpg)
Caches, buffers and locks:
● Innodb_row_lock_waits● Innodb_buffer_pool_wait_free● Open_tables● Long running transactions● Deadlocks
![Page 11: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/11.jpg)
$ mysql$ mysqladmin$ innotop$ mysqlreport
![Page 12: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/12.jpg)
Percona Monitoring Plugins
● Nagios, Cacti, Zabbix● can be used as CLI tools together
with Percona Toolkit
![Page 13: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/13.jpg)
![Page 14: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/14.jpg)
![Page 15: How to Monitor MySQL](https://reader033.fdocuments.net/reader033/viewer/2022050613/5888f05a1a28ab87728b65bf/html5/thumbnails/15.jpg)