fail2ban-prometheus-exporter/health
Hector 8c67b44052
feat: add health endpoint to exporter (!110)
* Add new `/health` endpoint to check if exporter is running correctly
* Update docker healthcheck to use the new endpoint

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/110
2023-09-09 06:15:23 +00:00

8 lines
172 B
Bash
Executable file

#!/bin/sh
port=9191
if [ ! -z $F2B_WEB_LISTEN_ADDRESS ]; then
port=`echo $F2B_WEB_LISTEN_ADDRESS | cut -d ":" -f 2 -`
fi
curl --fail localhost:$port/health || exit 1