mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-01-17 20:00:58 +00:00
Fix to replace dashes with underscore in the metric names (#1103)
* Fix to replace dashes with underscore in the metric names Signed-off-by: aagarwalla-fx <arpit.agarwalla@falconx.io> * Code style fix Signed-off-by: aagarwalla-fx <arpit.agarwalla@falconx.io> --------- Signed-off-by: aagarwalla-fx <arpit.agarwalla@falconx.io>
This commit is contained in:
parent
6f36adfadf
commit
5bb1702321
@ -67,7 +67,7 @@ type pgSetting struct {
|
||||
func (s *pgSetting) metric(labels prometheus.Labels) prometheus.Metric {
|
||||
var (
|
||||
err error
|
||||
name = strings.Replace(s.name, ".", "_", -1)
|
||||
name = strings.Replace(strings.Replace(s.name, ".", "_", -1), "-", "_", -1)
|
||||
unit = s.unit // nolint: ineffassign
|
||||
shortDesc = fmt.Sprintf("Server Parameter: %s", s.name)
|
||||
subsystem = "settings"
|
||||
|
Loading…
Reference in New Issue
Block a user