ZFS Collector: Convert dashes to underscores for metrics
This fixes #442, and prevents other ZFS metrics from slipping through in the future. Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
This commit is contained in:
parent
7cfa5e75b8
commit
8c23f5ff54
2 changed files with 13 additions and 13 deletions
|
|
@ -81,7 +81,7 @@ func (c *zfsCollector) Update(ch chan<- prometheus.Metric) (err error) {
|
|||
|
||||
func (s zfsSysctl) metricName() string {
|
||||
parts := strings.Split(string(s), ".")
|
||||
return parts[len(parts)-1]
|
||||
return strings.Replace(parts[len(parts)-1], "-", "_", -1)
|
||||
}
|
||||
|
||||
func (c *zfsCollector) constSysctlMetric(subsystem string, sysctl zfsSysctl, value int) prometheus.Metric {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue