Skip to main content

monitorit (awatch)

Self-hosted FastAPI monitoring with a built-in dashboard — traffic, errors, Apdex, request logs, consumers, uptime, and alerts.

No Grafana. No cloud account. No phone-home telemetry. Metrics stay on your machine in SQLite.

PyPI: monitorit · Import: from monitorit import awatch · Dashboard: /__awatch

from fastapi import FastAPI
from monitorit import awatch

app = FastAPI()
awatch.AWatch(app, env="dev")  # → http://127.0.0.1:8000/__awatch

A lightweight, privacy-first alternative to hosted API analytics (e.g. Apitally) and a simpler path than Prometheus + Grafana for single-app FastAPI services.


Why monitorit?

Need monitorit
FastAPI request monitoring dashboard Built-in at /__awatch
One-line setup awatch.AWatch(app)
Self-hosted / on-prem Local SQLite (default)
Request inspector Opt-in headers, bodies, logs, cURL export
Consumer analytics awatch.set_consumer(...)
Alerts Email, Slack, Discord, webhook
Secret safety Masking + path excludes by default

Install

Python 3.10+ recommended.

python3 -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate
pip install -U pip
pip install monitorit

From GitHub

pip install "git+https://github.com/Abdulwadood39/awatch.git"

Editable / contributing

git clone https://github.com/Abdulwadood39/awatch.git
cd awatch
pip install -e ".[dev]"

Verify

python -c "from monitorit import awatch; print(awatch.__version__, awatch.AWatch)"

Full details: docs/installation.md.


Quick start

  1. Attach awatch to your FastAPI app (snippet above).
  2. Run with uvicorn:
uvicorn your_module:app --reload
  1. Open the FastAPI monitoring dashboard: http://127.0.0.1:8000/__awatch.

Try the demos in this repo

pip install -e ".[dev]"
uvicorn examples.basic_app:app --reload
curl http://127.0.0.1:8000/
curl -X POST http://127.0.0.1:8000/items \
  -H 'Content-Type: application/json' \
  -d '{"name":"gadget","price":9.5}'
curl http://127.0.0.1:8000/boom

Production auth

env="prod" requires an auth_token (or auth_dependency):

import os
from monitorit import awatch

awatch.AWatch(
    app,
    env="prod",
    auth_token=os.environ["AWATCH_TOKEN"],
    allow_ui_config=False,
)

Unlock the UI with ?token=... or the in-browser Unlock dialog. More: docs/usage.md.


Features

  • Traffic / Errors / Performance — per-endpoint stats, Apdex, timelines
  • Request inspector — headers, bodies, correlated logs, exceptions, cURL export
  • Opt-in body/header logging with default secret masking
  • Consumersawatch.set_consumer() for individuals and groups
  • Traffic labels — categories defined in code
  • 422 heatmaps — which Pydantic fields fail validation
  • Do not track — exclude sensitive paths (code or Settings)
  • Uptime — heartbeat + synthetic checks + external ping
  • Alerts — triggers in code → email / Slack / Discord / webhook
  • Settings UI — SMTP, excludes, uptime, Apdex (lockable)
  • Auth gate for production dashboards
  • Quiet access logs — dashboard polls do not spam uvicorn (default on)
  • Retention controls — age + row-cap prune (default 7 days / 10k rows)
  • Paginated request logs — lightweight list payloads; full detail on click
  • Outbound HTTP inspector — linked httpx calls under each inbound request
  • Postgres / MySQL — optional storage backends (monitorit[postgres|mysql])

Documentation

Doc Topic
docs/ Index
Installation pip / venv / editable
Usage Integrate & run
Configuration Options, Settings lock, excludes
Dashboard Tabs & filters
Consumers awatch.set_consumer()
Categories Traffic labels
Alerts Triggers
Privacy Masking & threat model
Publishing PyPI releases

Contributing

Contributions are welcome — bugs, docs, tests, dashboard UX, and features.

  1. Open an issue for ideas or bugs
  2. Fork, branch, and open a PR
  3. Run pytest before submitting

Good first areas: documentation polish, more tests, Postgres storage, alert channels, dashboard UI.


Development

pip install -e ".[dev]"
pytest
uvicorn examples.basic_app:app --reload

Package layout: src/monitorit/awatch/ (core, capture, privacy, analytics, storage, health, triggers, api, dashboard).


Links


License

MIT © Abdulwadood

Download files

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

Source Distribution

monitorit-0.2.1.tar.gz (86.4 kB view details)

Uploaded Source

Built Distribution

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

monitorit-0.2.1-py3-none-any.whl (108.5 kB view details)

Uploaded Python 3

File details

Details for the file monitorit-0.2.1.tar.gz.

File metadata

  • Download URL: monitorit-0.2.1.tar.gz
  • Upload date:
  • Size: 86.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for monitorit-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1dc276f618200e6aab0e199c2efd04ac5829ed98aab5a45d9d5a5ce1d0adbf68
MD5 62ab61e90dd2ae894e2617afe1f43c66
BLAKE2b-256 5e9f7a299a2aec30b8340ac00bceb31384a8bd5f8de558554e622d6313462fd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for monitorit-0.2.1.tar.gz:

Publisher: publish.yml on Abdulwadood39/awatch

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

File details

Details for the file monitorit-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: monitorit-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 108.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for monitorit-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c27810cc29bae948997e263d52f2ed7f67cf1fb9c352570cc984e7ad83a4b1dc
MD5 ff3f1d8234a058cd49e825d4c2b6b7b2
BLAKE2b-256 2df3476e41b4ae29607161e0908f3518606743fab76e71302055d18c60ff5e50

See more details on using hashes here.

Provenance

The following attestation bundles were made for monitorit-0.2.1-py3-none-any.whl:

Publisher: publish.yml on Abdulwadood39/awatch

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