kiss server monitoring tool with email alerts
go monitoring

Compare changes

Choose any two refs to compare.

+1 -4
.gitignore
···
-
# If you prefer the allow list template instead of the deny list, see community template:
-
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
-
#
# Binaries for programs and plugins
*.exe
*.exe~
···
# env file
.env
-
.servmon.yaml
+
.servmon.yaml
+21
.servmon.example.yaml
···
+
alert_thresholds:
+
cpu:
+
threshold: 90
+
duration: 5m0s
+
cooldown: 30m0s
+
memory:
+
threshold: 80
+
cooldown: 30m0s
+
http:
+
url: http://localhost:8080/health
+
timeout: 5s
+
sample_rate: 10
+
failure_threshold: 20
+
check_interval: 1m0s
+
cooldown: 15m0s
+
email:
+
smtp_server: smtp.example.com
+
from: alerts@example.com
+
to: admin@example.com
+
username: alertuser
+
password: alertpassword
+24
.tangled/workflows/ci.yml
···
+
when:
+
- event: ["push"]
+
branch: ["main"]
+
- event: ["pull_request"]
+
branch: ["main"]
+
+
engine: "nixery"
+
+
# using the default values
+
clone:
+
skip: false
+
depth: 1
+
submodules: false
+
+
dependencies:
+
nixpkgs:
+
- go
+
+
steps:
+
- name: "Build servmon"
+
command: "go build ."
+
+
- name: "Run tests"
+
command: "go test ./... -v"
-9
Makefile
···
-
#!/usr/bin/make -f
-
-
PWD=$(shell pwd)
-
-
build:
-
go build -o servmon-bin .
-
-
install:
-
go install .
-21
config.example.yaml
···
-
alert_thresholds:
-
cpu:
-
threshold: 90
-
duration: 5m0s
-
cooldown: 30m0s
-
memory:
-
threshold: 80
-
cooldown: 30m0s
-
http:
-
url: http://localhost:8080/health
-
timeout: 5s
-
sample_rate: 10
-
failure_threshold: 20
-
check_interval: 1m0s
-
cooldown: 15m0s
-
email:
-
smtp_server: smtp.example.com
-
from: alerts@example.com
-
to: admin@example.com
-
username: alertuser
-
password: alertpassword