How it works
The full design, and the decisions behind it, are in the repository’s architecture document and decision records. This is the short version.
One program, three roles
Section titled “One program, three roles”mm-core is a single program, the same on every machine. Its role decides what it does:
- An agent collects its own metrics and events and sends them to its hosts.
- A host receives them from its agents, keeps the history and events, checks the alert rules, and serves the dashboard.
- Both does both.
It’s small: a few megabytes, using little memory and a fraction of a percent of CPU. Agents send changes every 30 seconds, and every second while someone is looking at a dashboard.
Nothing leaves your network
Section titled “Nothing leaves your network”There’s no cloud service, account or telemetry. Machines find each other with mDNS and talk directly. History is kept in files on the host.
Pairing and trust
Section titled “Pairing and trust”Every machine has its own key, made when it’s installed, and its ID is that key’s fingerprint.
Pairing uses a 6-digit code with SPAKE2, a password-authenticated key exchange, bound to the encrypted connection it runs over. Someone in the middle can’t relay it, and gets one guess per attempt, with three attempts before the code is void. The code can’t be cracked offline. Once paired, each machine remembers the other’s key, and every connection after that is TLS 1.3 with both keys pinned. A machine that isn’t paired can’t even complete a connection.
Read-only by design
Section titled “Read-only by design”Monitoring never runs anything on your machines. A host can’t send commands to its agents, and no web page, API or other machine can add a script. Scripts are only added by editing a machine’s own config file, and mm-core refuses any script file that someone other than an administrator could change.
The dashboard and the local API
Section titled “The dashboard and the local API”The dashboard is served by mm-core on 127.0.0.1, never on the network. It logs in with a one-time link
(mm-core open, or the app). It’s protected against other websites and other programs on the same
machine: requests are checked for their origin, sessions aren’t cookies, and the command line and app
sign every request without sending the key.
Remote access is the only way to the dashboard from the network. It’s off until you set a password, uses HTTPS, limits wrong passwords, and can view but not change settings.
| Port | Who can reach it | |
|---|---|---|
| 47470 (TCP) | Hosts: agents connect here | Paired machines only |
| 47471 (TCP) | The local API and dashboard | This machine only (127.0.0.1) |
| 47472 (TCP) | Remote access, when on | Your network, with the password |
| 5514 (UDP, TCP) | Syslog, when on | This machine only (127.0.0.1) |