Skip to content

Repository files navigation

NetWatcher

Overview

NetWatcher is an open-source distributed network monitoring platform consisting of three components:

  • Controller – Go backend (Iris framework) with REST API and WebSocket server
  • Panel – Vue 3 frontend for dashboards, agent management, and visualization
  • Agent – Go daemon that executes monitoring probes and reports data

The system uses PostgreSQL for metadata storage and ClickHouse for time-series probe data.

Quick Start

# Clone the repository
git clone https://github.com/netwatcherio/netwatcher-oss.git
cd netwatcher-oss
# Start infrastructure with Docker
docker-compose up -d
# Configure and run controllercd controller
cp .env.example .env
# Edit .env with your settings
go run .# In another terminal, run the panelcd panel
npm install
npm run dev

See docs/development.md for detailed setup instructions.

Documentation

DocumentDescription
ArchitectureSystem design and data flow
API ReferenceREST API endpoints with required roles
Data ModelsDatabase schemas and types
DeploymentProduction deployment guide
DevelopmentSetup, building, and testing
PermissionsRole-based access control
Panel ArchitectureFrontend design and patterns
Agent ProbesProbe types and configuration
TrafficSimInter-agent traffic simulation
AlertingAlert rules and notifications

Environment Variables

Controller

# App settings
LISTEN=0.0.0.0:8080
KEY=<jwt-signing-key># Required: 32+ chars
PIN_PEPPER=<pin-pepper># Required: random string# PostgreSQL
DB_DRIVER=postgres
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=netwatcher
POSTGRES_PASSWORD=<password>
POSTGRES_DB=netwatcher
# ClickHouse
CLICKHOUSE_HOST=localhost
CLICKHOUSE_PORT=9000
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=
CLICKHOUSE_DB=netwatcher

See controller/.env.example for all options.

Panel

CONTROLLER_ENDPOINT=https://api.netwatcher.io

Docker Compose

version: '3.8'services:
controller:
build: ./controllerenvironment:
LISTEN: "0.0.0.0:8080"DB_DRIVER: "postgres"POSTGRES_HOST: "postgres"KEY: "${JWT_SECRET}"depends_on:
- postgres
- clickhousepanel:
build: ./panelports:
- "3000:3000"postgres:
image: postgres:14environment:
POSTGRES_PASSWORD: ${PG_PASSWORD}volumes:
- pgdata:/var/lib/postgresql/dataclickhouse:
image: clickhouse/clickhouse-server:latestvolumes:
- chdata:/var/lib/clickhousecaddy:
image: caddy:2-alpineports:
- "80:80"
- "443:443"volumes:
- ./Caddyfile:/etc/caddy/Caddyfilevolumes:
pgdata:
chdata:

Permissions

NetWatcher uses role-based access control (RBAC) for workspace-scoped operations:

RoleLevelCapabilities
OWNER4Full control, delete workspace, transfer ownership
ADMIN3Manage members, delete agents & probes
USER2Create/edit agents and probes
VIEWER1Read-only access

See docs/permissions.md for the complete permission matrix.

Probe Types

TypeDescription
MTRMulti-hop traceroute with per-hop latency and loss
PINGICMP ping with RTT statistics
DNSDNS resolution monitoring with query time metrics
SPEEDTESTDownload/upload speed measurements
SYSINFOSystem information (CPU, memory, OS)
NETINFONetwork information (public IP, gateway, ISP)
TRAFFICSIMInter-agent traffic simulation

Project Structure

netwatcher-oss/
├── agent/ # Monitoring agent daemon
├── controller/ # Backend API server
│ ├── internal/ # Business logic
│ └── web/ # HTTP routes & middleware
├── panel/ # Vue.js frontend
│ ├── src/
│ │ ├── composables/ # Vue composables
│ │ ├── router/ # Route guards
│ │ ├── services/ # API services
│ │ └── views/ # Page components
├── docs/ # Documentation
├── docker-compose.yml # Production deployment
├── docker-compose.dev.yml # Development (DB only)
└── Caddyfile # Reverse proxy config

License

GNU Affero General Public License v3.0

About

NetWatcher is an open-source distributed network monitoring platform consisting of three components:

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages