CGI-based system metrics collector and frontend.
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.
 
 
 
diamondburned 8f0b1bab5f Actually fix CSS (externally fetching) 1 year ago
cmd Actually fix CSS (externally fetching) 1 year ago
.drone.yml Add Drone CI 1 year ago
LICENSE Initial commit 1 year ago
README.md Add sysmet-http, update README 1 year ago
go.mod Add sysmet-http, update README 1 year ago
go.sum Add sysmet-http, update README 1 year ago
iterator.go Fix gaps in CPU, Network and Disk 1 year ago
iterator_test.go Add ReadBucketEdges for performance 1 year ago
ps.go Better hovering, minor documentation tweaks 1 year ago
screenshot.png Minor CSS tweaks; updated README 1 year ago
sysmet.go Better hovering, minor documentation tweaks 1 year ago

README.md

sysmet

screenshot

A no-JavaScript CGI-based lightweight system metrics collector and frontend, effectively a very tiny version of the Grafana + Telegraf + InfluxDB stack.

Usage

sysmet-update

sysmet-update is the metrics collector for the database. It is meant to be called every n duration, usually 15 seconds or a minute. It can only be called every second.

Using systemd-timers or crond is recommended. Below is an example for crond:

sysmet-update -db /opt/sysmet/db

sysmet-http

sysmet-http is the frontend daemon that serves the HTML pages on the given listen address. It should be used like so:

sysmet-http -db /opt/sysmet/db 127.0.0.1:5000

Most use cases should involve another external web server like Caddy to provide HTTPS. In Caddy's case, its Caddyfile could be as simple as this:

https://domain.com

reverse_proxy http://127.0.0.1:5000

sysmet-cgi

sysmet-cgi is the CGI version of sysmet-http. Most people should not use this.

API Documentation

Refer to pkg.go.dev as well as the test suites.

Note to Self

If I ever ponder about using BadgerDB over bbolt: don't, simply don't. Bbolt allows concurrent read opens AND (!!!) waits until the exclusive writer is done WITHOUT needing write permissions.