Overview
Nekotopia operates a comprehensive monitoring infrastructure to ensure service reliability, performance optimisation, and proactive issue detection. Our telemetry stack is built on industry-standard open-source tools, providing real-time visibility into network health and VPN service performance.
Monitoring Stack
Core Components
| Component | Purpose | ||
|---|---|---|---|
| Prometheus | Metrics Database | Time-series | |
| Grafana | Visualisation | Dashboards, alerting, and | data |
| MKTXP | MikroTik Exporter | Exports RouterOS metrics | (interfaces, |
| Node Exporter | |||
| cAdvisor | Container |
||
| pmacct | Flow Analysis | NetFlow/IPFIX traffic accounting and analysis |
Architecture
The monitoring system follows a pull-based collection model with centralised storage and visualisation:
ArchitectureData Flow
┌──────────────────────────────────────────────────────────────────┐
│ DATA SOURCES │
├──────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ MikroTik │ │ Linux │ │ Docker │ │
│ │ Router │ │ Hosts │ │ Containers │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ MKTXP │ │ Node │ │ cAdvisor │ │
│ │ (Exporter) │ │ Exporter │ │ │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
└──────────┼──────────────────┼──────────────────┼────────────────┘
│ │ │
│ :9436/metrics │ :9100/metrics │ :8080/metrics
│ │ │
▼ ▼ ▼
┌──────────────────────────────────────────────────────────────────┐
│ MikroTik │────▶│ Prometheus │────▶│ Grafana │
│ RouterPROMETHEUS │
│ (Metrics DB)Database) │
│ │
│ • Scrapes exporters every 15 seconds │
│ • Stores 30 days of metrics │
│ • Evaluates alerting rules │
└─────────────────────────────┬────────────────────────────────────┘
│
│ :9090/api
▼
┌──────────────────────────────────────────────────────────────────┐
│ GRAFANA │
│ (Dashboards) │
│ │
│ • VPN User Statistics • Router Health │
│ • Bandwidth by Tier • Container Resources │
│ • Traffic Analysis • Alert Management │
└──────────────────────────────────────────────────────────────────┘
NetFlow Traffic Analysis
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ MikroTik │ NetFlow │ pmacct │ metrics │ Prometheus │
│ Router │────────▶ │ Collector │────────▶ │ │
│ │ v9 │ │ │ │
└─────────────┘ └─────────────────┘ └─────────────────┘
│
▲
│ NetFlowAggregated v9flow │data
▼
│
┌─────────────────┐
│ │ pmacctGrafana │─────────────┘
│ (FlowTraffic │
│ Analysis) │
└─────────────────┘
Key Metrics Collected
Network Metrics
- Interface throughput - Bytes in/out per interface
- Packet rates - Packets per second, errors, drops
- Queue statistics - Per-user bandwidth enforcement
- Firewall counters - Rule hit counts, blocked connections
- WireGuard peers - Handshake status, data transfer
System Metrics
- CPU/Memory - Server and router resource usage
- Disk I/O - Storage performance
- Container health - Docker service status
- Process monitoring - Critical service uptime
Traffic Analysis
- Flow records - Source/destination IP, ports, protocols
- Bandwidth by user - Per-VPN-peer traffic accounting
- Top talkers - Highest bandwidth consumers
- Protocol distribution - Traffic breakdown by application
Access
Grafana dashboards are available to administrators at the internal monitoring endpoint. User-facing statistics are exposed through the Nekotopia dashboard where appropriate.