Add new counters for flush requests in Linux 5.5 (#1548)

* Add diskstat flush request counters for Linux 5.5+
* Update tests for diskstat flush request counters with Linux 5.5+

Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
This commit is contained in:
Holger Hoffstätte 2019-11-25 20:16:15 +01:00 committed by Ben Kochie
commit 3c2c4e7b3c
4 changed files with 48 additions and 0 deletions

View file

@ -160,6 +160,23 @@ func NewDiskstatsCollector() (Collector, error) {
), valueType: prometheus.CounterValue,
factor: .001,
},
{
desc: prometheus.NewDesc(
prometheus.BuildFQName(namespace, diskSubsystem, "flush_requests_total"),
"The total number of flush requests completed successfully",
diskLabelNames,
nil,
), valueType: prometheus.CounterValue,
},
{
desc: prometheus.NewDesc(
prometheus.BuildFQName(namespace, diskSubsystem, "flush_requests_time_seconds_total"),
"This is the total number of seconds spent by all flush requests.",
diskLabelNames,
nil,
), valueType: prometheus.CounterValue,
factor: .001,
},
},
}, nil
}