云日志服务 LTS-云数据库GeminiDB Mongo接入LTS:GeminiDB Mongo慢日志结构化模板日志详情
GeminiDB Mongo慢日志结构化模板日志详情
- GeminiDB Mongo慢日志示例
表3 结构化模板示例 模板名称
示例日志
GeminiDB Mongo慢日志
{"log_type":"slow_log","log_time":"2022-08-20T10:04:03.204000Z","namespace":"data0820.table","database":"data0820","collection":"table","operate_type":"insert","docs_scanned":0,"docs_returned":0,"n_deleted":0,"n_matched":0,"n_modified":0,"n_inserted":10,"cost_time":555,"lock_time":0,"whole_message":{"op":"insert","ns":"data0820.usrtable","command":"{N}","ninserted":1,"keysInserted":1,"numYield":0,"locks":{"Global":{"acquireCount":{"r":5,"w":5}},"Database":{"acquireCount":{"w":4,"W":1}},"Collection":{"acquireCount":{"w":2}},"oplog":{"acquireCount":{"w":2}}},"responseLength":230,"protocol":"op_msg","millis":555,"ts":{"$date":1660989843204},"client":"192.168.0.64","appName":"MongoDBShell","allUsers":[{"user":"rwuser","db":"admin"}],"user":"rwuser@admin"},"instance_id":"5b67dc63ba824145aae1f12ff51e58b8in02","node_id":"686a791e690e4db3af591ec4b6f72916no02"}
- 结构化字段及字段说明
表4 结构化字段 字段
示例
描述
类型
log_type
slow_log
日志类型
string
log_time
2022-08-20T10:04:03.204000Z
慢日志产生的时间
string
namespace
data0820.table
命名空间
string
database
data0820
库名称
string
collection
table
表名称
string
operate_type
insert
操作类型
string
docs_scanned
0
数据库扫描行数
long
docs_returned
0
查询返回结果行数
long
n_deleted
0
删除行数
long
n_matched
0
更新匹配行数
long
n_modified
0
实际更新行数
long
n_inserted
10
插入行数
long
cost_time
555
操作花费的时间
long
lock_time
0
wait_lock的时间
long
whole_message
{"op":"insert","ns":"data0820.usrtable","command":"{N}","ninserted":1,"keysInserted":1,"numYield":0,"locks":{"Global":{"acquireCount":{"r":5,"w":5}},"Database":{"acquireCount":{"w":4,"W":1}},"Collection":{"acquireCount":{"w":2}},"oplog":{"acquireCount":{"w":2}}},"responseLength":230,"protocol":"op_msg","millis":555,"ts":{"$date":1660989843204},"client":"192.168.0.64","appName":"MongoDBShell","allUsers":[{"user":"rwuser","db":"admin"}],"user":"rwuser@admin"}
原始日志信息
string
instance_id
5b67dc63ba824145aae1f12ff51e58b8in02
实例ID
string
node_id
686a791e690e4db3af591ec4b6f72916no02
节点ID
string