aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Volz <julius.volz@gmail.com>2018-08-05 16:55:25 +0200
committerGitHub <noreply@github.com>2018-08-05 16:55:25 +0200
commit2c52b8c76147f0f0671029e9fd7454b9866ace0d (patch)
tree36e28daae49b2bd2c0bc263636a182203077fdbf
parent6bdc5558ecfa90f81107f65fc14f55ac46f69643 (diff)
downloadprometheus_node_collector-2c52b8c76147f0f0671029e9fd7454b9866ace0d.tar.bz2
prometheus_node_collector-2c52b8c76147f0f0671029e9fd7454b9866ace0d.tar.xz
prometheus_node_collector-2c52b8c76147f0f0671029e9fd7454b9866ace0d.zip
systemd: Remove unneeded/unhandled error returns (#1035)
Signed-off-by: Julius Volz <julius.volz@gmail.com>
-rw-r--r--collector/systemd_linux.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/collector/systemd_linux.go b/collector/systemd_linux.go
index 6aee624..57aff5a 100644
--- a/collector/systemd_linux.go
+++ b/collector/systemd_linux.go
@@ -148,7 +148,7 @@ func (c *systemdCollector) collectUnitStatusMetrics(ch chan<- prometheus.Metric,
148 } 148 }
149} 149}
150 150
151func (c *systemdCollector) collectSockets(ch chan<- prometheus.Metric, units []unit) error { 151func (c *systemdCollector) collectSockets(ch chan<- prometheus.Metric, units []unit) {
152 for _, unit := range units { 152 for _, unit := range units {
153 if !strings.HasSuffix(unit.Name, ".socket") { 153 if !strings.HasSuffix(unit.Name, ".socket") {
154 continue 154 continue
@@ -164,7 +164,6 @@ func (c *systemdCollector) collectSockets(ch chan<- prometheus.Metric, units []u
164 c.socketRefusedConnectionsDesc, prometheus.GaugeValue, 164 c.socketRefusedConnectionsDesc, prometheus.GaugeValue,
165 float64(unit.refusedConnections), unit.Name) 165 float64(unit.refusedConnections), unit.Name)
166 } 166 }
167 return nil
168} 167}
169 168
170func (c *systemdCollector) collectUnitStartTimeMetrics(ch chan<- prometheus.Metric, units []unit) { 169func (c *systemdCollector) collectUnitStartTimeMetrics(ch chan<- prometheus.Metric, units []unit) {
@@ -175,7 +174,7 @@ func (c *systemdCollector) collectUnitStartTimeMetrics(ch chan<- prometheus.Metr
175 } 174 }
176} 175}
177 176
178func (c *systemdCollector) collectTimers(ch chan<- prometheus.Metric, units []unit) error { 177func (c *systemdCollector) collectTimers(ch chan<- prometheus.Metric, units []unit) {
179 for _, unit := range units { 178 for _, unit := range units {
180 if !strings.HasSuffix(unit.Name, ".timer") { 179 if !strings.HasSuffix(unit.Name, ".timer") {
181 continue 180 continue
@@ -185,7 +184,6 @@ func (c *systemdCollector) collectTimers(ch chan<- prometheus.Metric, units []un
185 c.timerLastTriggerDesc, prometheus.GaugeValue, 184 c.timerLastTriggerDesc, prometheus.GaugeValue,
186 float64(unit.lastTriggerUsec)/1e6, unit.Name) 185 float64(unit.lastTriggerUsec)/1e6, unit.Name)
187 } 186 }
188 return nil
189} 187}
190 188
191func (c *systemdCollector) collectSummaryMetrics(ch chan<- prometheus.Metric, summary map[string]float64) { 189func (c *systemdCollector) collectSummaryMetrics(ch chan<- prometheus.Metric, summary map[string]float64) {