kea-exporter icon indicating copy to clipboard operation
kea-exporter copied to clipboard

fix: change packets metrics to counter

Open M0NsTeRRR opened this issue 11 months ago • 3 comments

fix: #52

This PR is based on my interpretation of metrics from the documentation, as the descriptions for some metrics are not very clear.

Based on :

  • https://kea.readthedocs.io/en/kea-2.5.6/arm/dhcp4-srv.html#statistics-in-the-dhcpv4-server
  • https://kea.readthedocs.io/en/kea-2.5.6/arm/dhcp6-srv.html#statistics-in-the-dhcpv6-server

M0NsTeRRR avatar Mar 24 '24 15:03 M0NsTeRRR

I think it looks good. @mweinelt will have to check and provide feedback.

Qwiko avatar Mar 25 '24 09:03 Qwiko

Sorry for not getting back to you. I'm not super convinced about the overflow handling. Is that really something we have to handle ourselves, or does the client library offer some functionality here?

mweinelt avatar Jun 11 '24 12:06 mweinelt

No problems :)

Regarding the overflow, it's something we need to address if we want to handle certain cases. We have two choices:

  • Don't handle counter resets as we can't catch them all the time.
  • Handle them with some logic, which I think should catch most of the cases (current implementation).

The library doesn't deal with counter resets; we have to trigger it ourselves. See https://github.com/prometheus/client_python/issues/995.

M0NsTeRRR avatar Jun 11 '24 12:06 M0NsTeRRR