problem with accented characters in counters: possibility to change the metrics name?
daks opened this issue · 4 comments
Hello,
I discovered your scripts which seems to suit my needs, but I found a problem in my situation: we use localized versions of Windows (French) and Windows performance counters names are translated in French, we got for example "\Mémoire\Mégaoctets disponibles" or "Mémoire\Écritures de pages/s"
Counters are retrieved well and sent correctly to Graphite, the problem is not here. The problem is directly with graphite (or another frontend like Grafana): metrics with accented characters can't be displayed.
I thought my problem could be solved just by indicating the counter name i want to retrieve AND the metrics name associated. Is it actually possible to do it? Or could it be added to your code?
Thanks for your code.
So it appears that performance counters are localized so this script can only work on US systems.
I see two solutions:
- extends the XML schema to indicate counter name AND the metric name to send to Graphite
- use a function to translate from US name to ID to localized name. This one http://www.powershellmagazine.com/2013/07/19/querying-performance-counters-from-powershell/ seems to do exactly that but I hadn't test it yet
What do you think about it?
Hi @daks - thanks for doing some research into the issue.
I like the idea of extending the XML schema, there might be times where people don't like the metric names the ConvertTo-GraphiteMetric
function spits out, so this could potentially kill 2 birds with one stone.
This doesn't appear it will be too complex, I will work on it.
This has been addressed by release v1.2.0
https://github.com/MattHodge/Graphite-PowerShell-Functions/releases/tag/v1.2.0
Seems to work well, thanks.