diff --git a/exporter/gmond_collector.go b/exporter/gmond_collector.go index e9d263ea..1425cb93 100644 --- a/exporter/gmond_collector.go +++ b/exporter/gmond_collector.go @@ -84,7 +84,7 @@ func (c *gmondCollector) Update() (updates int, err error) { for _, host := range cluster.Hosts { for _, metric := range host.Metrics { - name := strings.ToLower(metric.Name) + name := strings.Replace(strings.ToLower(metric.Name), ".", "_", -1) var labels = map[string]string{ "hostname": host.Name, diff --git a/exporter/munin_collector.go b/exporter/munin_collector.go index 3e564263..8fe71728 100644 --- a/exporter/munin_collector.go +++ b/exporter/munin_collector.go @@ -169,7 +169,7 @@ func (c *muninCollector) registerMetrics() (err error) { } for metric, config := range configs { - metricName := name + "-" + metric + metricName := strings.Replace(name+"-"+metric, ".", "_", -1) desc := graphConfig["graph_title"] + ": " + config["label"] if config["info"] != "" { desc = desc + ", " + config["info"]