The role of monitoring
Business / Database Service is available
Can external services
In the process allows, but did not listen to the network, or does not properly authorized, or network failure
We can not only monitor the process starts or not, whether to listen to the network
Best simulate the business logic to monitor
In addition to the business logic to complete availability monitoring can also monitor data reliability
Data reliability
Whether the service is reliable data
Service is available, does not mean the data is correct
Possible misuse delete data, or other unexpected causes of data loss
Or master-slave replication latency, leading to the latest data can not be read from the server to the
By pseudo-random business logic to verify the reliability of data
Server & MySQL instances appear high debt
Service is available, but the response is slow, in fact, equal unavailable
When the response is very slow, impatient users have been refreshed, more likely to cause a storm
When the entire system needs immediate attention long response, the number of transactions per second
Monitoring can focus on the current availability of historical data and trends
Availability warning
Historical Trend
Learn online computing resource usage
As computing resources expansion / contraction reference
As a result of the optimization work records show
Performance through real-time transaction data change the perception of changes in the business
Whether the database server performance trends to determine adequate resources
Monitoring of key indicators
Normal operation Summary
CPU: %user, %sys, %idel, %iowait
Memory: free, cached, swap, and if there is a memory leak OOM
I / O: iops, throughput, latency, utilization (% util)
NIC: Throughput (packet transceiver frequency of particular concern)
System monitoring
General Tools
top, free, ps ,df
sysstat (sar,mpstat, iostat) \ dstat \ iotop
sar -u cpu state
sar -d disk state
iostat -dkx / dmx
mpstat view cpu interrupt uneven mpstat -I SUM -P ALL 1 10 (if not interrupted balanced Description Hard network card default binding to a certain cpu, cpu can use all changed)
netstat, ethstatus, arping
Other tools
perf
pstack