Observability Quest

Nginx Monitoring Stack

This monitoring stack pairs a dependency-free Nginx module written in C with a Kotlin and Compose Android client. Together they expose bounded server telemetry and turn it into encrypted, resilient fleet monitoring, history, alerts, and widgets.

Role
Solo developer · Nginx module, telemetry model, Android client, security, packaging, and releases
Timeline
2025–present
Status
Public source

Mission Brief

The project began with a practical question: how can an operator inspect Linux and Nginx health directly from the server without adding a heavy runtime, then carry the same signal into a useful mobile fleet view?

Both halves needed conservative resource use, secure remote access, and graceful behavior when a server is only reachable through a local network path.

System Map

Architecture

  1. Nginx Timers

    Native periodic collectors read Linux process and system signals outside individual request paths.

  2. Shared Telemetry

    Shared memory, atomic counters, bounded top-N values, and history buffers retain a controlled working set.

  3. Monitoring Endpoints

    Dashboard, JSON, health, SSE, and Prometheus endpoints expose the same operational model.

  4. Secure Android Client

    Kotlin, Compose, encrypted credentials, SQLite history, alerts, background refresh, and widgets provide fleet access.

  5. Network Fallback

    The client can retry a configured local address while preserving the original hostname for TLS SNI validation.

Strategy Route

Battle Plan

The implementation path, checkpoint by checkpoint.

  1. Checkpoint 01

    Collect expensive system data on timers rather than repeating filesystem work for every dashboard or API request.

  2. Checkpoint 02

    Use shared memory and bounded series to keep module memory and Prometheus cardinality predictable.

  3. Checkpoint 03

    Protect endpoints with ACLs, authentication, tokens, CORS rules, and rate limits appropriate to each deployment.

  4. Checkpoint 04

    Package builds against exact distribution and Nginx ABIs instead of assuming a generic binary will load safely.

  5. Checkpoint 05

    Encrypt client credentials, persist local history, refresh in the background, and preserve TLS identity during LAN fallback.

Critical Encounter

Boss Fight

Boss HP Resolved
  • Native Nginx code runs inside a critical server process: leaks, unbounded labels, blocking collection, or an ABI mismatch can turn monitoring into the outage. The module therefore favors small dependencies, bounded state, and explicit compatibility.

Achievements Unlocked

Quest Rewards

What the quest delivered.

  • Reward 01 unlocked

    Operators can access one telemetry model through a local dashboard, JSON, health checks, live SSE updates, or Prometheus.

  • Reward 02 unlocked

    The mobile client turns individual endpoints into a practical server fleet with alerts, history, secure credentials, and widgets.

  • Reward 03 unlocked

    LAN fallback improves reachability without weakening hostname-based TLS verification.

Special Items

Technical Loadout

  • C
  • Nginx Module API
  • Linux /proc
  • Shared Memory
  • Prometheus
  • Server-Sent Events
  • Kotlin
  • Jetpack Compose
  • SQLite
  • Android Widgets

Proof of Work

Explore the Quest

Capabilities are documented from the two public repositories. No fleet size, traffic volume, or production adoption metric is claimed.