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:
Franz Pletz 2018-01-06 11:36:55 +00:00 committed by Johannes 'fish' Ziemke
commit d432f9857e
3 changed files with 24 additions and 24 deletions

View file

@ -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(