-
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
Windows: win_perf_counters not gathering non-English metrics #1730
Comments
@Pibeurthss can you try running a test output of telegraf? I'm sorry but I don't have the resources to test windows problems specific to French systems.....I would be surprised that windows would rename the metrics, but there isn't much Microsoft can do that surprises me anymore 😖 🙈 |
It seems there is no metrics... I precise that System Inputs work normally and I can gather them. |
I have the same problem on German version of Windows.
I think it will be problem with all version other than English |
I think so. |
Hello,
I'm trying to gather metrics using the Windows Performance Counters plugin on a Windows 7 64bits localized in French. Problem: the inputs plugin don't extract counters with a quote. My Config file: [[inputs.win_perf_counters]]
PreVistaSupport=false
PrintValid=true
[[inputs.win_perf_counters.object]]
# Processor usage, alternative to native, reports on a per core.
ObjectName = "Processeur"
Instances = ["*"]
Counters = ["% d'inactivité", "% temps d'interruption", "% temps privilégié", "% temps utilisateur", "% temps processeur"]
Measurement = "win_cpu"
#IncludeTotal=false #Set to true to include _Total instance when querying for all (*). I precise i'm on a French system so I had to look for the translated Counters' name and path using PowerShell. Here is the ouput with the test option : PS D:\telegraf> .\telegraf.exe --config D:\telegraf\telegraf_win.fr.conf --test
* Plugin: win_perf_counters, Collection 1
Valid: \Processeur(*)\% temps privilégié
Valid: \Processeur(*)\% temps utilisateur
Valid: \Processeur(*)\% temps processeur Only 3 of 5 counters wanted are listed.
Please note that many counters in French have a quote in their name. You may analyze further with the complete extract of my localized perf counters with the file attached : Regards |
Hello, I ran into the same problem today with:
My config file:
If i executed telegraf with this config, telegraf confirmed the counter as valid with:
but no metric was gathered. I looked into the go code of the win_perf_counters (https://github.com/influxdata/telegraf/blob/master/plugins/inputs/win_perf_counters/win_perf_counters.go) and modified following section:
I changed it to: I think the PdhAddEnglishCounter function doesn't provide a language-neutral way to add performance counters to the query or there are other restrictions that come up. Best Regards. |
Hello, Same problem here... such a pity that all "Windows counters collection" implementations face the same issues with non-English counters... Thanks to fix this! |
I also stumbled across this one on a German server. As the code snippet above shows, you can set When you try to use the English name on a localized system, validation won't let your query be passed to
So I would suggest to remove |
Hi, I'm facing this issue on a Windows 2012 R2 Server, with telegraf 1.0.1. The system is localized in french, and not metrics are forwarded to influxdb. How can we give an help in hand with this issue ? |
we will try to have this fixed in release 1.2, if anyone can submit a PR it would be helpful. FWIW, there is quite an easy workaround, just set |
With the Tell me if I can do anything to help you with feedback from my tests. |
Hi, I can confirm that PreVistaSupport is working but there are counters with special chars (umlauts) which are not being processed. (Total gathered metrics: 0. Total dropped metrics: 0.) Maybe this could be also adressed in release 1.2... Tell me if you need more input. |
Hi,
I tried another one as well and that worked, too. So I do not know what is wrong but I think that the win perf counters can handle special chars. Maybe you can try the win pref counter in my example and analyze if it is working on your system and if it is working you can try the Hyper-V again. Maybe your config-file is wrong at one point. Best regards. |
Hi @Da1den, Thanks for looking into it. Thank you all! |
The metrics are indeed collected with PreVistaSupport set to true. But counters with quotes in their names are still not collected. |
Are quotes in the names a separate issue? |
Hi ! Found the solution for the quotes. You can use curly quote with ALT+0146. In config file, you need to replace all the quotes with curly quotes into the names of Perf Counters. Tested with Telegraf v1.0.0 on Windows Localized in French |
@vsavornin This solution works for me. Thanks for sharing. |
closed by #1944 |
Just to clarify situation: Windows localize the metrics. On non-English Windows, with PreVistaSupport = false it not possible to gather metrics. With PreVistaSupport = true it is possible to gather metrics if configuration use localized name. This is an issue as it's not possible to have a generic configuration file that gather CPU... as processor need to be named "Processor", "Processeur", "Prozessor"... For details of the cause, it's due to the way telegraf add the counter:
I think we should use English name (or at very least offer an option to support English name) instead of localized name. Having to localize the Telegraf configuration for all language seems too complicated :( Sadly this probably means do no validate path (I didn't find any PdhValidatePathEnglish). I will try to come with a PR that don't use PdhValidatePath and see if we could validate path with another way. |
EDIT Oct 25 WORKAROUND: set
PreVistaSupport = true
in your config fileHello,
I'm trying to gather metrics using the Windows Performance Counters plugin.
Problem: no metrics are sent to my influxdb server.
My Config file:
I precise i'm on a French system so I had to look for the translated Counters' name and path using PowerShell.
Here are the print in debug mode:
Any ideas ?
The text was updated successfully, but these errors were encountered: