A simple application written in Go that send a notification if a client fails to check in with a server.
make build
Copy example.yml to config.yml, and update config.yml to contain appropriate values for sending email alerts.
./power-monitor -server
docker-compose build
docker-compose up -d
./power-monitor -client -hostname localhost -port 8000 -name test
You can run the power monitor client as a Systemd service by following these steps:
- Compile the binary:
make build - Create a script in the top-level directory called
run.sh. Populate it with the command to run the client. For example:
#!/bin/bash
./power-monitor -client -hostname <server-hostname> -port <server-port> -name <client-name>- Make
run.shexecutable:chmod +x run.sh. - Run the
create-service.shscript from the top-level directory:./scripts/create-services.sh. This will create, start, and enable the systemd service.
make test