Custom Health Check URL/path

Hi,
Is there a way to have a custom health check url/path e.g. https://ondemand.osc.edu/healthcheck
We are looking to have a non-authenticated url so logic monitor can query the endpoint periodically.

Thanks,
Vesna

Hi and welcome!

The only thing you’ll test here is - Is apache still up? For that you can use the mod_status feature that Apache provides.

https://httpd.apache.org/docs/2.4/mod/mod_status.html

That said - we have a Prometheus exporter for Open OnDemand which indeed uses this API as well - I don’t know if that’s the technology stack you’re using, but thought I’d drop the link anyhow.

Thanks for the pointers Jeff! Yes, we are testing that apache/the site is still up so this mod_status might be what we are looking for. Mostly we want to send a simple json back via the health check endpoint e.g. { health: { db: "PASS" }, times: { db_time: 3 } }
Is there an option in /etc/ood/config/ood_portal.yml that can enable the mod_status option?