garm/metrics/enterprise.go
Mario Constanti 1d8d9459eb chore: refactor metrics endpoint
refactoring is needed to make the metrics package usable from within the
runner package for further metrics.

This change also makes the metric-collector independent from requests to
the /metrics endpoint

Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
2024-02-19 16:22:32 +01:00

21 lines
588 B
Go

package metrics
import (
"github.com/prometheus/client_golang/prometheus"
)
var (
EnterpriseInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: metricsNamespace,
Subsystem: metricsEnterpriseSubsystem,
Name: "info",
Help: "Info of the enterprise",
}, []string{"name", "id"})
EnterprisePoolManagerStatus = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: metricsNamespace,
Subsystem: metricsEnterpriseSubsystem,
Name: "pool_manager_status",
Help: "Status of the enterprise pool manager",
}, []string{"name", "id", "running"})
)