how to monitor mysql

15
Jorge Salamero Sanz <[email protected]> 29 October 2015

Upload: server-density

Post on 14-Apr-2017

24.042 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: How to Monitor MySQL

Jorge Salamero Sanz <[email protected]>

29 October 2015

Page 2: How to Monitor MySQL
Page 3: How to Monitor MySQL
Page 4: How to Monitor MySQL

obviously ;-)

WhenProcess_count (/usr/sbin/mysqld)

!= 1alert

Page 5: How to Monitor MySQL

● 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

Is MySQL available?

● Uptime● Threads_connected● Connection usage %● Aborted_connects

Page 7: How to Monitor MySQL

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

Are queries actually being run?

● Questions/s● Queries/s● Read/Writes● Commands

Page 9: How to Monitor MySQL

The bad queries (not necessarily):

● Slow_queries● Select_full_join● Created_tmp_disk_tables● Full table scans

Page 10: How to Monitor MySQL

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

$ mysql$ mysqladmin$ innotop$ mysqlreport

Page 12: How to Monitor MySQL

Percona Monitoring Plugins

● Nagios, Cacti, Zabbix● can be used as CLI tools together

with Percona Toolkit

Page 13: How to Monitor MySQL
Page 14: How to Monitor MySQL
Page 15: How to Monitor MySQL