Hits a HTTP request to an endpoint and exporters the status code in prometheus metrics format.
export INPUT_FILE=./endpoints.json
go run main.go
docker run -p 8091:8090 -v <path to endpoints.json>:/app/endpoints.json ghcr.io/one2nc/healthcheck-api:<image_tag>
GOOS=darwin GOARCH=amd64 go build -o ./health-check-api-mac
- Handle signals like ctrl+c
- Use gorilla mux instead of net/http package
- Emit metric using prometheus go library ex:
status_code{service_name=<>} 200
- Read json file containing list of endpoints to be tested
- Loop and make concurrent calls to test this endpoint. Wait for the results and send the results