Lightweight services monitoring for the association's infrastructure
.
├── cmd/server/ # Entry point
├── internal/
│ ├── config/ # YAML config loading
│ ├── checker/ # Checks implementation (ping, http)
│ ├── scheduler/ # Periodic orchestration
│ ├── storage/ # Results memory storage
│ └── api/ # RESTful http server
├── configs/ # configuration files
└── Dockerfile
GET /status- State of all servicesGET /health- Healthcheck
git clone git@github.com:DaVinciCodeCTF/status-checker.git
There's only one environment variable that must be set. It's ENCRYPTION_KEY which must be a 32 bytes string.
It is used to cipher api output.
Note
The same key must be used on whatever other service that'll reach this api in order to decipher its ouptut.
You can also optionally override the PORT environment variable which is defaulted to "8080".
- Edit
configs/services.yaml.examplefollowing the example.
Tip
When finished editing, remove the .example extension.
First build the container, preferably using podman (docker will work as well):
podman build -t status-checker .Then just run it while providing the .env file location & the forwarding port to use:
podman run -d --name status-checker --env-file <full_path_of_env_file> -p 0.0.0.0:<desired_port>:8080 status-checker:latest