Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add logout #3

Open
wants to merge 2 commits into
base: stackhpc
Choose a base branch
from
Open

add logout #3

wants to merge 2 commits into from

Conversation

GregWhiteyBialas
Copy link

No description provided.

Copy link
Member

@dougszumski dougszumski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comment inline.

@@ -99,6 +99,8 @@ func (r *RedfishCollector) Collect(ch chan<- prometheus.Metric) {

ch <- r.redfishUp
ch <- prometheus.MustNewConstMetric(totalScrapeDurationDesc, prometheus.GaugeValue, time.Since(scrapeTime).Seconds())
defer r.redfishClient.Logout()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the logout on line 84 should handle the session close. I hadn't seen that.

We can't do it on line 102 because r.redfishClient could be nil.

It does appear that we hit the else branch in practise. I see redfish_up = 0 in historical data, and around those times we see dropouts in other data. We need to get to bottom of why that happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants