Most backend work lives in a comfortable world of HTTP requests and databases. Monitoring physical infrastructure is different. The data comes from hardware in racks you will never see, over networks you do not control, on a schedule set by physics rather than by users clicking buttons.
I worked on a data center infrastructure monitoring platform that collects power data from Schneider Electric rack PDUs across multiple sites. Node.js collector services gather SNMP telemetry at each location, each collector reports a heartbeat, and Laravel APIs bring the data together for central dashboards and reports. Here is what that kind of system teaches you, and what I would tell any team starting one.
Lesson 1: put a collector at every site, and keep it dumb
It is tempting to poll every device from one central server. Don’t. SNMP was designed for local networks, and polling across sites adds latency, firewall rules and a single point of failure. A small collector per location polls its own devices, normalises the readings, and sends them to the central platform over HTTPS.
Keep the collector simple: poll, normalise, send, report health. Business logic such as thresholds, reports and alert rules belongs in the central application, where you can change it once instead of redeploying to every site.
Lesson 2: a collector that stopped talking is your most important alert
The scariest failure in monitoring is not a red graph. It is a flat, quiet graph because the collector died at 2 a.m. and nobody noticed. Every collector should send a heartbeat on a fixed interval, separate from the data itself, and the central platform should treat a missing heartbeat as an incident in its own right.
// Central side (Laravel scheduler): flag collectors that have gone quiet.
Schedule::call(function () {
Collector::query()
->where('last_heartbeat_at', '<', now()->subMinutes(3))
->where('status', '!=', 'offline')
->each(function (Collector $collector) {
$collector->update(['status' => 'offline']);
CollectorWentOffline::dispatch($collector);
});
})->everyMinute();
Separate heartbeats also tell you where the problem is: collector down, site network down, or devices unreachable from a healthy collector. Those need different people.
Lesson 3: counters lie unless you handle wraparound and resets
Many SNMP values are cumulative counters rather than current readings. To get a rate you subtract the previous reading from the current one, and that is where the traps are. Fixed-size counters wrap back to zero when they hit their maximum, and devices reset counters when they reboot. Naive subtraction turns either event into a huge negative or absurd spike on your dashboard.
// A 32-bit counter wraps at 2^32. Treat a drop as a wrap only when it is plausible;
// otherwise assume the device rebooted and skip this interval.
function counterDelta(prev, curr, bits = 32) {
if (curr >= prev) return curr - prev;
const wrapped = 2 ** bits - prev + curr;
return wrapped < 2 ** (bits - 1) ? wrapped : null; // null = reset, no data point
}
Store the raw reading as well as the computed value. When a number looks wrong six months later, you will want the evidence.
Lesson 4: normalise at the edge, model at the centre
Different device models expose the same idea (power, current, voltage, outlet state) under different identifiers and units. If raw vendor identifiers leak into your central database, every dashboard query becomes a lookup table of exceptions. Map readings to your own model at the collector: site, rack, device, metric, value, unit, timestamp. Adding a new device model then means changing one mapping, not every report.
Lesson 5: timestamps come from the collector, not the server
Network hiccups mean readings can arrive late or in bursts. If the central API stamps readings with “now”, a five-minute outage turns into a flat line followed by a spike that never happened. Stamp each reading when it was taken, keep collector clocks synchronised with NTP, and let the API accept slightly late data in the correct place on the timeline.
Lesson 6: design the API for write volume and read patterns
Monitoring is write-heavy and read-predictable. Collectors send small batches constantly, while people read aggregates: last hour, last day, per rack, per site. A few choices go a long way:
- Accept batches, not one reading per request.
- Index for the questions people ask: time range plus site, rack or device.
- Pre-aggregate older data into hourly and daily summaries, and keep raw readings for a shorter window.
- Make ingestion idempotent, so a collector that resends a batch after a timeout does not create duplicates.
Lesson 7: the people reading the dashboard are not engineers
Facilities teams, account managers and customers care about one question: is anything at risk? A dashboard of 400 tiny graphs answers that badly. Lead with status (healthy, warning, critical, offline) per site and rack, let people drill down to the graph, and make reports something they can send to a customer without editing. Working closely with the project manager and a React frontend developer on that platform made this obvious: the backend’s job is to make the right question cheap to answer.
Where this applies beyond data centers
The same architecture of edge collectors, heartbeats, normalised readings and a central API fits IoT fleets, energy metering, manufacturing lines, cold-chain logistics and building management. If your product turns signals from physical things into decisions, these lessons apply.
Collecting data from devices, sites or third-party systems? I build Node.js collectors and services and Laravel APIs for monitoring, integrations and reporting. Tell me what you need to measure.