Skip to main content

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 Description
Prometheus Metrics Database Time-series collection and storage with powerful query language (PromQL)
Grafana Visualisation Dashboards, alerting, and data exploration
MKTXP MikroTik Exporter Exports RouterOS metrics (interfaces, queues, firewall, wireless)
Node Exporter Host Metrics CPU, memory, disk, network stats from Linux servers
cAdvisor Container Metrics Docker container resource usage and performance
pmacct Flow Analysis NetFlow/IPFIX traffic accounting and analysis

Architecture

The monitoring system follows a pull-based collection model with centralised storage and visualisation:

Data Flow

┌──────────────────────────────────────────────────────────────────┐
│                        DATA SOURCES                              │
├──────────────────────────────────────────────────────────────────┤
│                                                                  │
│   ┌─────────────┐    ┌─────────────┐    ┌─────────────┐         │
│   │  MikroTik   │    │   Linux     │    │   Docker    │         │
│   │   Router    │    │   Hosts     │    │ Containers  │         │
│   └──────┬──────┘    └──────┬──────┘    └──────┬──────┘         │
│          │                  │                  │                │
│          ▼                  ▼                  ▼                │
│   ┌─────────────┐    ┌─────────────┐    ┌─────────────┐         │
│   │    MKTXP    │    │    Node     │    │  cAdvisor   │         │
│   │  (Exporter) │    │  Exporter   │    │             │         │
│   └──────┬──────┘    └──────┬──────┘    └──────┬──────┘         │
│          │                  │                  │                │
└──────────┼──────────────────┼──────────────────┼────────────────┘
           │                  │                  │
           │    :9436/metrics │   :9100/metrics  │  :8080/metrics
           │                  │                  │
           ▼                  ▼                  ▼
┌──────────────────────────────────────────────────────────────────┐
│                       PROMETHEUS                                 │
│                    (Metrics 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     │             │          │             │
└─────────────┘          └─────────────┘          └─────────────┘
                                │
                                │ Aggregated flow data
                                ▼
                         ┌─────────────┐
                         │   Grafana   │
                         │  (Traffic   │
                         │  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.