Skip to content

Commit

Permalink
Fix stats issue
Browse files Browse the repository at this point in the history
Prometheus stats were showing the total stats instead of individual values for each backend
  • Loading branch information
davidcoles committed May 24, 2024
1 parent 5e299f2 commit 60d2bf4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func prometheus(p string, services map[netip.Addr][]Serv, summary Summary, vips

for _, d := range s.Destinations {
real := fmt.Sprintf("%s:%d", d.Address, d.Port)
stat := d.Stats
up := zeroone(d.Up)

r = metric(r, p+`_backend_sessions{service="%s",name="%s",backend="%s"} %d`, serv, name, real, stat.Current)
Expand Down

0 comments on commit 60d2bf4

Please sign in to comment.