Skip to content

About

A not awful server monitoring solution.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

533 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TheWatcher

Currently under active development.

TheWatcher is a platform agnostic server/endpoint monitoring platform trying to be better than the complex and ugly solutions that are currently out there.

It's been created in C++20 with deployable user-space agents, a ZeroMQ/LibSodium data plane, a server that stores its data in SQLite or PostgreSQL, and a React dashboard.

Agents initiate all network connections. They enroll with the server, submit metrics periodically, send heartbeats, and request current runtime config after each metrics submission. The server receives data, queues commands/config responses over the existing agent connection, exposes the REST API, and marks agents offline when last_seen exceeds the configured threshold.

Quick Start

Build everything from a Visual Studio developer PowerShell prompt:

.\scripts\setup-build-env.cmd -SkipWsl
.\meson-build.cmd

(On Linux: ./scripts/setup-build-env-linux.sh then meson setup builddir-release --buildtype=release && meson test -C builddir-release --print-errorlogs. On BSD: ./scripts/setup-build-env-bsd.sh and the same meson commands.)

Start the server in foreground mode:

.\builddir-release\server\TheWatcherServer.exe --config C:\ProgramData\TheWatcher\TheWatcherServer.conf

Create or edit the agent config:

THEWATCHER_SERVER=127.0.0.1

Start the agent in foreground mode:

.\builddir-release\agent\TheWatcherAgent.exe --config C:\ProgramData\TheWatcher\TheWatcherAgent.conf

Run the dashboard during development:

cd dashboard
npm.cmd install
npm.cmd run dev

Open http://127.0.0.1:5173, approve the pending agent on the Pending Enrollments page, and wait for metrics to arrive. The approved enrollment response gives the agent the server public key plus a pinned fingerprint, which the agent writes back to TheWatcherAgent.conf.

Documentation

  • Linux Installation Guide: install and configure the server and agent on Linux, with systemd units and firewall rules.
  • Windows Installation Guide: install and configure the server and agent on Windows, with services and firewall rules.
  • Reverse Proxy: publish the dashboard over HTTPS with nginx, Apache httpd, Caddy or IIS, with example configuration.
  • Installation: build outputs, install locations, Windows service installation, non-Windows supervision.
  • Rolling Release: prebuilt Linux, FreeBSD, and Windows packages published from main, how to install and verify them. Installing one sets the service up (an agent only needs to be told where its server is).
  • Configuration: every server and agent config option, default config paths, generated files, and command-line overrides.
  • Running: foreground start/stop, service start/stop, dashboard startup, enrollment workflow, and health checks.
  • Architecture: server, agent, common protocol, dashboard, storage, and command/config data flow.
  • Dashboard: UI behavior, API contract, and development commands.
  • REST API: every route with its role, request and response shapes, error codes, input limits and paging.
  • Threat model: assets, trust boundaries, threats, mitigations and residual risks.
  • High availability: topology for running the server with PostgreSQL behind a load balancer.
  • Development: repository layout, build/test targets, coding workflow, and how to extend the product end to end.
  • Progress Tracker: alpha, beta, and v1 production release Done/TODO tracking.
  • Collector Contract: how collectors populate SystemMetrics and what to change when adding a collector.
  • Build Environment: Windows, Linux, and BSD toolchain setup for the Meson build.
  • Logging: log file locations and startup diagnostics.
  • Service Installation: focused Windows service command reference.
  • Architecture decisions: the decisions that would otherwise be easy to undo by accident, with the alternatives that were rejected and why.

Main Targets

meson compile -C builddir-release TheWatcherServer TheWatcherAgent
meson test    -C builddir-release server_config store
meson test    -C builddir-release server_agent_integration

The dashboard is built with npm:

cd dashboard
npm.cmd run build
npm.cmd test

Screenshots

Monitoring

Agents

Alerts

About

A not awful server monitoring solution.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages