1
0
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:
Alexandre Iooss
2020-09-29 18:17:55 +02:00
parent 2005f3ece1
commit 078a74add1
4 changed files with 8 additions and 15 deletions

View File

@ -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()