A service monitor written in go
You will need to provide a monitor.yml of your own, customized to your needs.
You will also need to set a number of environmental variables.
export SERVMONDIR=/opt/servmon
export SLACK_TOKEN=adssadasasdsa
export SLACK_CHANNEL=C02U1PAFP8Q
servmon
NOTE: In order for servmon
to function you'll also need to put a monitor.yml
file and the template.html
file in the directory specified by $SERVMONDIR
. Examples of both are included in this repository.
Grab Binaries from The Releases Page
brew install Jmainguy/tap/servmon
# if running podman on arm64
podman run --name servmon -d \
-p 8080:8080 \
-v $(pwd)/monitor.yml:/monitor.yml \
--env SLACK_TOKEN=xoxb-1986333393-gRNl6nANyVXhSGKJGDc9QHsa \
--env SLACK_CHANNEL=C02U1PAFP8Q \
hub.soh.re/servmon:latest-arm64
After starting up servmon
a status page will b available at http://localhost:8080
as shown below:
servmon
also keeps a log of access attempts which looks like this:
export GO111MODULE=on
go build