diff options
author | Julius Volz <julius.volz@gmail.com> | 2015-05-28 21:21:44 +0200 |
---|---|---|
committer | Julius Volz <julius.volz@gmail.com> | 2015-05-28 21:34:02 +0200 |
commit | e65bc868fcb1a7b59b0981f1b6827429ce4c3f6c (patch) | |
tree | 43c647d4513d97cb84496036c41e8d29ed44702f /collector/runit.go | |
parent | 9f046cd88e5804cafee9c898247272c074a08273 (diff) | |
download | prometheus_node_collector-e65bc868fcb1a7b59b0981f1b6827429ce4c3f6c.tar.bz2 prometheus_node_collector-e65bc868fcb1a7b59b0981f1b6827429ce4c3f6c.tar.xz prometheus_node_collector-e65bc868fcb1a7b59b0981f1b6827429ce4c3f6c.zip |
Switch logging from glog to github.com/prometheus/log.
Diffstat (limited to 'collector/runit.go')
-rw-r--r-- | collector/runit.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/collector/runit.go b/collector/runit.go index 4c359c2..72ab685 100644 --- a/collector/runit.go +++ b/collector/runit.go | |||
@@ -3,8 +3,8 @@ | |||
3 | package collector | 3 | package collector |
4 | 4 | ||
5 | import ( | 5 | import ( |
6 | "github.com/golang/glog" | ||
7 | "github.com/prometheus/client_golang/prometheus" | 6 | "github.com/prometheus/client_golang/prometheus" |
7 | "github.com/prometheus/log" | ||
8 | "github.com/soundcloud/go-runit/runit" | 8 | "github.com/soundcloud/go-runit/runit" |
9 | ) | 9 | ) |
10 | 10 | ||
@@ -66,11 +66,11 @@ func (c *runitCollector) Update(ch chan<- prometheus.Metric) error { | |||
66 | for _, service := range services { | 66 | for _, service := range services { |
67 | status, err := service.Status() | 67 | status, err := service.Status() |
68 | if err != nil { | 68 | if err != nil { |
69 | glog.V(1).Infof("Couldn't get status for %s: %s, skipping...", service.Name, err) | 69 | log.Debugf("Couldn't get status for %s: %s, skipping...", service.Name, err) |
70 | continue | 70 | continue |
71 | } | 71 | } |
72 | 72 | ||
73 | glog.V(1).Infof("%s is %d on pid %d for %d seconds", service.Name, status.State, status.Pid, status.Duration) | 73 | log.Debugf("%s is %d on pid %d for %d seconds", service.Name, status.State, status.Pid, status.Duration) |
74 | c.state.WithLabelValues(service.Name).Set(float64(status.State)) | 74 | c.state.WithLabelValues(service.Name).Set(float64(status.State)) |
75 | c.stateDesired.WithLabelValues(service.Name).Set(float64(status.Want)) | 75 | c.stateDesired.WithLabelValues(service.Name).Set(float64(status.Want)) |
76 | if status.NormallyUp { | 76 | if status.NormallyUp { |