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

Problem with the CrateDB Health Status #39

Open
flopezag opened this issue Aug 25, 2021 · 0 comments
Open

Problem with the CrateDB Health Status #39

flopezag opened this issue Aug 25, 2021 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@flopezag
Copy link
Member

Sometimes there is an error when we try to execute CrateDB requests due to the server has not finished the process of creation of the indexes and therefore the Health Status is still not GREEN.

The solution should be the implementation of a new services function 'waiting_cratedb' before finishing the script in which we request:

curl -iX POST \
  'http://localhost:4200/_sql' \
  -H 'Content-Type: application/json' \
  -d '{"stmt": "select health from sys.health order by severity desc limit 1;"}'

And example of the response is the following:

HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
content-length: 70

{"cols":["health"],"rows":[["GREEN"]],"rowcount":1,"duration":41.1477}                                                                                                                                                             

We need to wait until response['rows'][0] is ["GREEN"] possible values are:

  • ["GREEN"]
  • ["YELLOW"]
  • ["RED"]
  • []
@flopezag flopezag added bug Something isn't working enhancement New feature or request labels Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants