mysql 慢请求日志
mysql log parser 解析的是 mysql 的慢请求日志。
针对如下一条慢请求日志:
# Time: 2017-12-24T02:42:00.126000Z
# User@Host: rdsadmin[rdsadmin] @ localhost [127.0.0.1] Id: 3
# Query_time: 0.020363 Lock_time: 0.018450 Rows_sent: 0 Rows_examined: 1
SET timestamp=1514083320;
use foo;
SELECT count(*) from mysql.rds_replication_status WHERE master_host IS NOT NULL and master_port IS NOT NULL GROUP BY action_timestamp,called_by_user,action,mysql_version,master_host,master_port ORDER BY action_timestamp LIMIT 1;
可以解析得到的数据为:
{
"SamplePoints": [
{
"Database": "foo",
"Host": "localhost",
"Lock_time": 0.01845,
"Query_time": 0.020363,
"Rows_examined": 1,
"Rows_sent": 0,
"Statement": "SELECT count(*) from mysql.rds_replication_status WHERE master_host IS NOT NULL and master_port IS NOT NULL GROUP BY action_timestamp,called_by_user,action,mysql_version,master_host,master_port ORDER BY action_timestamp LIMIT 1;",
"Timestamp": "2017-12-24T02:42:00Z",
"User": "rdsadmin"
}
]
}
disable_record_errdata
默认为false
,解析失败的数据会默认出现在"pandora_stash"字段,该选项可以禁止记录解析失败的数据。keep_raw_data
默认为false
,配置此选项之后会保留原始数据在raw_data
字段下。
文档反馈
(如有产品使用问题,请 提交工单)