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.
- 2 Connected products A native Nginx telemetry module and a dedicated Android fleet-monitoring client.
- C + Kotlin Core languages Low-level server collection meets a modern Compose mobile experience.
- Bounded Telemetry state Top-N series, histories, and cardinality are explicitly capped inside the module.
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
-
Nginx Timers
Native periodic collectors read Linux process and system signals outside individual request paths.
-
Shared Telemetry
Shared memory, atomic counters, bounded top-N values, and history buffers retain a controlled working set.
-
Monitoring Endpoints
Dashboard, JSON, health, SSE, and Prometheus endpoints expose the same operational model.
-
Secure Android Client
Kotlin, Compose, encrypted credentials, SQLite history, alerts, background refresh, and widgets provide fleet access.
-
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.
-
Checkpoint 01
Collect expensive system data on timers rather than repeating filesystem work for every dashboard or API request.
-
Checkpoint 02
Use shared memory and bounded series to keep module memory and Prometheus cardinality predictable.
-
Checkpoint 03
Protect endpoints with ACLs, authentication, tokens, CORS rules, and rate limits appropriate to each deployment.
-
Checkpoint 04
Package builds against exact distribution and Nginx ABIs instead of assuming a generic binary will load safely.
-
Checkpoint 05
Encrypt client credentials, persist local history, refresh in the background, and preserve TLS identity during LAN fallback.
Critical Encounter
Boss Fight
-
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.