You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Augusto Dwenger J. 9f1938fde6
Add language definition to the code blocks
8 months ago
alert Replace all occurrences from assert with require 8 months ago
analyse Fix RAM analyse result string messge having wrong content 9 months ago
config Move transformation of rules T array to Analyser interface func 8 months ago
gsave Pin gsave version to specific commit hash 9 months ago
stats Replace all occurrences from assert with require 8 months ago
.dockerignore Add docker setup to build a gmon image 8 months ago
.drone.yml Change deployment trigger to promote 8 months ago
.gitignore Add gmon config files to ignore 9 months ago
Dockerfile Add docker setup to build a gmon image 8 months ago
LICENSE Initial commit 12 months ago
README.md Add language definition to the code blocks 8 months ago
docker-compose.yml Add docker-compose dev environment 9 months ago
go.mod Implement logrus to log the main package 8 months ago
go.sum Implement logrus to log the main package 8 months ago
main.go Add some more logging to the main, stats and alert package 8 months ago
monitor.go Move the monitoring functions to an own struct 8 months ago

README.md

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