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

Elasticsearch: Implement CheckHealth method in the backend #81671

Merged
merged 6 commits into from Feb 2, 2024

Conversation

mikelv92
Copy link
Contributor

@mikelv92 mikelv92 commented Jan 31, 2024

What is this feature?

ElasticSearch does not have a CheckHealth method in the backend code implemented. This PR adds a CheckHealth so that the /api/datasources/uid/:uid/health endpoint will return the health information.

Why do we need this feature?

Currently the /health endpoint is not working.

Who is this feature for?

Users that want to check the health of the datasource when using Elasticsearch

Which issue(s) does this PR fix?:

Fixes #63727

Special notes for your reviewer:

  1. Start ES locally make devenv sources=elastic
  2. With the gdev-elasticsearch datasource, open
    http://localhost:3000/api/datasources/uid/gdev-elasticsearch/health

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@mikelv92 mikelv92 requested a review from a team as a code owner January 31, 2024 22:52
@CLAassistant
Copy link

CLAassistant commented Jan 31, 2024

CLA assistant check
All committers have signed the CLA.

@mikelv92 mikelv92 closed this Feb 1, 2024
@mikelv92 mikelv92 reopened this Feb 1, 2024
@matyax
Copy link
Contributor

matyax commented Feb 1, 2024

Hey @mikelv92 ! Thanks for your contribution. We'll reviewing as soon as we have some bandwidth. Stay tunned!

@mikelv92
Copy link
Contributor Author

mikelv92 commented Feb 1, 2024

Thank you in advance for the review. I have already signed the CLA but I think the bot isn't updating the workflow...

@svennergr
Copy link
Contributor

Thank you in advance for the review. I have already signed the CLA but I think the bot isn't updating the workflow...

Thanks @mikelv92. Just to be sure, did you add the email used for the commit to your Github account? That's needed for the CLA to be marked as signed.

@mikelv92
Copy link
Contributor Author

mikelv92 commented Feb 1, 2024

Unfortunately, I used the wrong email in the first commit... It's fixed now :)

@svennergr svennergr added add to changelog no-backport Skip backport of PR labels Feb 2, 2024
@svennergr svennergr added this to the 10.4.x milestone Feb 2, 2024
Copy link
Contributor

@svennergr svennergr left a comment

Choose a reason for hiding this comment

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

Nice, LGTM! Thank you for your contribution, @mikelv92!

@svennergr svennergr merged commit 65e9990 into grafana:main Feb 2, 2024
10 checks passed
Ukochka pushed a commit that referenced this pull request Feb 14, 2024
* Elasticsearch: Implement CheckHealth method

* improve logger output

* remove frontend healthcheck

* Revert "remove frontend healthcheck"

This reverts commit 676265f.

* adapt test

---------

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
@aangelisc aangelisc modified the milestones: 10.4.x, 10.4.0 Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ElasticSearch: Implement CheckHealth method in backend
5 participants