aboutsummaryrefslogtreecommitdiff
path: root/collector/logind_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'collector/logind_linux.go')
-rw-r--r--collector/logind_linux.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/collector/logind_linux.go b/collector/logind_linux.go
index fb3cb57..19a29a2 100644
--- a/collector/logind_linux.go
+++ b/collector/logind_linux.go
@@ -92,7 +92,7 @@ func NewLogindCollector(logger log.Logger) (Collector, error) {
92func (lc *logindCollector) Update(ch chan<- prometheus.Metric) error { 92func (lc *logindCollector) Update(ch chan<- prometheus.Metric) error {
93 c, err := newDbus() 93 c, err := newDbus()
94 if err != nil { 94 if err != nil {
95 return fmt.Errorf("unable to connect to dbus: %s", err) 95 return fmt.Errorf("unable to connect to dbus: %w", err)
96 } 96 }
97 defer c.conn.Close() 97 defer c.conn.Close()
98 98
@@ -102,12 +102,12 @@ func (lc *logindCollector) Update(ch chan<- prometheus.Metric) error {
102func collectMetrics(ch chan<- prometheus.Metric, c logindInterface) error { 102func collectMetrics(ch chan<- prometheus.Metric, c logindInterface) error {
103 seats, err := c.listSeats() 103 seats, err := c.listSeats()
104 if err != nil { 104 if err != nil {
105 return fmt.Errorf("unable to get seats: %s", err) 105 return fmt.Errorf("unable to get seats: %w", err)
106 } 106 }
107 107
108 sessionList, err := c.listSessions() 108 sessionList, err := c.listSessions()
109 if err != nil { 109 if err != nil {
110 return fmt.Errorf("unable to get sessions: %s", err) 110 return fmt.Errorf("unable to get sessions: %w", err)
111 } 111 }
112 112
113 sessions := make(map[logindSession]float64) 113 sessions := make(map[logindSession]float64)