Use uint64 in the ZFS collector (#714)
ZFS metrics can also be unsigned 64-bit integers that won't fit in int64 and causes the whole collector to fail.
This commit is contained in:
parent
ae280f2b04
commit
d432f9857e
3 changed files with 24 additions and 24 deletions
|
|
@ -75,7 +75,7 @@ func (s zfsSysctl) metricName() string {
|
|||
return strings.Replace(parts[len(parts)-1], "-", "_", -1)
|
||||
}
|
||||
|
||||
func (c *zfsCollector) constSysctlMetric(subsystem string, sysctl zfsSysctl, value int64) prometheus.Metric {
|
||||
func (c *zfsCollector) constSysctlMetric(subsystem string, sysctl zfsSysctl, value uint64) prometheus.Metric {
|
||||
metricName := sysctl.metricName()
|
||||
|
||||
return prometheus.MustNewConstMetric(
|
||||
|
|
@ -90,7 +90,7 @@ func (c *zfsCollector) constSysctlMetric(subsystem string, sysctl zfsSysctl, val
|
|||
)
|
||||
}
|
||||
|
||||
func (c *zfsCollector) constPoolMetric(poolName string, sysctl zfsSysctl, value int64) prometheus.Metric {
|
||||
func (c *zfsCollector) constPoolMetric(poolName string, sysctl zfsSysctl, value uint64) prometheus.Metric {
|
||||
metricName := sysctl.metricName()
|
||||
|
||||
return prometheus.MustNewConstMetric(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue