RSSAmplifier

Blog

(untitled)

Recent content on

omarghader.github.ioRSS feed ↗83 posts

Latest posts

How We Cut Our Prometheus / VictoriaMetrics Storage Bill by 60% (Cardinality Audit Walkthrough)

The bill that made me open a support ticket with myself Last October our VictoriaMetrics cluster crossed 340 million active time series and our monthly infra cost for the storage tier hit $4,900. Nobody had approved that number. It just… grew, the way disk usage always grows, one Helm chart install at a time until finance asks why the “monitoring” line item is bigger than the…

Fixing alert fatigue: what actually works

Every noisy alert your team learns to dismiss makes the real one easier to miss too. Here’s how alert fatigue actually happens, and how to fix it.

The Observability Paradox: Why Your Monitoring Bill Keeps Growing While MTTR Doesn't Improve

It’s 2:47 AM. Your phone lights up. PagerDuty, Opsgenie, Slack — take your pick. A checkout service is throwing 500s and revenue is bleeding in real time. You open the observability platform your company pays six figures a year for. Dashboards everywhere. Seventy open panels. Three different tools for logs, metrics, and traces that don’t talk to each other. Forty minutes later,…

ESP32-S3 Camera Pan-Tilt Security Tracker: Build a Smart ESP32 Weather Station

I set out to build a pan-tilt security camera with an ESP32-S3 and ended up creating a fully-fledged ESP32 weather station while I was at it. The idea was simple: I wanted to keep an eye on the packages that couriers keep leaving in the rain, but also to know exactly how wet and miserable those packages were getting. Adding a cheap temperature and humidity sensor to the camera mount turned the…

How to Build Your Infrastructure Monitoring in 2026

Every year I get asked the same question by teams starting from scratch: “we have Grafana, we have some dashboards, why do we still get paged for things we didn’t see coming?” Most of the time, the answer isn’t a missing tool. It’s a missing method. Teams jump straight to “let’s install Prometheus” or “let’s buy a SaaS observability…

An Introduction to PWM: Controlling RGB LED Colors with an ESP32 Potentiometer

I’ll be honest: my first attempt to build an adjustable colored lamp ended with a dead LED and a faint smell of burnt hope. I’d hooked up an RGB LED straight to the ESP32’s GPIO pins, spun a potentiometer, and expected a smooth rainbow. Instead, I got a single angry flicker, then darkness. What I’d missed wasn’t just a current‑limiting resistor — it was the whole concept of Pulse Width Modulation…

From ESP32 Weather Station to Home Security Monitor with HC-SR501 PIR Sensor

A few months ago I cobbled together a simple ESP32 weather station that dutifully reported temperature and humidity to my Home Assistant dashboard. It worked great until my cat decided the breadboard was a better bed than the couch. While the weather station slowly transitioned into a fur-covered sensor graveyard, I needed something else to do with the spare ESP32 Development Board Module I had…

Smart Weather Station ESP32: Control High-Voltage Appliances with a 2-Way Relay

Last winter my garage turned into a walk‑in freezer every night because I’d simply forget to flip the heater switch before bed. I wanted something that didn’t just display the temperature but actually did something with it—so I set out to build an ESP32 weather station that reads the room conditions and physically switches a high‑voltage appliance. The result is a small, Wi‑Fi‑connected brain that…

Build a Smart Weather Station with ESP32 and DHT11 OLED Display

Introduction I’ve always been slightly obsessed with knowing the exact temperature of my office. Not the outside weather — I can open a window for that — but the microclimate around my desk, where the Wi‑Fi router and the afternoon sun conspire to turn summer afternoons into a slow roast. A few months ago I threw together a bare DHT11 dangling from my ESP32, just spitting readings to the serial…

ESP32 Weather Station Alert: DIY Touchless Alarm System with Infrared Obstacle Avoidance

Last winter, right after I had finally fine‑tuned my home‑brewed ESP32 weather station, our cat discovered the temperature sensor dangled from the windowsill and treated it as a feline punching bag. Within a week the outdoor humidity reading was permanently stuck at 99%—not because of a monsoon, but because the sensor had been batted onto the muddy ground one time too many. I needed a way to know…

Monitoring stack for a fintech platform

Prometheus, Grafana, and alerting rollout that cut incident response time by 50%.

Turn ESP32 Into a Smart Energy Meter with Home Assistant Integration

I’ve always been a bit obsessed with data, especially when it comes to understanding my home’s energy consumption. After getting hit with a surprisingly high electricity bill last winter, I decided it was time to stop guessing and start measuring. Commercial smart plugs with energy monitoring are great, but what if you want to monitor a whole circuit, like your kitchen or workshop?…

Make Your Garage Door Smart with ESP32 and Home Assistant

I’ve always had this nagging anxiety about whether I remembered to close the garage door. After driving halfway to work only to turn back and check (more than once, I’ll admit), I decided it was time for a solution. I wanted something more reliable than my memory and more integrated than a basic standalone smart opener. In this tutorial, I’ll show you how I used a cheap ESP32…

Solar Panels System Monitoring

Build a home assistant dashboard for solar panel systems

Set Up Grafana Alerts and Notifications via Slack, Email, or Webhook

I’ll admit it: I used to be the person who constantly refreshed my Grafana dashboards, nervously watching a CPU usage graph creep upwards. It was like babysitting a pot of water, waiting for it to boil. This, of course, is not a scalable strategy for managing a smart home system or any observability stack. The whole point of having these beautiful dashboards is to be proactive, not reactive.…

Control and Automate Air Purifier with ESP32 and Home Assistant Air Quality Index

I’ve always been a bit obsessive about air quality. Living in a city, you notice the difference a good air purifier makes, but I got tired of manually turning it on every time the pollution levels spiked. It felt, well, decidedly un-smart. So I set out to fix that by creating a system where my air purifier automatically kicks in when the Home Assistant Air Quality Index (AQI) reaches a certain…

Using Labels and Relabeling in Prometheus for Clean, Scalable Metrics

I’ll admit it: the first time I looked at a raw Prometheus metrics endpoint, I felt a bit overwhelmed. It was like staring at a tangled ball of yarn, with metric names and labels sprawling in every direction. I was collecting thousands of time series, but finding the specific signal in the noise felt nearly impossible. That’s when I truly understood the power of labels and relabeling in…

Build a Room Occupancy Tracker with ESP32 and Ultrasonic Sensors

I’ve been tinkering with smart home automation for years, always looking for clever ways to make my home more responsive. Commercial room occupancy sensors work fine, but they’re expensive and often limited in functionality. After one too many instances of my smart lights turning off while I was still reading in my favorite armchair, I decided to build my own room occupancy tracker…

How to Set Up Prometheus Remote Write to Push Metrics to VictoriaMetrics

I’ve been running my own monitoring stack for years, and if there’s one thing I’ve learned, it’s that Prometheus alone can feel like trying to store all your holiday decorations in a single shoebox. It works fine at first, but soon you’re dealing with capacity issues and wondering where that one crucial metric from three months ago disappeared to. That’s why I…

Build a Smart Light Dimmer with ESP32 and a Rotary Encoder in Home Assistant

I’ve always loved the tactile feel of a good knob. While voice commands and smartphone apps are convenient, there’s something deeply satisfying about physically turning a dial to dim the lights. I wanted to bridge that gap between the digital smarts of Home Assistant and the physical world. So, I set out to build a custom smart light dimmer with ESP32 and a rotary encoder. The goal was simple: a…

Visualizing Time Series Data Using Grafana’s Transform and Threshold Tools

I’ve been staring at Grafana dashboards for years now—first while monitoring complex cloud infrastructure, and more recently to keep tabs on my increasingly smart (and sometimes overly opinionated) home. There’s a particular frustration that comes with a dashboard that shows data but doesn’t tell a story. You know the one: a tangled mess of lines on a graph, all in the same…

Turn ESP32 Into a BLE Beacon Scanner for Presence Detection in Home Assistant

Turn ESP32 Into a BLE Beacon Scanner for Presence Detection in Home Assistant Before we begin: This guide assumes you have Home Assistant already set up and are comfortable with basic ESPHome configurations. I’ve tried nearly every presence detection method in my smart home journey - from WiFi-based tracking that drained my phone battery to GPS solutions that were anything but reliable…

Detect Outliers in Your Metrics: A Practical Guide to Grafana Machine Learning

I’ve always been the kind of person who stares at a Grafana dashboard, watching a squiggly line, and wondering, “Is that dip normal? Should I be worried?” For years, my answer was to set up a basic threshold alert. If CPU usage goes above 90%, page someone. But what about the weird, subtle stuff? The slow creep of memory leakage or the sudden, inexplicable drop in request rate that doesn’t…

Control a Smart Fan with ESP32 and Home Assistant Using Temperature Triggers

I’ve always been fascinated with making my home smarter, especially when it comes to energy efficiency and comfort. There’s something deeply satisfying about having your home respond to environmental conditions without lifting a finger. In this tutorial, I’ll show you how I built a system that automatically controls a fan based on room temperature using an ESP32 and Home…

Monitor Home Internet Speed Automatically with Prometheus and Speedtest Exporter

I've been battling my internet service provider for months over sporadic slowdowns that always seem to happen right before my important video calls. Sound familiar? After one too many "everything looks fine on our end" responses, I decided to take matters into my own hands and build a system that automatically tracks my internet speed 24/7. In this tutorial, I'll show you how to set up your own…

Automating Window Blinds with ESP32 Servo Motor and Home Assistant

I’ve always been fascinated with the idea of waking up to natural sunlight instead of a blaring alarm clock. But as someone who also values sleeping in on weekends, I needed a solution that could give me the best of both worlds. That’s when I decided to automate my window blinds with an ESP32 and servo motors, integrating everything seamlessly with Home Assistant. After a few…

Using PromQL to Analyze CPU, Memory, and Network Metrics Effectively

If you’ve ever stared at a Grafana dashboard wondering why your server’s CPU is spiking like a caffeinated squirrel, you’re not alone. Prometheus and PromQL are my go-to tools for making sense of infrastructure metrics—once you get the hang of them, they’re like having X-ray vision for your systems. In this guide, I’ll walk you through writing effective PromQL queries to monitor CPU, memory, and…

Prometheus vs VictoriaMetrics: Performance, Storage, and Query Language Compared

I’ve spent years tinkering with monitoring tools—first as a hobbyist automating my smart home, then professionally while scaling observability pipelines. Two names kept popping up: Prometheus (the de facto standard) and VictoriaMetrics (the “faster, cheaper” alternative). But which one should you use? Let’s break it down with real-world benchmarks, storage deep-dives, and query…

Building a Monitoring Stack with Prometheus, VictoriaMetrics, and Grafana: A Full Setup Guide

Ever found yourself drowning in server logs, wondering why your application crashed again at 3 AM? I’ve been there—more times than I’d like to admit. That’s why I built a robust monitoring stack with Prometheus, VictoriaMetrics, and Grafana to keep an eye on my systems. In this guide, I’ll walk you through setting up this powerful trio to collect, store, and visualize metrics at scale—without…

Control RGB LEDs with ESP32 and Home Assistant Automations

Ever wanted to add some pizzazz to your smart home with colorful, dynamic lighting? I recently tackled this project myself—using an ESP32 to control addressable RGB LEDs and integrating them seamlessly into Home Assistant. The result? A lighting setup that responds to automations, time of day, and even sensor inputs. Here’s how you can do it too. Why This Project? Addressable RGB LEDs (like…

Log Aggregation Using Grafana Loki: A Beginner’s Guide

Ever stared at a mountain of logs, desperately searching for that one error that crashed your service? I’ve been there—more times than I’d like to admit. That’s why I fell in love with Grafana Loki, a lightweight log aggregation system that pairs perfectly with Grafana for seamless troubleshooting. In this guide, I’ll walk you through setting up Loki to collect logs and correlate them with metrics…

DIY ESP32-Based Motion Sensor for Home Assistant Security Automations

Ever walked into a dark room and wished the lights would just know to turn on? Or wanted a simple way to alert you when someone’s lurking near your front door? That’s where a DIY ESP32-based PIR motion sensor comes in. I recently built one to integrate with Home Assistant, and it’s been a game-changer for my home security automations. Here’s how you can do it too—no PhD in electrical engineering…

Monitoring Disk Space Across Servers Using Node Exporter and Prometheus

Ever had that sinking feeling when your server runs out of disk space at 3 AM? I have—more times than I’d like to admit. After one too many midnight emergencies, I decided to automate disk space monitoring using Prometheus, Node Exporter, and Grafana. Here’s how you can set it up too, complete with alerts and pretty dashboards to keep your sanity intact. Why Monitor Disk Space? Disk space is one…

ESP32 smart home platform

Home Assistant tutorial featured in tutorials read by 10k+ people.

Build a Wi-Fi Presence Detector Using ESP32 and Home Assistant

Ever walked into a room and wished the lights would just know to turn on? Or wanted your smart home to react the moment your phone connects to Wi-Fi? With an ESP32 and Home Assistant, you can build a Wi-Fi presence detector that does exactly that—no fancy sensors or wearables required. In this guide, I’ll walk you through my own journey of setting this up, complete with code snippets,…

How to Use Recording Rules in Prometheus to Reduce Load and Speed Up Queries

I remember the first time my Prometheus server groaned under the weight of a complex Grafana dashboard—it felt like asking a toddler to solve calculus. Dashboards loaded slower than my morning coffee brewed, and my CPU metrics looked like a stress test. That’s when I discovered recording rules, Prometheus’s secret weapon for taming expensive queries. Here’s how to use them effectively. Why…

Control Lights Based on Room Occupancy Using PIR and ESP32

Ever walked into a room, arms full of groceries, only to fumble for the light switch? Or worse—left the lights on all day in an empty room? With a PIR motion sensor and an ESP32, you can automate your lights to turn on when someone enters and off when the room is vacant. It’s a simple yet powerful way to save energy and add convenience to your smart home. In this tutorial, I’ll walk you through…

ESP32 + OLED Display: Display Weather from Home Assistant

Ever wanted a sleek, always-on display showing the current weather right from your Home Assistant dashboard? I did—and after some tinkering, I built one using an ESP32 and a tiny OLED screen. In this guide, I’ll walk you through the process, sharing pitfalls I encountered (like why my first attempt showed gibberish instead of temperatures) and how to avoid them. Why This Project? I love having…

Create an ESP32-Powered Smart Mailbox Notification System with Home Assistant

Ever missed an important piece of mail because you forgot to check your mailbox? I certainly have—more times than I’d like to admit. That’s why I built a smart mailbox notification system using an ESP32 and a simple tilt sensor. Now, I get instant alerts in Home Assistant whenever the mailbox door opens. No more guessing! In this guide, I’ll walk you through the entire process—from wiring the…

Build a Smart Thermostat with ESP32, Home Assistant, and Relays

Ever wanted to ditch your clunky old thermostat for a DIY smart version that integrates seamlessly with Home Assistant? I did—and after a few weekends of tinkering (and a couple of fried relays), I built a reliable ESP32-based smart thermostat. Here’s how you can too. Why Build a DIY Smart Thermostat? Commercial smart thermostats are great, but they often come with limitations: proprietary…

Automate Your Curtains with a Smart Tuya Roller Chain Motor: A Step-by-Step Guide

Ever wished your curtains could open and close on their own? Maybe you’re tired of fumbling with cords in the morning or want to impress your friends with a “Hey Google, open the curtains” moment. Whatever your reason, automating your curtains with a Tuya Smart Curtain Roller Chain Motor is easier than you think. Here’s how I did it—and how you can too. Why Automate Your Curtains? I’ll…

Voice-Controlling Your Home with ESP32 and Home Assistant via Google Assistant

Ever wished you could turn off the lights without lifting a finger—or even getting out of bed? I certainly have, especially on those lazy Sunday mornings. That’s why I set out to integrate my ESP32-based smart devices with Home Assistant and Google Assistant, enabling voice control for my entire home. In this guide, I’ll walk you through the process step by step, sharing the pitfalls I encountered…

Track Your Electricity Consumption with Shelly Pro 2PM: Advantages and Home Assistant Integration

Ever stared at your electricity bill and wondered, “How did I use that much power?" I certainly have. That’s why I decided to take control by monitoring my home’s energy consumption in real-time using the Shelly Pro 2PM—a versatile, Wi-Fi-enabled energy monitoring device. In this guide, I’ll walk you through setting it up, integrating it with Home Assistant, and turning raw data into…

HomeAssistant Air Quality Monitoring: Why PMS5003 with ESP32 is the Best Combo for 2025

Ever wondered why your allergies act up indoors or why that mysterious “musty smell” lingers? I did—until I built my own air quality monitor using a PMS5003 sensor and ESP32. In 2025, with wildfires, pollen, and urban pollution on the rise, monitoring air quality isn’t just a luxury—it’s a necessity. Here’s why this combo is unbeatable and how to set it up with HomeAssistant. Why…

How to Monitor API Health with Blackbox Exporter and Prometheus

Ever had an API go down silently, only to realize it after users started complaining? I’ve been there—more times than I’d like to admit. That’s why I now rely on Prometheus and Blackbox Exporter to proactively monitor API health. In this guide, I’ll walk you through setting up Blackbox Exporter to probe endpoints, track latency, and alert you the moment something goes sideways. Why Blackbox…

DIY Smart Door Sensor with ESP32 and Home Assistant: A Step-by-Step Guide

DIY Smart Door Sensor with ESP32 and Home Assistant Ever walked out the door and wondered, Did I close it? I’ve been there too—until I built a DIY smart door sensor using an ESP32 and Home Assistant. Now, my phone buzzes if the door’s left ajar, and I’ve even set up automations to turn off the AC when the door’s open for too long (goodbye, wasted energy!). Here’s how you can build your own.

Control an IR Remote AC Using ESP32 and Home Assistant

Ever wished your dumb air conditioner could join your smart home party? I did—especially during a heatwave when I realized I’d left the AC on full blast while away. Enter the ESP32, a $5 microcontroller that (with some tinkering) can emulate your AC’s IR remote and integrate it into Home Assistant. Here’s how I did it. What You’ll Need Hardware: ESP32-DevKit board: Buy it here IR receiver/sender…

High-Cardinality Metrics: Detection and Optimization in Prometheus and VictoriaMetrics

I remember the first time my Prometheus instance crashed spectacularly after I added a new exporter. The logs screamed about “out of memory” errors, and my Grafana dashboards turned into ghost towns. After some frantic debugging, I discovered the culprit: high-cardinality metrics. In this guide, I’ll share practical techniques I’ve learned for identifying and optimizing…

Automate Your Garden Watering with ESP32 and Home Assistant

Automate Your Garden Watering with ESP32 and Home Assistant Ever forgotten to water your plants only to find them looking like they’ve been on a desert trek? I have—more times than I’d like to admit. That’s why I built a smart garden watering system using an ESP32, soil moisture sensors, and Home Assistant. Now, my plants get watered automatically, and I get to pretend I’ve got a green thumb.…

Prometheus Anomaly detection: Z-Score in PromQL

Monitoring HTTP request rates is one of the most basic yet essential tasks in observability. A sudden spike might indicate a traffic surge or even a DDoS attack, while a sudden drop could signal a backend failure. Static thresholds work, but they often miss subtle patterns or raise too many false alarms. A better way is to use statistical anomaly detection—specifically Z-score based alerts in…