Skip to content
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

Convert the tcp collector to use perflib and support TCPv6 counters #615

Merged
merged 3 commits into from
Oct 19, 2020

Conversation

mallenLF
Copy link
Contributor

@mallenLF mallenLF commented Oct 8, 2020

Using perflib is substantially faster and more reliable than using WMI to
retrieve Windows performance counter data.

TCP over IPv6 is distinguished from IPv4 traffic by means of an "af" label
to denote the address family, which will be "ipv4" for TCP over IPv4,
corresponding to the TCPv4 performance object, and "ipv6" for TCP over
IPv6, corresponding to the TCPv6 performance object.

Signed-off-by: Michael Allen MAllen@laserfiche.com

Using perflib is substantially faster and more reliable than using WMI to
retrieve Windows performance counter data.

Signed-off-by: Michael Allen <MAllen@laserfiche.com>
@mallenLF
Copy link
Contributor Author

mallenLF commented Oct 8, 2020

I also have a commit in my local tree to write TCPv6 counters with labels af="ipv4" and af="ipv6" to distinguish between the TCPv4 and TCPv6 performance objects. However, this would be an incompatible change so I decided to leave it out of this PR. But I can push that commit if interested.

Signed-off-by: Michael Allen <MAllen@laserfiche.com>
@carlpett
Copy link
Collaborator

Nice @mallenLF! Regarding TCPv6, I'm fine with adding that in as well with the label. It'll make the results more precise, and those who need to distinguish between protocols can then do so.
Also, could you please update the collector docs with it using Perflib rather than WMI?
Thanks!

Note that TCPv6 metrics are now exported, and there is a new label, `af`.

Signed-off-by: Michael Allen <MAllen@laserfiche.com>
@mallenLF mallenLF changed the title Convert the tcp collector to use perflib instead of WMI Convert the tcp collector to use perflib and support TCPv6 counters Oct 10, 2020
@mallenLF
Copy link
Contributor Author

Nice @mallenLF! Regarding TCPv6, I'm fine with adding that in as well with the label. It'll make the results more precise, and those who need to distinguish between protocols can then do so.
Also, could you please update the collector docs with it using Perflib rather than WMI?
Thanks!

I pushed commits to export the TCPv6 counters and to update the docs for the tcp collector.

Copy link
Collaborator

@carlpett carlpett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@carlpett carlpett merged commit 7a5dc3c into prometheus-community:master Oct 19, 2020
anubhavg-icpl pushed a commit to anubhavg-icpl/windows_exporter that referenced this pull request Sep 22, 2024
Convert the tcp collector to use perflib and support TCPv6 counters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants