Created
June 23, 2022 07:04
-
-
Save mjf/0e20b2d82700c967fb830eb220fb7149 to your computer and use it in GitHub Desktop.
Telegraf configuration to collect Pressure Stall Information (PSI)
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
# Telegraf configuration to collect Pressure Stall Information (PSI) | |
[[inputs.file]] | |
name_override = "pressure_cpu" | |
# interval = "5s" | |
files = ["/proc/pressure/cpu"] | |
data_format = "grok" | |
grok_patterns = [ | |
"%{NOTSPACE:type:tag} avg10=%{NUMBER:avg10:float} avg60=%{NUMBER:avg60:float} avg300=%{NUMBER:avg300:float} total=%{NUMBER:total:int}" | |
] | |
[[inputs.file]] | |
name_override = "pressure_io" | |
# interval = "5s" | |
files = ["/proc/pressure/io"] | |
data_format = "grok" | |
grok_patterns = [ | |
"%{NOTSPACE:type:tag} avg10=%{NUMBER:avg10:float} avg60=%{NUMBER:avg60:float} avg300=%{NUMBER:avg300:float} total=%{NUMBER:total:int}" | |
] | |
[[inputs.file]] | |
name_override = "pressure_memory" | |
# interval = "5s" | |
files = ["/proc/pressure/memory"] | |
data_format = "grok" | |
grok_patterns = [ | |
"%{NOTSPACE:type:tag} avg10=%{NUMBER:avg10:float} avg60=%{NUMBER:avg60:float} avg300=%{NUMBER:avg300:float} total=%{NUMBER:total:int}" | |
] |
On other distros ensure that /proc/pressure/*
exists. If not then grep PSI /path/to/kernel/config
. If enabled the default may be off. Enable it by psi=1
on Linux command line (in Grub etc.) and reboot.
The feature is present on Linux v4.20 on.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On RHEL-based distros rename the file to
/etc/telegraf/telegraf.d/psi.conf
, test it and reload Telegraf.