Skip to main content

An offline-embracing, modular, multi-instance monitor for homelabs and Linux computers

Project description

monitor@/monitorat masthead that shows the french IPA phonetics and the tagline 'a system for observing and documenting status' and an icon with a monitor and superimposed at-character

[ demo ]

Monitorat is a federated dashboard and documentation system with a widget system. Its philosophy is to make system monitoring and documentation continuous, much like the way tables and igures are intergrated in journal or news articles. It does not control services or perform updates.

Available widgets:

Widgets have a general, self-contained structure where both API and UI are straightforward to create.

~/.config/monitor@/widgets/
└── my-widget
    ├── api.py
    ├── index.html
    └── app.js

Dashboard documentation is handled through through the Wiki widget. Each document snippet added is a new widget instance. This document and any others you add to your wiki will be rendered in GitHub-flavored markdown via markdown-it.

Gallery

It's best to checkout the demo which is a fully interactive version of the application you could be running on your machines. Screenshots of the demo are compiled below.

Installation

Both installation methods assume you are using a configuration file at ~/.config/monitor@/config.yaml.

Installing with uv

PyPI: The simplest way is to install from PyPI.

curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install monitorat

Source: Or install the package from source/development:

git clone https://github.com/brege/monitorat.git
cd monitorat
uv tool install -e .

In either case, start the server:

monitorat -c path/to/config.yaml server --host 0.0.0.0 --port 6161

or run the demo:

monitorat demo --mode simple      # single-instance dashboard
monitorat demo --mode advanced    # single-instance, with feature config examples
monitorat demo --mode federation  # multiple machines, and widget integration examples

These demos are all held on monitorat.brege.org:

Systemd service

Assuming you'd like to run monitor@ as a systemd service with your normal user, group, and hostname:

bash <(curl -s https://raw.githubusercontent.com/brege/monitorat/refs/heads/main/scripts/install-systemd-uv.sh)

This pulls the uv-flavored systemd script from scripts/install-systemd-uv.sh, using sudo internally to install the systemd unit to /etc/systemd/system/monitor@.service.

For alternate installs, see docs/install.md to install monitor@/monitorat => /opt/monitor@ and other deployments.

The Dashboard

Open http://localhost:6161, or your specifed port, or configure through a reverse proxy.

Configuration

These are the basic monitor@ settings for your system, assuming you want to put all icons, data and the config file in ~/.config/monitor@/ which is the default location.

site:
  name: "@my-nas"
  title: "Dashboard @my-nas"

paths:
  data: data/
  img: img/  # or /home/user/.config/monitor@/img/

widgets: { ... }

# privacy: { ... }
# alerts: { ... }
# notifications: { ... }

Widgets

monitor@ has an extensible widget system. You can add any number of widgets to your dashboard multiple times over, re-order them, and enable/disable any you don't need. You can add more widgets from others in ~/.config/monitor@/widgets/.

widgets:
  enabled:             # dashboard positions: from top to bottom
    - services
    - services-wiki    # type: wiki
    - metrics
    - metrics-wiki     # type: wiki
    - # reminders      # '#' disables this widget
    - network
    - speedtest
    - my-widget        # in ~/.config/monitor@/widgets/

Each widget can be configured in its own YAML block. To configure a widget in its own file,

includes:
  - "/home/user/.config/monitor@/widgets/my-widget.yaml"

or do this for every widget through config snippets:

includes:
  - include/services.yaml
  - include/metrics.yaml
  - include/reminders.yaml
  - include/network.yaml
  - include/speedtest.yaml
  - include/my-widget.yaml
  - # ... wikis, user widgets, etc
Making your own

They are also quite easy to build. Example of a widget built with Codex in 12 minutes:

Services

The Service Status widget is a simple display to show what systemd service daemons, timers and docker containers are running or have failed. GitHub - Demo

You can configure the service tiles to have both your URL (or WAN IP) and a local address (or LAN IP) for use offline. monitor@ is completely encapsulated and works offline even when internet is down.

Wiki

Some widgets you may want to use more than once. For two markdown documents ("wikis"), use type: wiki. wiki: <title> may only be used once. GitHub - Demo

Changing widget order or enabling/disabling widgets is rather straightforward.

widgets:
  enabled: 
    - network
    - network-wiki
    - services
    - services-wiki
    - metrics
    - speedtest
    - ...

monitor@ uses GitHub-flavored markdown

System Metrics

Metrics provides an overview of system performance, including CPU, memory, disk and network usage, and temperature over time. Data is logged to metrics.csv. GitHub - Demo

Speedtest

The Speedtest widget allows you to keep a record of your internet performance over time. It does not perform automated runs. GitHub - Demo

Network

The Network widget may be the most specific. This example uses ddclient-style generated logs. GitHub - Demo

The network widget is best used on machines with continuous uptime. You might even keep monitor@ running on your pi-hole.

Reminders

The Reminders widget allows you to set reminders for system chores, login/key change reminders, and other one-offs chirps. GitHub - Demo

Reminders are facilitated by Apprise (see below).

Privacy

The privacy mask helps share your setup online without exposing personal information. Those are just string replacements; add as many as you like.

privacy:
  replacements:
    my-site.org: example.com
    my-hostname: masked-hostname
    ...
  mask_ips: true

Running

monitorat config

will print the runtime config with these masks applied.

Alerts

Alerts are tied to system metrics, where you set a threshold and a message for each event.

Alerts example configuration
alerts:
  cooldown_minutes: 60  # Short cooldown for testing
  rules:
    high_load:
      threshold: 2.5    # load average (e.g., the '1.23' in 1.23 0.45 0.06)
      priority: 0       # normal priority
      message: High CPU load detected
    high_temp:
      threshold: 82.5   # celsius
      priority: 1       # high priority  
      message: High temperature warning
    low_disk:
      threshold: 95     # percent
      priority: 0       # normal priority
      message: Low disk space warning

Notifications

The notifications system uses Apprise to notify through practically any service, via apprise URLs.

notifications:
  apprise_urls:
    - "pover://abscdefghijklmnopqrstuvwxyz1234@4321zyxwvutsrqponmlkjihgfedcba"
    - "mailto://1234 5678 9a1b 0c1d@sent.com?user=main@fastmail.com&to=alias@sent.com"
    - # more apprise urls if needed...

Contributors

See installing from source for initializing a development server and alternative deployment methods.

For all other development, see contributing.

License

GPLv3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monitorat-0.9.1.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monitorat-0.9.1-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file monitorat-0.9.1.tar.gz.

File metadata

  • Download URL: monitorat-0.9.1.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for monitorat-0.9.1.tar.gz
Algorithm Hash digest
SHA256 8783e6b6e70ad80502b9b34f83a5edf70d9bec467d7a2dcc218c43d956196108
MD5 7c64a9452d91a975de1699c86dce7f5b
BLAKE2b-256 a11feb010187e75e37bd5a4a26d6d51e0df4af90e45f2882b71185398fb3f78e

See more details on using hashes here.

Provenance

The following attestation bundles were made for monitorat-0.9.1.tar.gz:

Publisher: publish.yml on brege/monitorat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monitorat-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: monitorat-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for monitorat-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 829e5c7898ec3ca9c9f38a5a4e06bf2c75d13b6c3d9d6eda0bf9b4b08c2b1a1b
MD5 00c9d4e81dfbc08bf740f404c818bbe6
BLAKE2b-256 609ba6ec4025e666163bee18f66238157ce3818c50a725b5b3fc946ed7abcc24

See more details on using hashes here.

Provenance

The following attestation bundles were made for monitorat-0.9.1-py3-none-any.whl:

Publisher: publish.yml on brege/monitorat

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page