-
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
Inputs.win_perf_counters.object sends one counter per interval #2895
Comments
The following diff fixes this problem. That is, it collects counters for each instance, rather then one at a time. The description in the issue is a bit ambiguous: Currently all counters are indeed measured, but, for example, measuring 8 counters on 8 cores will give 64 messages, rather than 8 messages (each with 8 fields). This diff fixes that problem. I'm new to go, so feel free to tidy up. @danielnelson Do I need to sign the CLA or is this snippet small enough not to worry?
|
Thanks @cdjc, you will need to sign the CLA still, can you open this as a pull request as well? |
I can sign the CLA, but I've never done a pull request before, so I'll have to figure it out. I did briefly look at what was required for a pull request, but it just seemed so much more complicated than posting a diff. |
I can create the PR if your not setup for it. If you have git running though can you create the diff using: |
I have the patch file. Should I attach it here, or wait until you have set up the pull request? |
Attach it here please |
0001-Fix-win_perf_counters-to-collect-counters-per-instan.zip Here it is (zipped, as .patch aren't allowed to be uploaded). |
Bug report
When using an "inputs.win_perf_counters.object" where you are collecting multiple counters you will only see a single counter collected at each interval. For example, the PhysicalDisk Object collects 8 counters, however it only collects one of them per interval. This removes the ability to correlate performance data.
Relevant telegraf.conf:
[agent]
interval = "5s"
round_interval = true
metric_buffer_limit = 1000
flush_buffer_when_full = true
flush_interval = "5s"
flush_jitter = "0s"
[[outputs.influxdb]]
precision = "s"
[[inputs.win_perf_counters.object]]
ObjectName = "PhysicalDisk"
Instances = ["*"]
Counters = [
"Disk Read Bytes/sec",
"Disk Write Bytes/sec",
"Current Disk Queue Length",
"Disk Reads/sec",
"Disk Writes/sec",
"% Disk Time",
"% Disk Read Time",
"% Disk Write Time",
]
Measurement = "win_diskio"
System info:
Influx and Grafana on CentOS 7, telegraf on Windows Server 2012. Tested with telegraf version 1.3.1 and 1.0.0 beta 3.
Steps to reproduce:
SELECT Current_Disk_Queue_Length as "C: Current Queue Length", Disk_Reads_persec as "C: Read/Sec", Disk_Writes_persec as "C: Writes/Sec" FROM "win_diskio" WHERE "host" = '' AND "instance" = '0 C:'
Expected behavior:
All counters should be collected with every interval
Actual behavior:
One counter is collected in each interval
The text was updated successfully, but these errors were encountered: