LiveMonitor: catching failing equipment before it becomes a loss

Sensors on any equipment across every site of a chain — refrigeration, power, climate, water and the rest; rules that raise an issue only when it matters; and the people who fix it in the same system.

3 min read

livemonitor.cloud

LiveMonitor is a monitoring system for organisations with many sites: restaurant chains, retail with its warehouses, production. Sensors report from any equipment that can be measured: refrigeration, ovens, power lines, ventilation, water, the air in the room. Rules watch the readings and raise an issue when something is wrong. People — the company's own staff or a service contractor — take the issue, fix it and close it.

This article explains why we built it, what the system does and the engineering problems that turned out to be the interesting ones.

Why we built it

The idea comes from experience. An earlier system of ours monitored the kitchens of a restaurant chain, and it taught us what this kind of software is really for. A walk-in fridge that warms up overnight spoils its stock before anyone arrives. An oven left running through the weekend shows up only on the electricity bill. Both are easy to detect and cheap to prevent — if the right person hears about it in time and nobody has learned to ignore the alerts.

We rebuilt the concept from the ground up as a multi-tenant product, so that it serves any organisation and any kind of equipment, not one chain's kitchens. The ideas were carried over — the tree of site, sensor and metric, rule templates, the life of an issue, contractor access. The code was not.

What it does

  • Intake. Readings arrive over MQTT or as HTTP batches from gateways on site.

  • Rules. Templates with inheritance — a rule set once for all freezers applies everywhere and can be overridden for one. Thresholds, ranges, duration, rate of change, device state, missing data and schedules.

  • Issues. Open, in progress, resolved; four levels of severity; a response deadline with escalation; merging of duplicates; maintenance mode.

  • Contractors. A refrigeration or electrical service company gets its own workspace and sees only the equipment the client shares with it.

  • The picture. A floor plan with live sensor values, a heat map with a time slider, charts and comparison between sites.

  • Reports. On screen, in Excel and in PDF, including a temperature log of the kind food-safety inspections ask for, sent on a schedule.

  • On site. An installable web app with push notifications, a kiosk mode for a wall screen and a QR sticker on each sensor.

An AI assistant explains an issue in plain language and writes a morning digest. The interface is in English and Russian.

livemonitor.cloud
LiveMonitor: an overview of all locations and the phone app

Alerts people act on

The hardest part of monitoring is not detecting a deviation. It is staying quiet when the deviation is normal. A freezer warms up during every defrost cycle. A kitchen's air gets worse at the peak of dinner service. A system that reports all of it trains its users to swipe notifications away, and then the one that matters goes with the rest.

LiveMonitor's rules carry guards: conditions under which a rule stays silent. A temperature rule can ignore a freezer during defrost and for a set time afterwards. The default norms are a starting point, and every site adjusts them to its own equipment.

Two problems worth describing

Row-level security and time-series compression do not combine

Tenant isolation in LiveMonitor is PostgreSQL row-level security on every table, forced, with a test that fails the build if a table is missing its policy. The time-series table was the exception we had to engineer. TimescaleDB cannot compress a table that has row-level security, and without compression the raw readings do not fit on a reasonable disk.

So the readings table has no row-level policy — and the application role has no right to read it at all. Every read goes through one database function that applies the same visibility rule as the policies do: your own tenant, plus what has been shared with you as a contractor. A test checks that a direct query is refused.

Measure the storage before promising it

The specification estimated five to ten gigabytes for ninety days of history. The first real measurement was about twenty. Moving compression from a few days after ingestion to one day brought it to about twelve, with no data lost. The estimate was wrong and the measurement was cheap; that is the usual order of things, and it is why we measure.

In our load test — 40 gateways, 720 sensors, 2,480 metrics — the system took 121 messages a second with a 95th-percentile write delay under 250 ms, and a chart query answered in 0.1–0.3 seconds.

More from Insights.

All articles ↗

Start a project

Have something serious to build?

A short brief is enough to begin. We answer with questions, a plan and a price.

Start a project ↗or just send a message →