fail2ban-prometheus-exporter/health
Hector 9738a20a82
build: add healthcheck to docker image (!109)
* Update docker image to include a healthcheck instruction using a custom script
* Replace docker base image with alpine

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/109
2023-09-07 21:16:20 +00:00

8 lines
173 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/metrics || exit 1