Skip to content

Commit

Permalink
Do not repeat "leases" in metric name
Browse files Browse the repository at this point in the history
  • Loading branch information
DRuggeri committed Apr 25, 2020
1 parent d2cb972 commit 0d629fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ Flags:
This 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.

```
dhcpd_leases_stats_valid_leases - The number of leases in dhcpd.leases that have not yet expired.
dhcpd_leases_stats_expired_leases - The number of leases in dhcpd.leases that have expired.
dhcpd_leases_stats_valid - The number of leases in dhcpd.leases that have not yet expired.
dhcpd_leases_stats_expired - The number of leases in dhcpd.leases that have expired.
dhcpd_leases_stats_count - The number of leases in dhcpd.leases
dhcpd_leases_stats_scrapes_total - Total number of scrapes for stats.
dhcpd_leases_stats_scrape_errors_total - Total number of scrapes errors for stats.
Expand Down
4 changes: 2 additions & 2 deletions collectors/stats_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func NewStatsCollector(namespace string, info *dhcpdleasesreader.DhcpdInfo) *Sta
prometheus.GaugeOpts{
Namespace: namespace,
Subsystem: "stats",
Name: "valid_leases",
Name: "valid",
Help: "The number of leases in dhcpd.leases that have not yet expired.",
},
)
Expand All @@ -35,7 +35,7 @@ func NewStatsCollector(namespace string, info *dhcpdleasesreader.DhcpdInfo) *Sta
prometheus.GaugeOpts{
Namespace: namespace,
Subsystem: "stats",
Name: "expired_leases",
Name: "expired",
Help: "The number of leases in dhcpd.leases that have expired.",
},
)
Expand Down

0 comments on commit 0d629fd

Please sign in to comment.