Handle pg_settings names with '.'
This commit is contained in:
committed by
Will Rouesnel
parent
98ba566322
commit
a87b6bc583
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/common/log"
|
||||
@@ -49,7 +50,7 @@ type pgSetting struct {
|
||||
func (s *pgSetting) metric() prometheus.Metric {
|
||||
var (
|
||||
err error
|
||||
name = s.name
|
||||
name = strings.Replace(s.name, ".", "_", -1)
|
||||
unit = s.unit
|
||||
shortDesc = s.shortDesc
|
||||
subsystem = "settings"
|
||||
|
||||
Reference in New Issue
Block a user