-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Loki: Add backend healthcheck #74330
Conversation
pkg/tsdb/loki/healthcheck.go
Outdated
return getHealthCheckMessage("There was an error returned querying the Loki API.", errors.New("invalid response")) | ||
} | ||
|
||
return getHealthCheckMessage("Successfully queried the Loki API.", nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion! Changed it to Data source successfully connected.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Left a suggestion about error/success messages.
Backend code coverage report for PR #74330
|
Frontend code coverage report for PR #74330
|
* add loki healthcheck * remove `testDatasource` call * remove unused error check * change success message * improve error messages
* add loki healthcheck * remove `testDatasource` call * remove unused error check * change success message * improve error messages
What is this feature?
Added the backend healthcheck based on the Prom implementation and https://grafana.com/docs/grafana/latest/developers/http_api/data_source/#check-data-source-health
Which issue(s) does this PR fix?:
Fixes #63726
Special notes for your reviewer:
http://localhost:3000/api/datasources/uid/DS_UID/health
and make sure to replaceDS_UID
.