node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

Replace netstat parsers with procfs netstat parsers

Open nikakis opened this issue 2 years ago • 10 comments

Replace this parsers in node exporter with this ones from procfs.

nikakis avatar Apr 03 '22 16:04 nikakis

@discordianfish Can you please assign this to me, i will start working on it asap.

nikakis avatar Apr 05 '22 10:04 nikakis

@discordianfish @SuperQ I think we should consider refactoring the types of the metrics on the procfs side here, here and here from float64 to *float64 because we need to have a value only for the metrics provided by the current system. And afterwards check on the node_exporter side here if the value is not nil and feed it to the channel.

What do you think about this?

nikakis avatar May 03 '22 14:05 nikakis

I think this is reasonable

discordianfish avatar Jun 07 '22 10:06 discordianfish

Any progress on getting this resolved?

jcpunk avatar Nov 16 '22 16:11 jcpunk

@jcpunk Yes, I will work on it during the next days.

nikakis avatar Nov 17 '22 09:11 nikakis

Hey @nikakis, any chance I can take this issue? I would like to give this a shot.

guerzon avatar Nov 05 '23 14:11 guerzon

Go for it.

SuperQ avatar Nov 05 '23 14:11 SuperQ

hi, i've been exploring and using prometheus exporters as of late and would love to contribute some fixes etc to this project (learning stuff along the way). I think no one's actively working on this issue right now and would like to take this up.

I have a question about this issue tho: I've looked into the relevant parts of both the codebases and read up about the proc filesystem and it seems like the mentioned prometheus/procfs netstat parsers currently require a PID and are process specific, as in they're only made to parse /proc/<pid>/net/netstat and not the overall /proc/net/netstat which is what the node_exporter currently uses. And I think these two can vary if the process is in a different network namespace?

p.s. this is my first time learning about these concepts and contributing to Golang / cloud projects in general so there are chances I might've missed something

exitflynn avatar Feb 03 '24 15:02 exitflynn