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

Healthcheck for graph-node docker image #5484

Open
2 tasks done
chrisdotn opened this issue Jun 13, 2024 · 0 comments
Open
2 tasks done

Healthcheck for graph-node docker image #5484

chrisdotn opened this issue Jun 13, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@chrisdotn
Copy link

chrisdotn commented Jun 13, 2024

Description

The docker image for the graph-node doesn't contain a health check. It would be useful to have a simple way of checking the health of a graph node in the docker image automatically.

Docker health checks are meant to provide a very simple check if the relevant application is running correctly. They should be quick and cheap so that they can execute frequently. In the graph-node case this would be a check if the graph node is up and running and not a check for a particular subgraph.

Proposal

As graph-node doesn't have a native health check, the fairly simple command to check if the node is up and running would be a GraphQL request:

query getVersion {
  version {
    version
  }
}

should return the version of the node. To run this as a shell command, we could use:

curl -s http://localhost:8030/graphql -H 'Content-Type: application/json'  -d '{"query": "query getVersion { version { version } }" }' -f -m 2

The command runs inside the docker container. However, the default docker image does not provide curl. So the proposal is two-fold:

  1. Add a curl dependency to the docker image (i.e. apt-get -y install curl in the docker file)
  2. Add a health check command to the docker file.

If there is interest in this, I'm happy to create a PR for it.

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No

Some information to help us out

  • Tick this box if you plan on implementing this feature yourself.
  • I have searched the issue tracker to make sure this issue is not a duplicate.
@chrisdotn chrisdotn added the enhancement New feature or request label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant