pt-mongodb-summary: major improvements and new sections (PT-2368)#1134
Open
yunusuyanik wants to merge 9 commits into
Open
pt-mongodb-summary: major improvements and new sections (PT-2368)#1134yunusuyanik wants to merge 9 commits into
yunusuyanik wants to merge 9 commits into
Conversation
yunusuyanik
commented
Jun 11, 2026
- [ Yes] The contributed code is licensed under GPL v2.0
- [Yes ] Contributor Licence Agreement (CLA) is signed
- [ N/A Go code] util/update-modules has been ran
- [ Yes] Documentation updated
- [ Yes] Test suite update
…r, ShardsInfo sections - New output sections: OS production checks, database inventory, opcount deltas (10s sample), WiredTiger cache metrics, shards list - Arbiter-aware: skip oplog/runningops/statusdelta on arbiter nodes - Robust proc info: downgrade errors to debug in restricted environments - Oplog template now shows all replica nodes (min/max host) - ParsedConfig stored on hostInfo for cmdline template use
- Fix oplog Size field: was storing raw bytes (collStats.Size), now stores MaxSize/1024/1024 so template displays correct MB value - Reorder output: host → OS checks → config → security → replication → sharding → db inventory → running ops → status delta → wiredtiger
…PT-2368) - Replace pborman/getopt with kong via config.Setup() — enables config file support (~/.pt-mongodb-summary.conf, /etc/percona-toolkit/) - cliOptions now uses kong struct tags with defaults - AfterApply() handles: version print, log level, version check, password prompt, positional host[:port] parsing, flag conflict checks - Fix AuthDB flag never being applied to MongoDB auth credentials - Fix AuthDB not overriding URI authSource (URI takes precedence) - Rewrite TestParseFlags as TestAfterApply using direct AfterApply() calls - Remove pborman/getopt import entirely
Unit field was %-3s but "bytes" is 5 chars, causing Collections/Indexes columns to shift right. Changed to %-5s and use single printf per row for guaranteed alignment between header and data.
html/template escapes + as &percona#43; in plain text output. Switch to text/template — no HTML escaping needed here.
…m sections - FCV from getParameter shown in host section next to Version - Connections section: current/available/totalCreated + maxIncoming from config - Profiling: slow op threshold (ms) and mode from getCmdLineOpts - tcmalloc subsection in WiredTiger: heap, allocated, pageheap free/unmapped, thread cache free (from serverStatus.tcmalloc) - TTL Indexes column in Database Inventory (counts TTL indexes per database) - Change Stream section: preAndPostImages expireAfterSeconds from getParameter - Proto: add OperationProfiling to cmdlineopts.Parsed; add TcmallocStats to ServerStatus
- Add ptDebugf() helper: PTDEBUG=1 prints # file:line pid message to stderr, matching pt-archiver's _d() pattern for diagnosing slow collection steps - Sprinkle ptDebugf calls at every collection stage so PTDEBUG=1 shows exactly where time is spent (connect, hostInfo, opCounters, etc.) - Extend proto.Parsed with Config, OperationProfiling, WiredTiger cache size, LogAppend to decode getCmdLineOpts fields that were previously missing - Show new fields in cmdline template: config file, WT cache size, key file, log path, log append, max incoming conns, profiling mode, slow op threshold
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.