Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions telegraf/metaslab-alloc-stats.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
#
# Wrapper around "estat metaslab-alloc -jm 10" that filters out metrics whose
# "name" tag contains garbage characters (DLPX-88427). A kernel bug causes
# estat to occasionally emit stat names containing raw memory bytes or C macro
# 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 ,_()/.-]+"'
5 changes: 3 additions & 2 deletions telegraf/telegraf.inputs.playbook
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@
]
json_string_fields = ["iops(/s)", "avg latency(us)", "stddev(us)", "throughput(k/s)", "microseconds"]

# Collect output from "estat metaslab-alloc -jm 10"
# Collect output from "estat metaslab-alloc -jm 10" via wrapper script.
# The wrapper filters out metrics with garbage "name" tags (DLPX-88427).
[[inputs.execd]]
command = ["estat", "metaslab-alloc", "-jm", "10"]
command = ["/etc/telegraf/metaslab-alloc-stats.sh"]
name_override = "estat_metaslab-alloc"
signal = "none"
restart_delay = "30s"
Expand Down
Loading