2020-05-25 05:18:35 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
metricRooms = promauto.NewGauge(prometheus.GaugeOpts{
|
|
|
|
Namespace: "codies",
|
|
|
|
Subsystem: "codies",
|
|
|
|
Name: "rooms",
|
|
|
|
Help: "Total number of rooms.",
|
|
|
|
})
|
|
|
|
|
|
|
|
metricClients = promauto.NewGauge(prometheus.GaugeOpts{
|
|
|
|
Namespace: "codies",
|
|
|
|
Subsystem: "codies",
|
|
|
|
Name: "clients",
|
|
|
|
Help: "Total number of clients.",
|
|
|
|
})
|
|
|
|
|
2020-05-27 06:40:29 +00:00
|
|
|
metricReceived = promauto.NewCounter(prometheus.CounterOpts{
|
2020-05-25 05:18:35 +00:00
|
|
|
Namespace: "codies",
|
|
|
|
Subsystem: "codies",
|
2020-05-27 06:27:09 +00:00
|
|
|
Name: "received_total",
|
|
|
|
Help: "Total number of received messages.",
|
2020-05-25 05:18:35 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
metricSent = promauto.NewCounter(prometheus.CounterOpts{
|
|
|
|
Namespace: "codies",
|
|
|
|
Subsystem: "codies",
|
|
|
|
Name: "sent_total",
|
|
|
|
Help: "Total number of sent messages.",
|
|
|
|
})
|
|
|
|
)
|