Commit graph

9 commits

Author SHA1 Message Date
Chris Cleeland 1a67c6224a UDP drops should be a counter, not a gauge.
I think it makes sense for "drops" to sit alongside the queue length
gauges in prom stats because they are all neighbors in procfs (source
of these stats).

Moreover, in reading the commit log message for the original creating
work for udp_queues, I think there may have been some misreading or
confusion between the word "state" and the common short-form of
"stats" to mean "statistics".  The original author "chose the name
'udp_queue' instead of 'udpstat' as UDP has no state"; I believe that
'udpstat' might actually be the more appropriate name.

Signed-off-by: Chris Cleeland <chris.cleeland@gmail.com>
2025-01-06 09:58:22 -06:00
Chris Cleeland 5a060c2780 Fix failing docker test.
Don't use a pointer without checking it first.

Signed-off-by: Chris Cleeland <chris.cleeland@gmail.com>
2025-01-06 09:58:22 -06:00
Chris Cleeland 392f9accd6 udp_queues_linux.go: Expose UDP drops via gauge analogous to queue sizes.
Signed-off-by: Chris Cleeland <chris.cleeland@gmail.com>
2025-01-06 09:58:22 -06:00
Ben Kochie 090957658e
Update logging (#3097)
Some checks failed
golangci-lint / lint (push) Has been cancelled
Switch from promlog/go-kit to promslog/slog for logging.
* Update Go build to 1.23.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-09-11 10:51:28 +02:00
Julien Pivotto 68a6c78c0d
Update go to 1.17 (#2159)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-10-03 13:35:24 +02:00
Ben Kochie 3bc9a93c20
Add ErrorLog plumbing to promhttp
Fix the error logging of the promhttp handler by connecting it to the
promlog setup.
* Switch to go-kit/log.
* Cleanup CHANGELOG.

Fixes: https://github.com/prometheus/node_exporter/issues/1886

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-06-03 10:47:41 +02:00
Karsten Weiss b9b1d4e369 udp_queues_linux.go: s/upd/udp/ in two error strings
Signed-off-by: Karsten Weiss <knweiss@gmail.com>
2020-06-29 15:00:15 +02:00
Ben Kochie dfa53f835a
Use Go 1.13 error features
* Use `errors.Is()` for unwrapping errors.
* Use `%w` error verb in internal error formatting.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-06-16 14:47:03 +02:00
Peter Bueschel da5972b539
Add gauges for allocated memory for queued UDP and TCP packages (#1503)
* Two new states will be added to the tcpstat collector called rx_queued_bytes and tx_queued_bytes.

For UDP datagrams an additional collector 'udp_queues' can be used to expose the total lengths of the tx_queue and rx_queue.
@SuperQ and @discordianfish this changes gives us the option to check for overloaded UDP + TCP processing.
The names of the new TCP states and the UDP metric can be discussed.
The current reasons are just:

I don't want to add another collector for the same exposed file, so I just added the new states to the tcpstat collector.
I chose the name 'udp_queue' instead of 'udpstat' as UDP has no state.


Signed-off-by: Peter Bueschel <peter.bueschel@logmein.com>
2020-03-31 10:46:32 +02:00