Skip to content

DLPX-88427 Filter garbage stat names from estat metaslab-alloc output#120

Closed
dbshah12 wants to merge 1 commit into
developfrom
DLPX-88427
Closed

DLPX-88427 Filter garbage stat names from estat metaslab-alloc output#120
dbshah12 wants to merge 1 commit into
developfrom
DLPX-88427

Conversation

@dbshah12

Copy link
Copy Markdown

Summary

  • Wraps estat metaslab-alloc -jm 10 in /etc/telegraf/metaslab-alloc-stats.sh that filters JSON lines whose name tag contains non-printable or non-standard characters
  • Updates telegraf.inputs.playbook to invoke the wrapper script instead of calling estat directly
  • Fixes DLPX-88427: a kernel bug causes estat to occasionally emit stat names containing raw memory bytes or C macro strings, producing unreadable metrics in Telegraf/InfluxDB

Test plan

  • Verify Telegraf picks up metaslab-alloc-stats.sh and collects estat_metaslab-alloc metrics normally
  • Confirm that any lines with garbage name tags are dropped and do not appear in output

🤖 Generated with Claude Code

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>
dbshah12 added a commit that referenced this pull request Jun 12, 2026
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>
@dbshah12 dbshah12 requested a review from prakashsurya June 12, 2026 06:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh to wrap estat metaslab-alloc -jm 10 and filter out records with non-whitelisted name values.
  • Updated telegraf/telegraf.inputs.playbook to invoke the wrapper script instead of calling estat directly 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 ,_()/.-]+"'
@sebroy

sebroy commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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...

@dbshah12

Copy link
Copy Markdown
Author

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.

@dbshah12 dbshah12 closed this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants