|
|
@ -538,15 +538,16 @@ func (c *mountStatsCollector) Update(ch chan<- prometheus.Metric) error {
|
|
|
|
mountAddress = miStats.SuperOptions["addr"]
|
|
|
|
mountAddress = miStats.SuperOptions["addr"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
deviceIdentifier := nfsDeviceIdentifier{m.Device, stats.Transport.Protocol, mountAddress}
|
|
|
|
for k := range stats.Transport {
|
|
|
|
i := deviceList[deviceIdentifier]
|
|
|
|
deviceIdentifier := nfsDeviceIdentifier{m.Device, stats.Transport[k].Protocol, mountAddress}
|
|
|
|
if i {
|
|
|
|
i := deviceList[deviceIdentifier]
|
|
|
|
level.Debug(c.logger).Log("msg", "Skipping duplicate device entry", "device", deviceIdentifier)
|
|
|
|
if i {
|
|
|
|
continue
|
|
|
|
level.Debug(c.logger).Log("msg", "Skipping duplicate device entry", "device", deviceIdentifier)
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
deviceList[deviceIdentifier] = true
|
|
|
|
|
|
|
|
c.updateNFSStats(ch, stats, m.Device, stats.Transport[k].Protocol, mountAddress)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
deviceList[deviceIdentifier] = true
|
|
|
|
|
|
|
|
c.updateNFSStats(ch, stats, m.Device, stats.Transport.Protocol, mountAddress)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
@ -617,75 +618,77 @@ func (c *mountStatsCollector) updateNFSStats(ch chan<- prometheus.Metric, s *pro
|
|
|
|
labelValues...,
|
|
|
|
labelValues...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
for i := range s.Transport {
|
|
|
|
c.NFSTransportBindTotal,
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
prometheus.CounterValue,
|
|
|
|
c.NFSTransportBindTotal,
|
|
|
|
float64(s.Transport.Bind),
|
|
|
|
prometheus.CounterValue,
|
|
|
|
labelValues...,
|
|
|
|
float64(s.Transport[i].Bind),
|
|
|
|
)
|
|
|
|
labelValues...,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
c.NFSTransportConnectTotal,
|
|
|
|
c.NFSTransportConnectTotal,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
float64(s.Transport.Connect),
|
|
|
|
float64(s.Transport[i].Connect),
|
|
|
|
labelValues...,
|
|
|
|
labelValues...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
c.NFSTransportIdleTimeSeconds,
|
|
|
|
c.NFSTransportIdleTimeSeconds,
|
|
|
|
prometheus.GaugeValue,
|
|
|
|
prometheus.GaugeValue,
|
|
|
|
float64(s.Transport.IdleTimeSeconds%float64Mantissa),
|
|
|
|
float64(s.Transport[i].IdleTimeSeconds%float64Mantissa),
|
|
|
|
labelValues...,
|
|
|
|
labelValues...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
c.NFSTransportSendsTotal,
|
|
|
|
c.NFSTransportSendsTotal,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
float64(s.Transport.Sends),
|
|
|
|
float64(s.Transport[i].Sends),
|
|
|
|
labelValues...,
|
|
|
|
labelValues...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
c.NFSTransportReceivesTotal,
|
|
|
|
c.NFSTransportReceivesTotal,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
float64(s.Transport.Receives),
|
|
|
|
float64(s.Transport[i].Receives),
|
|
|
|
labelValues...,
|
|
|
|
labelValues...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
c.NFSTransportBadTransactionIDsTotal,
|
|
|
|
c.NFSTransportBadTransactionIDsTotal,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
float64(s.Transport.BadTransactionIDs),
|
|
|
|
float64(s.Transport[i].BadTransactionIDs),
|
|
|
|
labelValues...,
|
|
|
|
labelValues...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
c.NFSTransportBacklogQueueTotal,
|
|
|
|
c.NFSTransportBacklogQueueTotal,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
float64(s.Transport.CumulativeBacklog),
|
|
|
|
float64(s.Transport[i].CumulativeBacklog),
|
|
|
|
labelValues...,
|
|
|
|
labelValues...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
c.NFSTransportMaximumRPCSlots,
|
|
|
|
c.NFSTransportMaximumRPCSlots,
|
|
|
|
prometheus.GaugeValue,
|
|
|
|
prometheus.GaugeValue,
|
|
|
|
float64(s.Transport.MaximumRPCSlotsUsed),
|
|
|
|
float64(s.Transport[i].MaximumRPCSlotsUsed),
|
|
|
|
labelValues...,
|
|
|
|
labelValues...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
c.NFSTransportSendingQueueTotal,
|
|
|
|
c.NFSTransportSendingQueueTotal,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
float64(s.Transport.CumulativeSendingQueue),
|
|
|
|
float64(s.Transport[i].CumulativeSendingQueue),
|
|
|
|
labelValues...,
|
|
|
|
labelValues...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
ch <- prometheus.MustNewConstMetric(
|
|
|
|
c.NFSTransportPendingQueueTotal,
|
|
|
|
c.NFSTransportPendingQueueTotal,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
prometheus.CounterValue,
|
|
|
|
float64(s.Transport.CumulativePendingQueue),
|
|
|
|
float64(s.Transport[i].CumulativePendingQueue),
|
|
|
|
labelValues...,
|
|
|
|
labelValues...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for _, op := range s.Operations {
|
|
|
|
for _, op := range s.Operations {
|
|
|
|
opLabelValues := []string{export, protocol, mountAddress, op.Operation}
|
|
|
|
opLabelValues := []string{export, protocol, mountAddress, op.Operation}
|
|
|
|