Simple Monitoring and Alerting System for Hobbyists/Home data centres/etc.
2.2K
Smash (ugh) is a basic monitoring and alerting system for home data centres and, I suppose, really small offices. The intended target is sites with a need to monitor a handful of systems without investing the time or energy in a more full-fledged system like Nagios or Zabbix or a more complex logging and monitoring stack. The seminal use case is my small rack of old computers operating in my furnace room--nothing fancy, but definitely inconvenient when filesystems fill up or a system's OS is way out of date and I don't know about it.
The Smash server only supports Postgres. There is no initialization feature at this stage; the database must be initialized with the following schema:
DROP VIEW IF EXISTS latest_statii;
DROP TABLE IF EXISTS statii;
DROP TABLE IF EXISTS nodes;
CREATE TABLE nodes (
id SERIAL PRIMARY KEY,
name TEXT UNIQUE NOT NULL,
key TEXT NOT NULL,
registered TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE statii (
id SERIAL PRIMARY KEY,
node_id INTEGER NOT NULL,
test VARCHAR(32) NOT NULL,
state VARCHAR(10) NOT NULL,
message TEXT,
reported TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (node_id) REFERENCES nodes(id)
);
CREATE VIEW latest_statii AS
SELECT DISTINCT ON (node, test)
name AS node, test, state, message, reported
FROM statii
LEFT JOIN nodes ON statii.node_id = nodes.id
ORDER BY node, test, reported DESC
;
Content type
Image
Digest
sha256:291aae5bc…
Size
22 MB
Last updated
about 2 years ago
docker pull dlek/smash