Handle pg_settings names with '.'

This commit is contained in:
Adam Sunderland
2017-04-17 10:33:02 -05:00
committed by Will Rouesnel
parent 98ba566322
commit a87b6bc583
2 changed files with 18 additions and 1 deletions

View File

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