-
Notifications
You must be signed in to change notification settings - Fork 82
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
Use REST for health checks #233
Comments
Additional context trinodb/trino#17259 |
I think the proper healthcheck REST endpoint for Trino are the same as used in the docker container or if you need more |
And btw .. we should make a similar simple healtcheck for Trino Gateway |
#264 added support for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the Gateway supports either JDBC or REST for health checks. REST health checks use the
/ui/api/stats
endpoint, which is intended for use by the Trino UI, not external services, and has less flexible authentication options than other endpoints. JDBC based health checks create a lot of noise in query logs and other cluster metrics.The
/v1/jmx/mbean
API provides the statistics needed for health checks:/v1/jmx/mbean/trino.metadata:name=DiscoveryNodeManager
providesActiveNodeCount
/v1/jmx/mbean/trino.execution:name=QueryManager
providesRunningQueries
andQueuedQueries
ClusterStats
also has ablockedQueries
statistic, corresponding toBasicQueryStats.getFullyBlocked()
. This is available from/ui/api/stats/
but not other endpoints listed here.This endpoint can support any configured authentication method (unlike
/ui/api/stats
which must useweb-ui.authentication.type
). It doesn't require opening an extra port as jmx rmi would, and it doesn't require the coordinator to generate a query plan or spam the query logs.One potential downside of the
/v1/jmx/mbean
API is that it relies on class and package name in trino to be constant.The text was updated successfully, but these errors were encountered: