No description
Find a file
2020-11-18 10:05:29 +01:00
alert Replace all occurrences from assert with require 2020-11-17 17:23:54 +01:00
analyse Fix RAM analyse result string messge having wrong content 2020-11-14 19:21:37 +01:00
config Move transformation of rules T array to Analyser interface func 2020-11-17 15:05:33 +01:00
gsave Pin gsave version to specific commit hash 2020-11-09 10:04:36 +01:00
stats Replace all occurrences from assert with require 2020-11-17 17:23:54 +01:00
.dockerignore Add docker setup to build a gmon image 2020-11-16 13:57:25 +01:00
.drone.yml Change deployment trigger to promote 2020-11-16 17:49:41 +01:00
.gitignore Add gmon config files to ignore 2020-11-11 16:15:17 +01:00
docker-compose.yml Add docker-compose dev environment 2020-11-05 15:42:54 +01:00
Dockerfile Add docker setup to build a gmon image 2020-11-16 13:57:25 +01:00
go.mod Implement logrus to log the main package 2020-11-16 23:29:32 +01:00
go.sum Implement logrus to log the main package 2020-11-16 23:29:32 +01:00
LICENSE Initial commit 2020-08-13 11:38:29 +02:00
main.go Add some more logging to the main, stats and alert package 2020-11-17 17:16:21 +01:00
monitor.go Move the monitoring functions to an own struct 2020-11-17 16:00:15 +01:00
README.md Add language definition to the code blocks 2020-11-18 10:05:29 +01:00

gmon

Build Status

Analyse data from gsave and send a notification to Gotify.

Configuration

There are tow necessary configuration files for this service to work.

  • config.toml
  • rules.toml

It will look for this files inside the current directory. To specify another path use the --config and --rules arguments with the path and the file name.

config.toml

Example configuration:

# The interval in which it should check for new data.
interval = 1

# Configuration for the gsave endpoint.
[stats]
endpoint = "http://localhost:8080"
hostname = "foobar" # The hostname of the host you want to monitor.
token = "foo"

# Configuration for the gotify notification endpoint.
[gotify]
endpoint = "http://localhost:80"
token = "AzCkehMSkHFlphf"

rules.toml

Example configuration:

[[CPU]]
Name = "Unexpected CPU usage"
Description = "More than 50% of CPU utilization"
Compare = ">"
Warning = 50.0
Alert = 100.0
Deactivated = false

[[Disk]]
Name = "Unexpected disk usage"
Description = "More than 50 GB of the disk are used"
Compare = ">"
Warning = 50000
Alert = 70000
Deactivated = true

[[RAM]]
Name = "Unexpected RAM usage"
Description = "More than 5 GB of the RAM are in use"
Compare = ">"
Warning = 5000
Alert = 7000
Deactivated = false