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

fix: log remote URL when ping fails #5843

Merged
merged 1 commit into from
Jan 25, 2022
Merged

fix: log remote URL when ping fails #5843

merged 1 commit into from
Jan 25, 2022

Conversation

lesam
Copy link
Contributor

@lesam lesam commented Jan 25, 2022

This PR adds remote IP to logs when ping fails.

Copy link
Contributor

@sranka sranka left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -198,7 +198,7 @@ func (s *Service) sourceVersion(ctx context.Context, src *chronograf.Source) str
if err == nil {
return retVal
}
s.Logger.WithField("error", err.Error()).Info("Failed to retrieve database version")
s.Logger.WithField("error", err.Error()).WithField("url", src.URL).Info("Failed to retrieve database version")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated - this would have been enough to catch the issue we were having - the problem was we didn't know which source was actually failing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, makes sense

@lesam lesam requested a review from sranka January 25, 2022 18:13
@lesam lesam changed the title fix: log remote IP when ping fails fix: log remote URL when ping fails Jan 25, 2022
@sranka sranka merged commit a09a31a into master Jan 25, 2022
@sranka sranka deleted the extra-logging branch January 25, 2022 18:25
@sranka sranka added this to the 1.9.3 milestone Jan 25, 2022
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