Skip to content

Commit

Permalink
add client logout
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennings Liu committed Sep 17, 2019
1 parent e2aa16b commit 6c0396d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions collector/redfish_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func (r *RedfishCollector) Describe(ch chan<- *prometheus.Desc) {

// Collect implements prometheus.Collector.
func (r *RedfishCollector) Collect(ch chan<- prometheus.Metric) {
defer r.redfishClient.Logout()
scrapeTime := time.Now()
if r.redfishUpValue {
r.redfishUp.Set(1)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/prometheus/client_golang v1.1.0
github.com/prometheus/common v0.6.0
github.com/stmcginnis/gofish v0.1.1-0.20190911220651-32bda5bcf553
github.com/stmcginnis/gofish v0.1.1-0.20190913170745-da1d892cada6
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/yaml.v2 v2.2.2
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ github.com/stmcginnis/gofish v0.1.1-0.20190830080111-aa0843fe6773 h1:vat+A3+a6vu
github.com/stmcginnis/gofish v0.1.1-0.20190830080111-aa0843fe6773/go.mod h1:t0RUeoOLznx9vExQOeLZUrjU0u3yy0wL4iVMQviUl+k=
github.com/stmcginnis/gofish v0.1.1-0.20190911220651-32bda5bcf553 h1:XHu6rJ9pcmhvGLZaD4/+wTfQnguFCnhwlUrLJqlW/Cc=
github.com/stmcginnis/gofish v0.1.1-0.20190911220651-32bda5bcf553/go.mod h1:t0RUeoOLznx9vExQOeLZUrjU0u3yy0wL4iVMQviUl+k=
github.com/stmcginnis/gofish v0.1.1-0.20190913170745-da1d892cada6 h1:BBL3UnAaZ/dHJTtUGossCpubfdtf1UZLeoFJ4QppT+Y=
github.com/stmcginnis/gofish v0.1.1-0.20190913170745-da1d892cada6/go.mod h1:t0RUeoOLznx9vExQOeLZUrjU0u3yy0wL4iVMQviUl+k=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
Expand Down

0 comments on commit 6c0396d

Please sign in to comment.