selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
netmon logo

Self-host netmon

0.1.0

Network monitor with AI sarcastic reports

AlphaOpen SourceMIT
Updated2 weeks ago
LanguagePython
Setup difficultyModerate
Stars
287
Requires
Nmap, OpenAI-compatible API, Speedtest-cli
Install with pip
24-hour network speed test graph showing download, upload, ping, and device count trends

What is netmon?

netmon is a Python-based network monitoring bot you run on your own macOS or Linux machine. It executes a single-threaded speed test every half hour using speedtest-cli and counts active LAN devices via nmap ARP scans. Results are kept in a local SQLite file. Every four hours the tool renders a matplotlib chart of the last 24 hours and ships a report with sarcastic AI commentary to Telegram or a Discord webhook. The LLM client works with any OpenAI-compatible endpoint, so you can point it at a local Ollama or LM Studio server. Setup relies on uv for Python and dependency management, plus system-installed nmap and speedtest-cli with passwordless sudo for nmap. The code is MIT-licensed.

Should you self-host netmon?

netmon scores 40/100 on selfhost.directory (how scoring works) and ranks #40 of 48 in Network Monitoring. It has 287 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. It is MIT-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is mitmproxy (86/100, 46 446 stars). It scores higher overall, so compare the two before you pick. See netmon vs mitmproxy side by side.

Features

  • 24-hour trend graphs
  • AI-generated sarcastic reports
  • Data transfer tracking
  • Discord Notifications
  • Hourly status updates
  • LAN device scanning
  • Local SQLite storage
  • OpenAI-compatible LLM Support
  • Speed Testing
  • Telegram Notifications

netmon README

How to install netmon

Install netmon with pip

macOS or Linux, nmap, speedtest-cli, uv, passwordless sudo for nmap
Environment variables
AI_API_KEY, AI_MODEL, AI_BASE_URL, NOTIFIER, TG_BOT_TOKEN, TG_CHAT_ID, DISCORD_WEBHOOK_URL, DB_PATH, REQUEST_TIMEOUT

curl -LsSf https://astral.sh/uv/install.sh | sh git clone https://github.com/Role1776/netmon.git cd netmon uv sync cp .env.example .env

edit .env with your configuration

uv run main.py

Requires system-installed nmap and speedtest-cli, and passwordless sudo for nmap

How to configure netmon

  • AI_API_KEYYour LLM provider API key (any string works for most local servers)

    Your LLM provider API key (any string works for most local servers)

  • AI_BASE_URLBase API URL (e.g., https://api.openai.com/v1, or your local server's URL)

    Base API URL (e.g., https://api.openai.com/v1, or your local server's URL)

  • AI_MODELModel name (e.g. gpt-4o-mini, or a local model name)

    Model name (e.g. gpt-4o-mini, or a local model name)

  • DB_PATHmetrics.sqlSQLite database file path (e.g. metrics.sql)

    SQLite database file path (e.g. metrics.sql)

  • DISCORD_WEBHOOK_URLDiscord channel webhook URL — required if NOTIFIER=discord

    Discord channel webhook URL — required if NOTIFIER=discord

  • NOTIFIERtelegramNotifier backend: "telegram" (default if unset) or "discord"

    Notifier backend: "telegram" (default if unset) or "discord"

    values: telegram, discord

  • REQUEST_TIMEOUT30Optional HTTP timeout in seconds for Telegram/Discord requests (positive integer, default 30)

    Optional HTTP timeout in seconds for Telegram/Discord requests (positive integer, default 30)

  • TG_BOT_TOKENTelegram bot token from @BotFather — required if NOTIFIER=telegram

    Telegram bot token from @BotFather — required if NOTIFIER=telegram

  • TG_CHAT_IDYour Telegram Chat ID — required if NOTIFIER=telegram

    Your Telegram Chat ID — required if NOTIFIER=telegram

More in Network Monitoring

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…