[global_tags]
[agent]
interval = "15s"
round_interval = true
metric_buffer_limit = 1000
flush_buffer_when_full = true
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
debug = false
quiet = true
logfile = ""
hostname = ""
[[outputs.influxdb]]
urls = ["http://
database = "
precision = "s"
timeout = "5s"
username = "
password = "
user_agent = "win_telegraf"
[[inputs.win_perf_counters]]
[[inputs.win_perf_counters.object]]
ObjectName = "Processor Information"
Instances = [""]
Counters = [
"% Privileged Time",
"% User Time",
]
Measurement = "win_cpu"
# Set to true to include _Total instance when querying for all ().
IncludeTotal=true
[[inputs.win_perf_counters.object]]
ObjectName = "PhysicalDisk"
Instances = ["*"]
Counters = [
"Current Disk Queue Length",
]
Measurement = "win_diskio"
Windows 7 64 Bit - German
Telegraf v1.7.0~rc1 (git: release-1.7 27cd582f)
C:\Program Files\InfluxData\Telegraf>telegraf.exe --config "C:\Program Files\InfluxData\Telegraf\telegraf.conf" --test
win_cpu,host=Desktop1,instance=_Total,objectname=Processor\ Information Percent_Privileged_Time=45.741241455078125 1528291388000000000
win_cpu,host=Desktop1,instance=0\,_Total,objectname=Processor\ Information Percent_Privileged_Time=45.741241455078125 1528291388000000000
win_cpu,host=Desktop1,instance=0\,1,objectname=Processor\ Information Percent_Privileged_Time=43.41542053222656 1528291388000000000
win_cpu,host=Desktop1,instance=0\,0,objectname=Processor\ Information Percent_Privileged_Time=48.067073822021484 1528291388000000000
win_cpu,host=Desktop1,instance=_Total,objectname=Processor\ Information Percent_User_Time=6.956737518310547 1528291388000000000
win_cpu,host=Desktop1,instance=0\,_Total,objectname=Processor\ Information Percent_User_Time=6.956737518310547 1528291388000000000
win_cpu,host=Desktop1,instance=0\,1,objectname=Processor\ Information Percent_User_Time=9.275643348693848 1528291388000000000
win_cpu,host=Desktop1,instance=0\,0,objectname=Processor\ Information Percent_User_Time=4.637821674346924 1528291388000000000
win_diskio,host=Desktop1,instance=0\ D:,objectname=PhysicalDisk Current_Disk_Queue_Length=0 1528291388000000000
win_diskio,host=Desktop1,instance=1\ C:,objectname=PhysicalDisk Current_Disk_Queue_Length=0 1528291388000000000
This is an Example of Telegraf Client 1.6 on an German Windows 7. The Output is in English, thats working and fine for us ;-).
Same Config same German Windows 7, but installed Telegraf 1.7 rc1
panic: runtime error: slice bounds out of range
goroutine 23 [running]:
github.com/influxdata/telegraf/plugins/inputs/win_perf_counters.UTF16ToStringArr
ay(0xc0421d4280, 0x127, 0x127, 0xc0422d26dc, 0x0, 0x127)
/go/src/github.com/influxdata/telegraf/plugins/inputs/win_perf_counters/
performance_query.go:185 +0x1b7
github.com/influxdata/telegraf/plugins/inputs/win_perf_counters.(PerformanceQue
ryImpl).ExpandWildCardPath(0xc0422d2128, 0xc0422d7940, 0x3d, 0x3d, 0x0, 0x0, 0xc
04208d410, 0x2a)
/go/src/github.com/influxdata/telegraf/plugins/inputs/win_perf_counters/
performance_query.go:131 +0x152
github.com/influxdata/telegraf/plugins/inputs/win_perf_counters.(Win_PerfCounte
rs).AddItem(0xc04222b960, 0xc04208d410, 0x2a, 0xc042079e17, 0x1, 0xc042079e61, 0
xa, 0x2171100, 0x0, 0x0)
/go/src/github.com/influxdata/telegraf/plugins/inputs/win_perf_counters/
win_perf_counters.go:157 +0x109
github.com/influxdata/telegraf/plugins/inputs/win_perf_counters.(Win_PerfCounte
rs).ParseConfig(0xc04222b960, 0x0, 0x0)
/go/src/github.com/influxdata/telegraf/plugins/inputs/win_perf_counters/
win_perf_counters.go:202 +0x20a
github.com/influxdata/telegraf/plugins/inputs/win_perf_counters.(Win_PerfCounte
rs).Gather(0xc04222b960, 0x1824b80, 0xc0423d9e80, 0x0, 0x0)
/go/src/github.com/influxdata/telegraf/plugins/inputs/win_perf_counters/
win_perf_counters.go:235 +0x103
github.com/influxdata/telegraf/agent.(Agent).Test(0xc042098510, 0x0, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:206 +0x307
main.reloadLoop(0xc042146180, 0x2197ea8, 0x0, 0x0, 0x2197ea8, 0x0, 0x0, 0x2197ea
8, 0x0, 0x0, ...)
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:136 +0xc
b7
main.(program).run(0xc0421e67e0)
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:215 +0xd
b
created by main.(*program).Start
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:210 +0x4
6
On a german os the return values can contain special chars like "ä,ö,ü,...", see Screenshot..

Thanks for the report, I think we may need @korservick's language fix: https://github.com/influxdata/telegraf/pull/4210/files/99998e655542a52d7ba5fa7b2566f10ca0b1bdae#diff-ac01bacfaabd4b27ee3d7043a8383a11
... the difference between version 1.6 and 1.7 is that with 1.6 the os language is ignored and all data get back in english. Is there a switch to configure the old behavior, like however which language, all data get back in english ?
It looks like the PreVistaSupport option that used to control this no longer is used, and the detection which is supposed to favor the english counters must not be working. We should fix the PreVistaSupport option to force localized names and fix the english counter check.
@vlastahajek Is this something you have time to work on before the 1.7.0 release (early next week)?
Sure, I'll look at this. But the PreVistaSupport should not influence that. In the config above it is not used and it was false by default, considering the config is complete.
Even with it on, I guess, it won't work, cause it would skip AddEnglishCounter which is the only way for adding English counter names on non-English Windows.
We will see.
However, my suspicion is that new implementation will return German counter names
In 1.6, PreVistaSupport switched between the two functions, enabling it forced localized counter names:
We should keep this behavior in case anyone does have it set, so that we don't change the name of their metrics when they upgrade.
If it isn't set, such as in this case, the German counter names here seem to indicate that this check for the function it is not working right since the function should be available on Windows 7:
For bonus points if you are able to solve this and still have time, it would be great if we incorporated @korservick multibyte fix linked above along with adding an unit test.
@runningAgain I believe this crash is fixed in 1.7.0-rc3, could you retest?
see ...
with "UseWildcardsExpansion = false"
D:\telegraf>telegraf.exe --config .\telegraf.conf --test
win_diskio,OS=Windows7,host=Desktop1,instance=0\ D:,objectname=PhysicalDisk Avg._Disk_Bytes/Read=0,Avg._Disk_Bytes/Write=0,Avg._Disk_Queue_Length=0,Current_Di
sk_Queue_Length=0,Disk_Read_Bytes_persec=0,Disk_Write_Bytes_persec=0 1528779310000000000
win_diskio,OS=Windows7,host=Desktop1,instance=1\ C:,objectname=PhysicalDisk Avg._Disk_Bytes/Read=0,Avg._Disk_Bytes/Write=4096,Avg._Disk_Queue_Length=0.0006992
307608015835,Current_Disk_Queue_Length=0,Disk_Read_Bytes_persec=0,Disk_Write_Bytes_persec=12284.3173828125 1528779310000000000
with "UseWildcardsExpansion = true"
D:\telegraf>telegraf.exe --config .\telegraf.conf --test
win_diskio,OS=Windows7,host=Desktop1,instance=0\ D:,objectname=Physikalischer\ Datenträger Aktuelle_Warteschlangenlänge=0,Bytes_gelesen/s=0,Bytes_geschrieben/
s=0,Durchschnittl._Warteschlangenlänge_des_Datenträgers=0,Mittlere_Bytes/Lesevorgang=0,Mittlere_Bytes/Schreibvorgang=0 1528779336000000000
win_diskio,OS=Windows7,host=Desktop1,instance=1\ C:,objectname=Physikalischer\ Datenträger Aktuelle_Warteschlangenlänge=0,Bytes_gelesen/s=0,Bytes_geschrieben/
s=74774.5625,Durchschnittl._Warteschlangenlänge_des_Datenträgers=0.000699930009432137,Mittlere_Bytes/Lesevorgang=0,Mittlere_Bytes/Schreibvorgang=3559.619140625
1528779336000000000
great fix, thank you very much !