-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Prometheus Metrics to Loadbalancers (#48)
* nearly there, pushing for questions Signed-off-by: Dejon Gill [email protected] Signed-off-by: Dejon Gill <[email protected]> * add prom metrics to server package Signed-off-by: Dejon Gill <[email protected]> * Separate requested/released IP gauges Signed-off-by: Dejon Gill <[email protected]> * Remove unused type PromGauge Signed-off-by: Dejon Gill <[email protected]> --------- Signed-off-by: Dejon Gill [email protected] Signed-off-by: Dejon Gill <[email protected]>
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package server | ||
|
||
import ( | ||
"github.com/prometheus/client_golang/prometheus" | ||
"github.com/prometheus/client_golang/prometheus/promauto" | ||
) | ||
|
||
const subsystem = "loadbalancer_provider_haproxy" | ||
|
||
var ( | ||
numberIPsRequestedGauge = promauto.NewGauge( | ||
prometheus.GaugeOpts{ | ||
Subsystem: subsystem, | ||
Name: "ips_requested_count", | ||
Help: "The total number of IPs requested", | ||
}, | ||
) | ||
numberIPsReleasedGauge = promauto.NewGauge( | ||
prometheus.GaugeOpts{ | ||
Subsystem: subsystem, | ||
Name: "ips_released_count", | ||
Help: "The total number of IPs released", | ||
}, | ||
) | ||
) |