Expose total and available disk space (#7453)

This commit is contained in:
Harshavardhana
2019-04-04 21:21:50 -07:00
committed by Nitish Tiwari
parent 979309148e
commit 0188009c7e
7 changed files with 94 additions and 56 deletions

View File

@@ -142,6 +142,26 @@ func (c *minioCollector) Collect(ch chan<- prometheus.Metric) {
float64(s.Used),
)
// Total disk available space seen by Minio server instance
ch <- prometheus.MustNewConstMetric(
prometheus.NewDesc(
prometheus.BuildFQName("minio", "disk", "storage_available_bytes"),
"Total disk available space seen by Minio server instance",
nil, nil),
prometheus.GaugeValue,
float64(s.Available),
)
// Total disk space seen by Minio server instance
ch <- prometheus.MustNewConstMetric(
prometheus.NewDesc(
prometheus.BuildFQName("minio", "disk", "storage_total_bytes"),
"Total disk space seen by Minio server instance",
nil, nil),
prometheus.GaugeValue,
float64(s.Total),
)
// Minio Total Disk/Offline Disk
ch <- prometheus.MustNewConstMetric(
prometheus.NewDesc(