Closed profsmallpine closed 2 years ago
Seems legit to me. 👍🏻
I could open up the /stats endpoint but that does a fair amount of work in Redis to gather all the data. I could build a simpler set of health oriented stats. Anyone have any thoughts on what elements to include, with the understanding that this data is open to the world?
Or is “200 OK” sufficient and I’m overthinking this?
I can't think of any diagnostic data that is relevant here. This is basically just looking to see that "yep, you're alive little web process, nice job". So yeah, "200 OK" is sufficient. I'd opt for opening things up if they are needed in the future as opposed to dropping stats to the world since its there.
I added a few metrics that I think would be useful for a basic monitoring Dashboard.
Notably the /health endpoint does NOT hit Redis for efficiency reasons and to avoid a possible vector for DDOS.
❯ curl -qq http://localhost:7420/health | jq
{
"now": "2021-10-01T17:21:24.864463Z",
"server": {
"command_count": 0,
"connections": 0,
"description": "Faktory",
"faktory_version": "1.5.4"
}
}
I am wondering if anybody else has this need to get past the health check on a load balancer. If the web UI has a password setup, would it be possible to have an unauthenticated endpoint at /healthcheck or w/e?