-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Win_PerfCounters: Graphite output for dotted counter names #5173
Comments
I haven't tried it, but it should be possible to replace any dots with another character using a strings processor: [[processors.strings]]
namepass = "win_disk"
[[processors.strings.replace]]
field = "*"
old = "."
new = "_" At some point, I would like to have Let me know if this works. |
Thanks I've tried several ways using measurement instead of field and such but somehow can't get it to work :-( Server is still producing something like this:
My config:
|
Sorry, I gave you bad advice, the strings processor only works on the field values and cannot rename the field key. Also, I believe the only way to do this is with the rename processor. It doesn't support substring replacement, so you would need one rule per field: [[processors.rename]]
namepass = ["win_disk"]
[[processors.rename.replace]]
field = "Avg._Disk_sec/Write"
dest = "Avg_Disk_sec/Write"
[[processors.rename.replace]]
field = "Avg._Disk_sec/Transfer"
dest = "Avg_Disk_sec/Transfer" |
Thank you, that's amazing! Exactly what I wanted: I refined your version a bit:
Should I close the issue or leave it open as a ref for the "snake_case" fix you mentioned? |
Let's close this issue, I opened another one for the style change #5196. |
Hi there,
is there a solution/workaround/recommended procedure for dotted performance counter names like:
"Avg. Disk sec/Read", "Avg. Disk sec/Write", "Avg. Disk sec/Transfer",
Due to the dot/full stop in the counter name an additional metric level is introduced when writing such Telegraf input data to a Graphite/Carbon database.
To better visualize the problem see screenshot:
In my view it should be
"Avg_Disk_sec-Read"
,"Avg_Disk_sec-Transfer"
and"Avg_Disk_sec-Write"
as a whole.This additional level makes it difficult to properly parse/generate variables from the metrics in Grafana.
The text was updated successfully, but these errors were encountered: