close
The Wayback Machine - https://web.archive.org/web/20200905171712/https://github.com/aquasecurity/trivy/issues/534
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

Add health check endpoint to trivy server #534

Open
knqyf263 opened this issue Jun 19, 2020 · 3 comments
Open

Add health check endpoint to trivy server #534

knqyf263 opened this issue Jun 19, 2020 · 3 comments

Comments

@knqyf263
Copy link
Collaborator

@knqyf263 knqyf263 commented Jun 19, 2020

Trivy has client/server mode and the server provides some endpoints. It would be useful if it provides /healthz that returns status code 200 and simply "ok" in the case of running Trivy server in k8s cluster. Ideally, we should check the download of the DB, but it is enough to simply return 200 as a first step.

$ trivy server
2020-06-23T11:27:59.747+0300    INFO    Listening localhost:4954...
$ curl http://localhost:4954/healthz
ok

https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-setting-up-health-checks-with-readiness-and-liveness-probes

@yashvardhan-kukreja
Copy link

@yashvardhan-kukreja yashvardhan-kukreja commented Jun 23, 2020

I would like to take up on this issue and start working around it 😄

@yashvardhan-kukreja
Copy link

@yashvardhan-kukreja yashvardhan-kukreja commented Jun 23, 2020

As mentioned, I would just begin by setting up the endpoint /healthz to straight away return a 200 response. Then, I can start further augmenting other healthchecks upon that endpoint later.
Sounds fine @knqyf263 ?

@knqyf263
Copy link
Collaborator Author

@knqyf263 knqyf263 commented Jul 1, 2020

@yashvardhan-kukreja I'm sorry for the late reply. It sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.