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 figures are integrated in journal or news articles.

Available widgets:

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

~/.config/monitorat/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/monitorat/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 monitorat 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/monitorat and other deployments.

The Dashboard

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

Configuration

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

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

paths:
  data: data/
  img: img/  # or /home/user/.config/monitorat/img/

widgets: { ... }

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

Widgets

monitorat 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/monitorat/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/monitorat/widgets/

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

includes:
  - "/home/user/.config/monitorat/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. monitorat 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
    - ...

monitorat 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 monitorat 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.2.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.2-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: monitorat-0.9.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d6eb92e6d199b2946572aabfda7f25f171b2bbd2a4cab3d180c91ef00bc76528
MD5 eb0457aec0ec4d1c52bf86d0a998953e
BLAKE2b-256 8e3b9ef7592b5c6992d2756828bcb75b9b33687eba454c83ea1a0a00d9716fde

See more details on using hashes here.

Provenance

The following attestation bundles were made for monitorat-0.9.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: monitorat-0.9.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c91e797717543a894287cebeb212df389c6d42b453fe63a8c97aea3006640a2
MD5 be9cfe7c90db8ec4ff706803484be54e
BLAKE2b-256 b13d316f9ae78421bab77250b6aa6b7af27591de2aa83b98a3a6b049b0ceacfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for monitorat-0.9.2-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