<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pablo Ian Laurino</title>
    <description>The latest articles on DEV Community by Pablo Ian Laurino (@pabloian92).</description>
    <link>https://dev.to/pabloian92</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4269942%2F11b71ace-8ef7-4883-8f73-8ab1e4987fea.png</url>
      <title>DEV Community: Pablo Ian Laurino</title>
      <link>https://dev.to/pabloian92</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pabloian92"/>
    <language>en</language>
    <item>
      <title>Building a Lightweight MikroTik + Ubiquiti + GPON Outage Monitor with Flap-Suppression in Python &amp; Docker</title>
      <dc:creator>Pablo Ian Laurino</dc:creator>
      <pubDate>Sun, 29 Nov 2026 00:35:21 +0000</pubDate>
      <link>https://dev.to/pabloian92/building-a-lightweight-mikrotik-ubiquiti-gpon-outage-monitor-with-flap-suppression-in-python--1bbn</link>
      <guid>https://dev.to/pabloian92/building-a-lightweight-mikrotik-ubiquiti-gpon-outage-monitor-with-flap-suppression-in-python--1bbn</guid>
      <description>&lt;p&gt;After 7+ years leading technical and NOC operations for a 6,000-subscriber regional ISP, the most exhausting part of any major tower or fiber outage was never the fix itself—it was &lt;strong&gt;context switching&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When a microwave backhaul degraded or an OLT port dropped, technicians had to juggle five separate dashboards:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Winbox / RouterOS for MikroTik edge &amp;amp; core routers&lt;/li&gt;
&lt;li&gt;UISP / AirControl for Ubiquiti sectors and PtP links&lt;/li&gt;
&lt;li&gt;Netonix switch web UIs for PoE voltage and port flapping&lt;/li&gt;
&lt;li&gt;OLT CLI / OLTCloud for GPON optical power levels&lt;/li&gt;
&lt;li&gt;Support queues lighting up with 40 identical "my internet is down" tickets before engineering even confirmed the root cause&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To solve this for lean WISP and independent ISP teams, I open-sourced a lightweight single-pane monitor and alert-suppression gateway: &lt;strong&gt;&lt;a href="https://github.com/PabloIan92/isp-network-monitor" rel="noopener noreferrer"&gt;isp-network-monitor&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why Traditional Monitoring Tools Flood Lean NOCs
&lt;/h2&gt;

&lt;p&gt;Out-of-the-box monitoring tools (Zabbix, Nagios, LibreNMS) are powerful, but on wireless and rural fiber networks they often create &lt;strong&gt;alert fatigue&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A brief 3-second wind fade or power blip on a mountain relay fires 15 consecutive &lt;code&gt;DOWN / UP / DOWN&lt;/code&gt; notifications.&lt;/li&gt;
&lt;li&gt;Ops teams start muting Slack/Telegram channels—and then miss the real outage 20 minutes later.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. The Architecture: Multi-Vendor Polling + Redis Cooldown Flap-Suppression
&lt;/h2&gt;

&lt;p&gt;Instead of firing raw ICMP/SNMP traps straight to ops chat, the gateway inserts a &lt;strong&gt;stateful flap-suppression layer&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Collector Workers (Python)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Polls MikroTik RouterOS API, Ubiquiti/UISP endpoints, Netonix switches, and SNMP/OLT telemetry on configurable intervals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Flap-Suppression Gate (Redis / SQLite State)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tracks consecutive failures (&lt;code&gt;N &amp;gt;= 3&lt;/code&gt;) and enforces a cooldown window before escalating a hard outage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;FastAPI Webhook Receiver&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Exposes clean JSON health endpoints and normalizes alerts into structured payloads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tier-1 Triage Hook (n8n / Chatwoot)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Automatically flags affected tower/zone IDs so support bots can proactively notify callers of an active outage instead of creating 50 duplicate tickets&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  3. Flap-Suppression Logic in Practice
&lt;/h2&gt;

&lt;p&gt;The rule that cut false-positive night alerts by over 80%:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Soft Warning (1–2 failed polls):&lt;/strong&gt; Logged to the live board as &lt;code&gt;DEGRADED&lt;/code&gt; (yellow) — &lt;em&gt;no push notification sent&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirmed Outage (3 consecutive failed polls):&lt;/strong&gt; Escalated to &lt;code&gt;CRITICAL&lt;/code&gt; (red) — fires &lt;strong&gt;one&lt;/strong&gt; consolidated alert to Slack/Telegram with tower name, parent uplink, latency history, and affected subscriber count.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recovery Hysteresis:&lt;/strong&gt; Requires 2 consecutive healthy polls before marking &lt;code&gt;RECOVERED&lt;/code&gt;, preventing bouncing links from spamming the channel.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Open-Source Repo &amp;amp; Architecture Breakdown
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/PabloIan92/isp-network-monitor" rel="noopener noreferrer"&gt;github.com/PabloIan92/isp-network-monitor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1-Page WISP NOC Automation Case Study (PDF):&lt;/strong&gt; &lt;a href="https://pabloian92.github.io/netops-automation-global/case-study-wisp-ops.pdf" rel="noopener noreferrer"&gt;Download Architecture Breakdown&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turnkey 72-Hour WISP NOC Pilots &amp;amp; Docker Blueprints:&lt;/strong&gt; &lt;a href="https://pabloian92.github.io/netops-automation-global/" rel="noopener noreferrer"&gt;pabloian92.github.io/netops-automation-global&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you operate MikroTik, Ubiquiti, or GPON networks, how are you handling alert deduplication and Tier-1 outage triage right now? Happy to compare notes in the comments.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>devops</category>
      <category>monitoring</category>
      <category>python</category>
    </item>
    <item>
      <title>How We Replaced $500+/mo in Zapier + Intercom Bills with a &lt;$30/mo Self-Hosted n8n + Chatwoot + Redis Docker Stack</title>
      <dc:creator>Pablo Ian Laurino</dc:creator>
      <pubDate>Sat, 28 Nov 2026 02:59:35 +0000</pubDate>
      <link>https://dev.to/pabloian92/how-we-replaced-500mo-in-zapier-intercom-bills-with-a-30mo-self-hosted-n8n-chatwoot--35nk</link>
      <guid>https://dev.to/pabloian92/how-we-replaced-500mo-in-zapier-intercom-bills-with-a-30mo-self-hosted-n8n-chatwoot--35nk</guid>
      <description>&lt;p&gt;Once a growing agency, MSP, or lean operations team passes 10-15 active client workflows and a few support agents, SaaS pricing starts compounding fast:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zapier / Make task tiers jump to $150-$300+/mo as soon as webhooks get chatty.&lt;/li&gt;
&lt;li&gt;Per-seat shared inbox tools (Intercom, Zendesk, HelpScout) add another $200-$400+/mo.&lt;/li&gt;
&lt;li&gt;Worse: when a customer sends 4 rapid-fire WhatsApp or chat messages in 6 seconds, naive webhook automations fire 4 separate LLM calls and send 4 overlapping replies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is the production-hardened, self-hosted Docker stack I deploy on a single &lt;strong&gt;$20/mo Linux VPS&lt;/strong&gt; (4 vCPU / 8 GB RAM) to replace all of it with full data ownership.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The 5-Container Architecture
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Why It's Here&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reverse Proxy &amp;amp; TLS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Caddy v2&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Automatic Let's Encrypt HTTPS certificates with zero Nginx boilerplate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Workflow Engine&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;n8n + PostgreSQL 16&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Unlimited webhook runs, retries, custom HTTP/Python bridges, and Dead-Letter Queue (DLQ) alerting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Shared Team Inbox&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Chatwoot&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Open-source omnichannel inbox with instant AI-to-human handoff and zero per-seat fees&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Message Debounce &amp;amp; Queue&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Redis 7&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Buffers bursty WhatsApp/chat messages for 8 seconds so the LLM answers once with full context&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Custom Middleware&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;FastAPI (Python)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Handles strict webhook signature validation, idempotency keys, and SNMP/CRM telemetry&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  2. Solving the #1 WhatsApp / Chat AI Bug: The 8-Second Redis Debouncer
&lt;/h2&gt;

&lt;p&gt;Most tutorials wire WhatsApp Cloud API directly to an LLM node. In production, users type like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;14:02:01 - "Hi"&lt;br&gt;
14:02:03 - "My fiber router is blinking red"&lt;br&gt;
14:02:05 - "Account #4821"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Without a debounce buffer, your bot triggers &lt;strong&gt;3 parallel LLM runs&lt;/strong&gt; and burns 3x tokens while sending contradictory replies.&lt;/p&gt;

&lt;p&gt;The fix is a 3-step Redis pattern inside n8n (or FastAPI):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Append &amp;amp; Timestamp:&lt;/strong&gt; Push each incoming message into &lt;code&gt;RPUSH chat:buf:{phone}&lt;/code&gt; and set a rolling timestamp &lt;code&gt;SET chat:ts:{phone} {now_ms}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wait 8 Seconds:&lt;/strong&gt; Sleep 8 seconds, then compare &lt;code&gt;chat:ts:{phone}&lt;/code&gt; against the timestamp you captured.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flush Once:&lt;/strong&gt; If a newer message arrived, exit silently. Only the final worker reads the full buffer (&lt;code&gt;LRANGE&lt;/code&gt; + &lt;code&gt;DEL&lt;/code&gt;), concatenates the user's complete thought, and sends &lt;strong&gt;one&lt;/strong&gt; clean prompt to the LLM or routes to a human agent in Chatwoot.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  3. Production Hardening Checklist (Zero-Loss Webhooks)
&lt;/h2&gt;

&lt;p&gt;Before pointing live client traffic at a self-hosted stack, I always add:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PostgreSQL-backed n8n&lt;/strong&gt; (never SQLite in production) with daily off-box &lt;code&gt;pg_dump&lt;/code&gt; snapshots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dead-Letter Queue (DLQ) workflow:&lt;/strong&gt; Every critical workflow routes errors to a central error handler that logs the failed payload + pushes an instant Telegram/Slack alert with a one-click replay payload.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean Human Handoff:&lt;/strong&gt; If a customer asks for billing, cancellation, or an angry escalation, n8n toggles a Chatwoot label (&lt;code&gt;needs-human&lt;/code&gt;), mutes the AI bot for that conversation ID, and pings the support queue.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Architecture Breakdown &amp;amp; Open-Source Repos
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1-Page Self-Hosted Stack Case Study (PDF):&lt;/strong&gt; &lt;a href="https://pabloian92.github.io/netops-automation-global/case-study-self-hosted-bot.pdf" rel="noopener noreferrer"&gt;Download Architecture Breakdown&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-Source ISP / Network Outage Monitor (FastAPI + Docker):&lt;/strong&gt; &lt;a href="https://github.com/PabloIan92/isp-network-monitor" rel="noopener noreferrer"&gt;github.com/PabloIan92/isp-network-monitor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turnkey 72-Hour Fixed-Price Deployments &amp;amp; Docker Blueprints:&lt;/strong&gt; &lt;a href="https://pabloian92.github.io/netops-automation-global/" rel="noopener noreferrer"&gt;pabloian92.github.io/netops-automation-global&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What self-hosted automation or support stacks are you running in production right now? Happy to share the &lt;code&gt;docker-compose.yml&lt;/code&gt; structure or answer questions on Caddy/Redis/n8n tuning in the comments.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>devops</category>
      <category>docker</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
