Sign inSign up

hechi/healthy-api

By hechi

•Updated about 3 years ago

Backend for Healthy - A http health monitoring system

Image
Monitoring & observability
1

2.1K

hechi/healthy-api repository overview

DISCLAIMER: I used this little project to learn Kotlin and ReactJS. Probably there is a lot to improve and there are some bugs :) So please be careful if you want to use it and for sure feel free to contribute.

⁠Healthy-API

The Healthy-API is a application which queries the HTTP status of a service in the background in a specified interval. The status of the service is stored in memory.

⁠Why?

I haven't found a service that lets me easily specify endpoints which I want to monitor. I just wanted to know if they are up and running.

⁠Todo's
  • read endpoints from a local file
  • make HTTP response configurable (ex. 200 -> healthy, 301 or 302 -> unhealthy)
  • create docker image
  • query endpoints in a specified time interval.
  • measure response time of endpoint
  • read healthy.yaml from time to time again, so that we do not need to restart the application
  • implement basic http authentication
  • make timeouts configurable
  • follow redirects
  • describe healthy.yaml
  • implement pipeline
  • provide prometheus metric endpoint for scraper
  • add IP response
  • document the endpoint (swagger?)

⁠Development

  • Build jar file with
# gradle bootJar
  • Run jar with custom healthy.yaml
# java -Dhealthy.config.location=file:healthy.yaml -jar build/libs/Healthy-0.0.1-SNAPSHOT.jar
  • Build docker image with name healthy (HINT: docker file uses own gradle to build the jar)
# docker build . -t healthy
  • Run docker image
# docker run -p 80:8080 healthy
  • Run docker image with custom healthy.yaml
# docker run -p 80:8080 -v $(pwd)/healthy.yaml:/config/healthy.yaml healthy

Tag summary

Content type

Image

Digest

sha256:c4d283d0a…

Size

107.2 MB

Last updated

about 3 years ago

docker pull hechi/healthy-api:dev