DLPX-88427 Filter garbage stat names from estat metaslab-alloc output#120
DLPX-88427 Filter garbage stat names from estat metaslab-alloc output#120dbshah12 wants to merge 1 commit into
Conversation
Wraps estat metaslab-alloc in a shell script that drops JSON lines whose "name" tag contains non-standard characters (backslashes, hashes, etc.). A kernel bug (DLPX-88427) causes estat to occasionally emit stat names containing raw memory bytes or C macro strings, producing unreadable metrics. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The metaslab-alloc wrapper script and telegraf.inputs.playbook change are unrelated to the InfluxDB infrastructure work in this PR. Moved to a dedicated PR (#120) under DLPX-88427. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR mitigates occasional corrupted estat metaslab-alloc -jm 10 metric names (DLPX-88427) by introducing a wrapper script that filters out JSON records with invalid/garbage name tags, and wiring Telegraf to use that wrapper for the metaslab-alloc input.
Changes:
- Added
telegraf/metaslab-alloc-stats.shto wrapestat metaslab-alloc -jm 10and filter out records with non-whitelistednamevalues. - Updated
telegraf/telegraf.inputs.playbookto invoke the wrapper script instead of callingestatdirectly for metaslab-alloc collection.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| telegraf/telegraf.inputs.playbook | Switches metaslab-alloc collection to use the new wrapper script. |
| telegraf/metaslab-alloc-stats.sh | New wrapper script that filters out corrupted/garbage name tags from JSON output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # strings. Only names consisting of printable ASCII letters, digits, spaces, | ||
| # and common punctuation are passed through. | ||
| # | ||
| estat metaslab-alloc -jm 10 | grep -E '"name":"[A-Za-z0-9 ,_()/.-]+"' |
|
This is a bug in the estat code that should be fixed there. It should not be papered over by wrapping by a script that hides the bug... |
Sorry, left to close this PR, I raised PR #121 for fixing the root. |
Summary
estat metaslab-alloc -jm 10in/etc/telegraf/metaslab-alloc-stats.shthat filters JSON lines whosenametag contains non-printable or non-standard characterstelegraf.inputs.playbookto invoke the wrapper script instead of callingestatdirectlyestatto occasionally emit stat names containing raw memory bytes or C macro strings, producing unreadable metrics in Telegraf/InfluxDBTest plan
metaslab-alloc-stats.shand collectsestat_metaslab-allocmetrics normallynametags are dropped and do not appear in output🤖 Generated with Claude Code