mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-27 06:38:44 +02:00
Do not read prometheus metrics
This commit is contained in:
@ -7,7 +7,6 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
dto "github.com/prometheus/client_model/go"
|
||||
)
|
||||
|
||||
// Options holds web package configuration
|
||||
@ -35,15 +34,6 @@ var (
|
||||
})
|
||||
)
|
||||
|
||||
func GetGaugeValue(metric prometheus.Gauge) float64 {
|
||||
var m = &dto.Metric{}
|
||||
if err := metric.Write(m); err != nil {
|
||||
log.Fatal(err)
|
||||
return 0
|
||||
}
|
||||
return m.Gauge.GetValue()
|
||||
}
|
||||
|
||||
// Serve monitoring server that expose prometheus metrics
|
||||
func Serve(cfg *Options) {
|
||||
mux := http.NewServeMux()
|
||||
|
Reference in New Issue
Block a user