Skip to content

pt-mongodb-summary: major improvements and new sections (PT-2368)#1134

Open
yunusuyanik wants to merge 9 commits into
percona:3.xfrom
yunusuyanik:3.x
Open

pt-mongodb-summary: major improvements and new sections (PT-2368)#1134
yunusuyanik wants to merge 9 commits into
percona:3.xfrom
yunusuyanik:3.x

Conversation

@yunusuyanik

Copy link
Copy Markdown
  • [ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant