systemd_exporter icon indicating copy to clipboard operation
systemd_exporter copied to clipboard

Fixup metrics for socket_refused_connections

Open hamiltont opened this issue 5 years ago • 3 comments

systemd_socket_refused_connections_total is named as though it's a counter. However, it's not a counter, it's a gauge. Either rename or internally make it a counter

hamiltont avatar Jan 30 '20 14:01 hamiltont

Looks like this is also an issue in Node exporter

https://github.com/prometheus/node_exporter/blob/2477c5c67dff7e7655a9d466450235e9c9eac193/collector/systemd_linux.go#L306-L308

povilasv avatar Feb 03 '20 13:02 povilasv

I think it needs to be a counter not an gauge

as looking at the code, stuff gets incremented:

https://github.com/systemd/systemd/blob/de5ae832f26cc9b049ee28b61df816669a69e306/src/core/socket.h#L70 https://github.com/systemd/systemd/blob/7c286cd6a615fa9bce8a2830133bcf89becfbf9f/src/core/socket.c#L2659

povilasv avatar Feb 03 '20 13:02 povilasv

Currently PR in progress https://github.com/povilasv/systemd_exporter/pull/10

povilasv avatar Feb 06 '20 07:02 povilasv