Hi Team,
How to verify Kong gateway and Kong ingress controller health with a browser hit or a click , any documentation is appreciated for configuring the Kong health checks
Hi Team,
How to verify Kong gateway and Kong ingress controller health with a browser hit or a click , any documentation is appreciated for configuring the Kong health checks
Not sure if this is what you’re looking for, but we have a cluster of Kong proxies behind a load balancer. So the LB knows whether or not a proxy node should remain in the pool, we have a separate service/route configured which uses the request termination plugin to return a predefined “alive” response which the load balancer uses as its health check URL … so long as it gets that response back from a proxy node, it assumes it is healthy and can have requests routed to it.
Hi @shawnc1959 ,
i want to know kong gateway is running or not , how do we check that ?
Well, we took the approach that if we get a successful response from that “heartbeat” API, then the gateway must be functioning.
The admin API does have a status endpoint that you can call; see Admin API - v2.5.x | Kong Docs
Lastly, the Kong executable has a “health” parameter which you can run interactively, but the output is pretty basic, e.g.:
$ sudo /usr/local/bin/kong health
nginx.......running
Kong is healthy at /usr/local/kong
Hi @shawnc1959 , thanks for the above info , how do we check health check of kong ingress controller ?
We don’t use the ingress controller, so afraid I don’t have any experience with that. But since it’s based on Kong, the status endpoint might also be exposed by it.
Kong Admin
You can use kong-gateway–admin-url/status for admin health check.
Kong Proxy
For proxy health check, we can acheive this using Kong Request Termination Plugin.
For this,
Create a new Route using Kong Admin API or Kong Manager.
Provide Route name, skip the service field, provide path as something like /health/status and save it.
Then open that Route from Kong Manager, select plugin and add Request Termination Plugin.
In Request Termination Plugin fields, select Scoped, select the Route created in the above step, Provide a custom message in the Message field and add Status Code as 200.
Now you can access it as kong-proxy-url/health/status