mtools does not parse MongoDB 4.4+ JSON logs. So I built mdbkit
说明与用途
mdbkit 替代了旧版 mtools,帮助 MongoDB 运维人员快速解析结构化 JSON 日志,识别最耗费资源的查询模式,获取确定性的索引建议,并构建事件时间线,全部无需连接数据库。
问题
MongoDB 4.4+ changed log format to structured JSON, breaking legacy mtools (mloginfo, mplotqueries) and leaving operators with fragile grep/jq pipelines.
结果
Operators can quickly identify the most costly query shapes, receive concrete index suggestions, and reconstruct incident timelines—all from local log files, without any network access.
工作流
- 1. Run
mdbkit queries /var/log/mongodb/mongod.logto list slow query shapes and their impact. - 2. Run
mdbkit advise /var/log/mongodb/mongod.logto get deterministic index recommendations with confidence scores. - 3. Run
mdbkit triage /var/log/mongodb/mongod.logto build an incident timeline of elections, rollbacks, stalls, etc.
证据
mtools does not parse MongoDB 4.4+ JSON logs. So I built mdbkit.
mdbkit reads log files you hand it. It is strictly read only.
- 记录日期: 2026-09-06T01:21:44.868Z