@@ -11,8 +11,9 @@ import (
1111 "regexp"
1212 "time"
1313
14- "github.com/golang/glog"
1514 "github.com/prometheus/client_golang/prometheus"
15+ "github.com/prometheus/log"
16+
1617 "github.com/prometheus/node_exporter/collector/ganglia"
1718)
1819
@@ -25,7 +26,6 @@ const (
2526
2627type gmondCollector struct {
2728 metrics map [string ]* prometheus.GaugeVec
28-
2929}
3030
3131func init () {
@@ -45,7 +45,7 @@ func NewGmondCollector() (Collector, error) {
4545
4646func (c * gmondCollector ) Update (ch chan <- prometheus.Metric ) (err error ) {
4747 conn , err := net .Dial (gangliaProto , gangliaAddress )
48- glog . V ( 1 ). Infof ("gmondCollector Update" )
48+ log . Debugf ("gmondCollector Update" )
4949 if err != nil {
5050 return fmt .Errorf ("Can't connect to gmond: %s" , err )
5151 }
@@ -91,7 +91,7 @@ func (c *gmondCollector) setMetric(name, cluster string, metric ganglia.Metric)
9191 break
9292 }
9393 }
94- glog . V ( 1 ). Infof ("Register %s: %s" , name , desc )
94+ log . Debugf ("Register %s: %s" , name , desc )
9595 c .metrics [name ] = prometheus .NewGaugeVec (
9696 prometheus.GaugeOpts {
9797 Namespace : gangliaNamespace ,
@@ -101,7 +101,7 @@ func (c *gmondCollector) setMetric(name, cluster string, metric ganglia.Metric)
101101 []string {"cluster" },
102102 )
103103 }
104- glog . V ( 1 ). Infof ("Set %s{cluster=%q}: %f" , name , cluster , metric .Value )
104+ log . Debugf ("Set %s{cluster=%q}: %f" , name , cluster , metric .Value )
105105 c .metrics [name ].WithLabelValues (cluster ).Set (metric .Value )
106106}
107107
0 commit comments