A small monitoring system to check nodes and create notifications.
Go to file
Gibheer efa2f5b307 add support for debug checker log output
With monzero supporting slog to get debug output from check commands,
moncheck now supports that too by changing the level to debug.
2023-09-05 15:24:11 +02:00
cmd add support for debug checker log output 2023-09-05 15:24:11 +02:00
man migrate moncheck to slog 2023-09-05 15:07:38 +02:00
schema remove old schema file 2022-11-22 21:23:26 +01:00
vendor update dependencies 2022-11-11 11:22:50 +01:00
.gitignore ignore live config files 2018-11-19 14:17:11 +01:00
executor.go add basic infrastructure for writing a checker 2021-12-02 15:55:48 +01:00
go.mod update dependencies 2022-11-11 11:22:50 +01:00
go.sum update dependencies 2022-11-11 11:22:50 +01:00
LICENSE add LICENSE file 2022-12-15 11:30:53 +01:00
Makefile migrate moncheck to slog 2023-09-05 15:07:38 +02:00
moncheck.conf.example migrate moncheck to slog 2023-09-05 15:07:38 +02:00
monfront.conf.example prepare switch to log/slog 2023-08-17 22:02:52 +02:00
monwork.conf.example add example config files 2018-11-19 14:15:31 +01:00
monzero.go add debug log support for the checker 2023-09-05 15:23:43 +02:00
README.md extend the README with a configuration section 2018-12-11 13:44:03 +01:00
TODO add TODO items 2023-08-17 21:29:24 +02:00


Monzero is a collection of tools with the purpose of running monitoring checks and triggering notifications.


runtime requirements:

  • PostgreSQL >= 10.0

build requirements:

  • Go >= 1.11


The following components exist:


Moncheck is the daemon that runs the checks and generates notifications in the database. It is possible to run multiple instances of moncheck, as it uses PostgreSQL as a coordinator through the PostgreSQL internal locking mechanism.

Moncheck uses the table active_checks to detect which checks to run.


Monfront is a webfrontend to view the current state of all checks, configure hosts, groups, checks and view current notifications. It is possible to run multiple instances.


Monwork is a small server that does all the maintenance work in the background. It is responsible to cleanup the history and generate the configuration.

The configuration is generated into active_checks when an entry in nodes, command or checks was changed (detected through the updated column).


To get the system working, first install the database. After that, create an alarm mapping:

insert into mappings(name, description) values ('default', 'The default mapping');
insert into mapping_level values (1, 0, 0, 'okay', 'green');
insert into mapping_level values (1, 1, 1, 'okay', 'orange');
insert into mapping_level values (1, 2, 2, 'okay', 'red');
insert into mapping_level values (1, 3, 3, 'okay', 'gray');

Next is to create a notifier. This feature doesn't work 100% yet and needs some work and may look different later:

insert into notifier(name) values ('default');

After that create a check command:

insert into commands(name, command, message) values ('ping', 'ping -n -c 1 {{ .ip }}', 'Ping a target');

This command can contain variables that are set in the check. It will be executed by moncheck and the result stored.

After that, create a node which will get the checks attached:

insert into nodes(name, message) values ('localhost', 'My localhost is my castle');

With that prepared, create the first check:

insert into checks(node_id, command_id, notifier_id, message, options)
values (1, 1, 1, 'This is my localhost ping check!', '{"ip": ""}');

Now start the daemons moncheck, monfront and monwork.

monwork will transform the configured check into an active check, while moncheck will run the actual checks. Through monfront one can view the current status.