Edit

IABSD.fr/ports/sysutils/dhcpd_leases_exporter/patches

Branch :

  • Show log

    Commit

  • Author : pascal
    Date : 2025-01-29 17:02:41
    Hash : 3b60cc3a
    Message : This exporter consumes the dhcpd.leases file which is periodically written by the dameon. It has two collectors: The Stats collector counts the number of leases PER UNIQUE IP found in dhcpd.leases. This means that if an IP was leased to client X, but is now leased to client Y, there will be only one entry counted (the most recent one). This is in line with how dhcpd reads the file. The Leases collector will create a vector gague for each client with an active DHCP lease found in dhcpd.leases. Because this collector may produce tons of short-lived vectors depending on how busy DHCPD is, it is disabled by default one nit and ok semarie@

  • patch-dhcpd_leases_exporter_go
  • Index: dhcpd_leases_exporter.go
    --- dhcpd_leases_exporter.go.orig
    +++ dhcpd_leases_exporter.go
    @@ -22,8 +22,8 @@ var Version string
     
     var (
     	dhcpdLeasesFile = kingpin.Flag(
    -		"dhcpd.leases", "Path of the dhcpd.leases file. Defaults to '/var/lib/dhcp/dhcpd.leases' ($DHCPD_LEASES_EXPORTER_LEASES_FILE)",
    -	).Envar("DHCPD_LEASES_EXPORTER_LEASES_FILE").Default("/var/lib/dhcp/dhcpd.leases").String()
    +		"dhcpd.leases", "Path of the dhcpd.leases file. Defaults to '/var/db/dhcpd.leases' ($DHCPD_LEASES_EXPORTER_LEASES_FILE)",
    +	).Envar("DHCPD_LEASES_EXPORTER_LEASES_FILE").Default("/var/db/dhcpd.leases").String()
     
     	filterCollectors = kingpin.Flag(
     		"filter.collectors", "Comma separated collectors to enable (Stats,Leases) ($DHCPD_LEASES_EXPORTER_FILTER_COLLECTORS)",