Closed astigmata closed 2 days ago
Hi @astigmata
great PR so far! I liked that WMI is not used. But it needs to be restructured a little bit. Do you have an example output of the metrics?
In another PR (#1635), I'm also start to use iphlpapi.dll
to gain informations about routes.
Since the multiple collection may use iphlpapi.dll
, the logic to Windows API should be separated to an dedicated packages, like I did it in https://github.com/prometheus-community/windows_exporter/pull/1635/files
btw. in 99% of all cases, golang.org/x/sys/windows
is an drop-in replacement for syscall, e.g. windows.AF_INET instead syscall.AF_INET
@astigmata After a review, I can take the lint issues, thats fine!
@astigmata After a review, I can take the lint issues, thats fine!
@jkroepke Thank you for the help, it's my first contrib
Oh, you did it very well for the first contribution! :-)
I will leave it open for now, because I would like to deliver some bug-fix only releases in context of 0.29.0, but this PR will be included in the next 0.30.0 release!
Thank you!
Windows API Integration
The program interacts with the Windows API using syscalls to access low-level TCP information:
It loads the iphlpapi.dll library and uses the GetExtendedTcpTable function to retrieve TCP connection information.
The MIB_TCPROW_OWNER_PID struct is defined to represent a row in the TCP connection table.