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

@@ -17,8 +17,8 @@ func NewDiskCollector(path string) metric.Collector {
path: path,
}
c.totalDescr = metric.NewDesc("disk_total", "", []string{"path"})
c.usageDescr = metric.NewDesc("disk_usage", "", []string{"path"})
c.totalDescr = metric.NewDesc("disk_total", "Total size of the disk in bytes", []string{"path"})
c.usageDescr = metric.NewDesc("disk_usage", "Number of used bytes on the disk", []string{"path"})
return c
}