18 lines
441 B
Go
18 lines
441 B
Go
package metrics
|
|
|
|
import "github.com/prometheus/client_golang/prometheus"
|
|
|
|
func RegisterStatsMetrics(version, gitCommit string) error {
|
|
statsMetric := prometheus.NewGauge(prometheus.GaugeOpts{
|
|
Name: metricPrefix + "exporter_info",
|
|
Help: "Information about the friendica-exporter.",
|
|
ConstLabels: prometheus.Labels{
|
|
"version": version,
|
|
"commit": gitCommit,
|
|
},
|
|
})
|
|
statsMetric.Set(1)
|
|
|
|
return prometheus.Register(statsMetric)
|
|
}
|