1,546
Android POS devices
331
Store groups
5 min
Sync interval
24/7
Live monitoring
In this case study
The problem
Joe Coffee runs Android point-of-sale devices across hundreds of store groups, managed through the Esper mobile device management platform. Esper knows the state of every device, but that knowledge lived behind a REST API and a management console built for one-device-at-a-time work. Nobody could answer fleet questions quickly: which stores are on an old app version, which devices have been offline for more than a day, what changed overnight.
Goal: turn raw Esper API data into dashboards and alerts that answer fleet-wide questions in seconds, running entirely on a self-hosted server with no cloud dependencies.
End-to-end data pipeline
Every device heartbeat flows through a multi-threaded Python sync engine, lands in MariaDB, and surfaces in Grafana in near real time. The whole stack runs under Docker Compose on the warehouse server.
1 · Esper MDM cloud API
Source of truth for device status, hardware, app versions and events, consumed over REST.
2 · Python sync engine
A four-thread container that runs every five minutes: master device sync, hardware info, factory-reset enrichment and Slack formatting.
3 · MariaDB
The esper_report database stores device state, app versions, hardware specs and 180 days of history, all in UTC.
4 · Grafana
Dynamic dashboards behind Caddy with automatic HTTPS from ZeroSSL, so certificates never need manual renewal.
A full fleet sync completes in under two minutes, every five minutes, around the clock. Docker Compose orchestrates Grafana, MariaDB, the sync scripts and n8n with persistent volumes and automatic restarts.
Four production dashboards
Joe OS Fleet Intelligence
The flagship dashboard: group health overview, version compliance by store, offline-duration buckets and 30-day trend panels for device counts and rollout progress.
- Group health heat map by store region
- Offline device buckets at 1 h, 4 h, 24 h and 7 d+
- Semver-aware detection of the current stable version
- Per-group version compliance percentage
- 30-day historical trend with nightly cleanup
Joe OS Versions
Repeat panels generated per app version, driven by a multi-value version_select variable, so a new release gets its own panel automatically. Filter by group, status or warehouse.
Esper Event Feed
A live scrolling log of boots, app installs, policy changes and connectivity events across the fleet, filterable by device, group or event type, with 180-day retention.
Device and App Alerts
Grafana alert rules watch for devices offline beyond a threshold, version compliance falling below target, and suspicious hardware changes.
Always-on automation
Dashboards are only useful when someone opens them. The platform pushes the important numbers to the team before anyone does.
Daily summary at 06:00 Pacific
An n8n workflow queries MariaDB, builds a Slack Block Kit message and posts fleet health to the engineering channel before the workday starts.
Block Kit alerts over webhooks
Rich messages with device counts, version breakdowns and offline lists, delivered by plain HTTP webhook to bypass the limitations of n8n’s Slack node.
Four-thread sync engine
Parallel threads for device sync, hardware info, factory-reset enrichment and Slack formatting keep the full cycle under two minutes.
Grafana alerting
Threshold rules for offline duration, compliance and hardware anomalies fire to the same webhook path.
Edge cases and data quality
Most of the engineering time went into the details that make a fleet dashboard trustworthy:
- Carrier detection so cellular and Wi-Fi devices are classified correctly.
- Warehouse filter to keep staged and spare devices out of store compliance numbers.
- UTC storage with local display so offline durations are right across time zones.
- Semver-aware sorting so
v4.10.0lands afterv4.9.0, not before it. - Authoritative hardware table covering 2,074 devices in total, including non-Joe-OS hardware, so every piece of equipment is accounted for.
- Nightly cleanup jobs that keep 180 days of history without letting the database grow unbounded.
What we built
2,074
Total devices tracked
4
Live dashboards
180 d
Data retention
< 2 min
Full sync time
Design choice
100% self-hosted. Grafana, MariaDB, Python and n8n all run on the warehouse server. There are no per-seat SaaS fees, no data leaving the building, and the entire stack restarts itself after a power event.
Richard Applegate