tutorial

Monitoring Node-RED with Vigilmon

Node-RED is a flow-based programming tool for IoT, automation, and data pipelines. Here's how to monitor its web UI, health endpoint, flow deployment status, and scheduled flows with Vigilmon.

Node-RED is a low-code, flow-based programming tool that connects hardware, APIs, and services through a visual wiring interface. It powers IoT pipelines, home automation, ETL workflows, and event-driven integrations — often running unattended on edge devices or self-hosted servers. When Node-RED crashes or a scheduled flow stops firing, there is no built-in alerting to tell you something went wrong. Vigilmon fills that gap by monitoring the Node-RED web UI, the /health endpoint, and the heartbeat signals your scheduled flows emit — so you know immediately when your automation stops automating.

What You'll Set Up

  • HTTP monitor for Node-RED web UI availability (port 1880)
  • HTTP monitor for the Node-RED /health endpoint
  • HTTP monitor for the flow deployment status API
  • Heartbeat monitoring for scheduled flows driven by Inject nodes
  • SSL certificate expiry alerts for HTTPS-enabled Node-RED instances

Prerequisites

  • Node-RED 3.x+ running on a server, Raspberry Pi, or container
  • Node-RED accessible over HTTP or HTTPS (default port 1880)
  • A free Vigilmon account

Step 1: Monitor the Node-RED Web UI

Node-RED serves its editor and dashboard on port 1880 by default. Probing the root URL confirms the Node-RED process is running and the HTTP server is accepting connections.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. URL: http://your-node-red-host:1880/
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

If you have enabled Node-RED authentication (adminAuth in settings.js), the editor redirects to /auth/login and returns 200 for the login page. Use /auth/login as your monitor URL in that case to avoid a redirect chain that might not resolve cleanly from outside.

For Node-RED Dashboard users, monitor the dashboard path instead:

http://your-node-red-host:1880/ui/

Step 2: Monitor the /health Endpoint

Node-RED includes a built-in /health endpoint that returns a simple JSON response indicating the runtime is up:

curl http://your-node-red-host:1880/health
# {"status":"ok"}

This endpoint does not require authentication even when adminAuth is configured, making it ideal for external monitoring probes.

Add a Vigilmon monitor:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: http://your-node-red-host:1880/health
  3. Check interval: 1 minute
  4. Expected HTTP status: 200
  5. Set Response body must contain: "status":"ok"
  6. Click Save.

Checking the response body ensures you are getting the real health response and not a cached error or a proxy's default page. If the body check fails, the runtime may be in a degraded state even if the HTTP server is responding.


Step 3: Monitor Flow Deployment Status

Node-RED exposes an admin API that reports the runtime state of your flows. The /flows endpoint lists all deployed flows and can be used to verify that flows are actually deployed, not just that the runtime is running.

The admin API requires an access token if authentication is enabled. Generate a token:

curl -X POST http://your-node-red-host:1880/auth/token \
  -H "Content-Type: application/json" \
  -d '{"client_id":"node-red-admin","grant_type":"password","username":"admin","password":"your-password","scope":"*"}'
# {"access_token":"abc123...","token_type":"Bearer","expires_in":604800}

Then check the runtime state:

curl http://your-node-red-host:1880/flows/state \
  -H "Authorization: Bearer abc123..."
# {"state":"start"}

A state of start means flows are running. stop means flows have been halted. To monitor this with Vigilmon, set up a lightweight proxy script on your Node-RED host that authenticates and returns a simplified health status:

// Add this HTTP-in node flow to Node-RED to expose an authenticated health endpoint
// GET /internal-health → returns 200 if flows are in "start" state

Alternatively, use Node-RED's own HTTP In node to create a custom status endpoint that you control without exposing the admin API credentials externally.


Step 4: Heartbeat Monitoring for Scheduled Flows

Node-RED's Inject node fires payloads on a schedule — every minute, every hour, or at a specific cron expression. These are the backbone of automated pipelines, but if Node-RED crashes or a flow throws an uncaught error that halts the flow, the schedule stops silently.

Use Vigilmon's cron heartbeat to detect missed schedule fires:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set the expected ping interval to match your flow's schedule (e.g., 60 minutes for an hourly flow).
  3. Copy the heartbeat URL: https://vigilmon.online/heartbeat/abc123.

In Node-RED, add an HTTP Request node at the end of your scheduled flow:

[Inject (repeat every 60 min)] → [your flow nodes...] → [HTTP Request]

Configure the HTTP Request node:

  • Method: GET
  • URL: https://vigilmon.online/heartbeat/abc123
  • Return: a UTF-8 string

Wire it to a Catch node as well so Vigilmon is only pinged on successful flow completion:

[Inject] → [Process] → [HTTP Request → Vigilmon heartbeat]
                ↓ (on error)
           [Catch] → [Debug / alert]

If the Inject node stops firing (Node-RED restart without flow deployment, uncaught error halting the tab, or OS-level crash), Vigilmon stops receiving pings and alerts after the expected interval.

For flows with shorter intervals (every 5 minutes), set the Vigilmon heartbeat to 5 minutes and deploy the HTTP Request node at the end of the flow.


Step 5: SSL Certificate Alerts for HTTPS Node-RED Instances

Node-RED can be configured to serve HTTPS by providing a TLS key and certificate in settings.js:

// settings.js
module.exports = {
  https: {
    key: require('fs').readFileSync('/path/to/privkey.pem'),
    cert: require('fs').readFileSync('/path/to/cert.pem'),
  },
  // ...
}

Many deployments instead run Node-RED behind nginx or Caddy and let the reverse proxy handle TLS. In either case, monitor the certificate for the hostname clients use to reach Node-RED.

  1. Click Add MonitorHTTP / HTTPS (or open the existing monitor for your Node-RED URL).
  2. Enable Monitor SSL certificate.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

If you use Let's Encrypt with Certbot or Caddy's automatic HTTPS, verify that auto-renewal is working:

# Certbot
certbot renew --dry-run

# Caddy
journalctl -u caddy | grep -i certificate

A 21-day alert window gives you enough lead time to investigate renewal failures before clients see TLS errors.


Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or a webhook.
  2. Set Consecutive failures before alert to 2 on the web UI and health endpoint monitors — Node-RED restarts briefly on flow deploy and may miss a single probe.
  3. Set Consecutive failures to 1 on heartbeat monitors — a missed heartbeat always means a flow stopped firing.

Summary

| Monitor | Target | What It Catches | |---|---|---| | HTTP — web UI | http://host:1880/ | Node-RED process crash | | HTTP — health | http://host:1880/health | Runtime degradation | | HTTP — flow status | /flows/state via custom endpoint | Flows halted or not deployed | | Cron heartbeat | Heartbeat URL in flow | Scheduled flow stopped firing | | SSL certificate | HTTPS hostname | Certificate expiry, renewal failure |

Node-RED runs your automation in the background — when it stops, nothing alerts you by default. With Vigilmon watching the web UI, health endpoint, and heartbeat signals from your scheduled flows, you get immediate notification when your IoT pipelines, integrations, or automated workflows go silent.

Monitor your app with Vigilmon

Free plan — 5 monitors, no credit card required. Up and running in 60 seconds.

Start free →