Add /v3/metrics (get) endpoint to list all known metrics

This commit is contained in:
Ingo Oppermann
2022-09-08 13:50:53 +02:00
parent 2d754b4212
commit 285ef79716
17 changed files with 229 additions and 48 deletions

View File

@@ -13,8 +13,8 @@ type netCollector struct {
func NewNetCollector() metric.Collector {
c := &netCollector{}
c.rxDescr = metric.NewDesc("net_rx", "", []string{"interface"})
c.txDescr = metric.NewDesc("net_tx", "", []string{"interface"})
c.rxDescr = metric.NewDesc("net_rx", "Number of received bytes", []string{"interface"})
c.txDescr = metric.NewDesc("net_tx", "Number of transmitted bytes", []string{"interface"})
return c
}