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

changed Up metrics to look for just Success response #1340

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

msvinaykumar
Copy link
Contributor

@msvinaykumar msvinaykumar commented Oct 10, 2024

Description

Kruize checks if the datasource is reachable by querying the following metric:
http://127.0.0.1:9090/api/v1/query?query=up.

Prometheus/Thanos typically returns the current status of the targets (such as services or jobs) it monitors. However, in this case, Thanos was unable to provide those details, even though the response status was 200 OK.

Kruize only needs to confirm that the response is 200 OK to proceed, and currently, it's not concerned with the actual content of the response. Therefore, the fix will focus on simply checking for a 200 OK status and moving forward based on that

{ "status": "success", "data": { "resultType": "vector", "result": [ { "metric": { "__name__": "up", "instance": "localhost:9090", "job": "prometheus" }, "value": [1696841450.278, "1"] }, { "metric": { "__name__": "up", "instance": "localhost:9100", "job": "node" }, "value": [1696841450.278, "1"] } ] } }

Fixes # (issue)

Type of change

  • Bug fix
  • New feature
  • Docs update
  • Breaking change (What changes might users need to make in their application due to this PR?)
  • Requires DB changes

How has this been tested?

Please describe the tests that were run to verify your changes and steps to reproduce. Please specify any test configuration required.

  • New Test X
  • Functional testsuite

Test Configuration

  • Kubernetes clusters tested on:

Checklist 🎯

  • Followed coding guidelines
  • Comments added
  • Dependent changes merged
  • Documentation updated
  • Tests added or updated

Additional information

Include any additional information such as links, test results, screenshots here

@dinogun
Copy link
Contributor

dinogun commented Oct 15, 2024

Why is this change needed and why are we removing the old check ... can you please add some description to this PR and also to the code

@msvinaykumar
Copy link
Contributor Author

Why is this change needed and why are we removing the old check ... can you please add some description to this PR and also to the code

Done

Copy link
Contributor

@dinogun dinogun left a comment

Choose a reason for hiding this comment

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

LGTM

@dinogun dinogun merged commit 0273075 into kruize:mvp_demo Oct 16, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants