mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-03-05 21:00:12 -08:00
Merge 46bcb046a0
into 0c10545e8d
This commit is contained in:
commit
e99beee744
|
@ -52,6 +52,7 @@ type mountStatsCollector struct {
|
||||||
NFSOperationsQueueTimeSecondsTotal *prometheus.Desc
|
NFSOperationsQueueTimeSecondsTotal *prometheus.Desc
|
||||||
NFSOperationsResponseTimeSecondsTotal *prometheus.Desc
|
NFSOperationsResponseTimeSecondsTotal *prometheus.Desc
|
||||||
NFSOperationsRequestTimeSecondsTotal *prometheus.Desc
|
NFSOperationsRequestTimeSecondsTotal *prometheus.Desc
|
||||||
|
NFSOperationsErrorsTotal *prometheus.Desc
|
||||||
|
|
||||||
// Transport statistics
|
// Transport statistics
|
||||||
NFSTransportBindTotal *prometheus.Desc
|
NFSTransportBindTotal *prometheus.Desc
|
||||||
|
@ -321,6 +322,13 @@ func NewMountStatsCollector(logger *slog.Logger) (Collector, error) {
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
NFSOperationsErrorsTotal: prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(namespace, subsystem, "operations_errors_total"),
|
||||||
|
"Number of errors for a given operation",
|
||||||
|
opLabels,
|
||||||
|
nil,
|
||||||
|
),
|
||||||
|
|
||||||
NFSEventInodeRevalidateTotal: prometheus.NewDesc(
|
NFSEventInodeRevalidateTotal: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "event_inode_revalidate_total"),
|
prometheus.BuildFQName(namespace, subsystem, "event_inode_revalidate_total"),
|
||||||
"Number of times cached inode attributes are re-validated from the server.",
|
"Number of times cached inode attributes are re-validated from the server.",
|
||||||
|
@ -747,6 +755,13 @@ func (c *mountStatsCollector) updateNFSStats(ch chan<- prometheus.Metric, s *pro
|
||||||
float64(op.CumulativeTotalRequestMilliseconds%float64Mantissa)/1000.0,
|
float64(op.CumulativeTotalRequestMilliseconds%float64Mantissa)/1000.0,
|
||||||
opLabelValues...,
|
opLabelValues...,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.NFSOperationsErrorsTotal,
|
||||||
|
prometheus.CounterValue,
|
||||||
|
float64(op.Errors%float64Mantissa),
|
||||||
|
opLabelValues...,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
|
Loading…
Reference in a new issue