tutorial

Monitoring Beehive with Vigilmon

Beehive is a self-hosted event and agent automation system that connects services and triggers actions — but it has no built-in uptime monitoring. Here's how to watch Beehive's web server, agent connectivity, event pipeline, and action execution with Vigilmon.

Beehive is a self-hosted event and agent automation platform written in Go. It connects services like Slack, Twitter, RSS feeds, email, and IRC, and triggers configured actions when events fire — your own self-hosted IFTTT or Zapier. But Beehive ships with no external health monitoring: if the web server drops, an agent loses connectivity, or the event pipeline stalls, your automations silently stop working. Vigilmon gives you uptime monitoring for Beehive's web layer, agent health, event processing, and scheduled polling so you know the moment your automations go dark.

What You'll Set Up

  • HTTP uptime monitor for the Beehive web server (port 8181)
  • Agent connectivity monitoring via the Beehive REST API
  • Cron heartbeat for scheduled polling agent execution
  • WebSocket health verification for real-time event streaming
  • Action execution and error retry queue monitoring

Prerequisites

  • Beehive installed and running on port 8181
  • At least one agent configured (Slack, RSS, email, etc.)
  • A free Vigilmon account

Step 1: Monitor the Beehive Web Server

Beehive's web interface and REST API run on port 8181. This is the entry point for all configuration and the source of truth for agent state.

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

Beehive serves a web UI at the root path. A 200 response confirms the HTTP server is up and the Go process is running.

For a more meaningful health signal, monitor the API endpoint that lists configured hives:

http://your-beehive-host:8181/v1/hives

Set Expected HTTP status to 200 and Expected response body contains to [ — a JSON array means Beehive loaded its configuration and is returning agent data. An empty response or error here can indicate a configuration load failure even when the HTTP server itself is up.


Step 2: Monitor Agent Connectivity

Beehive agents (Slack, Twitter, RSS, email, IRC) maintain persistent connections or poll external services. If an agent loses connectivity, events from that source stop flowing silently.

Check the agents endpoint to verify your configured agents are reporting as connected:

http://your-beehive-host:8181/v1/bees
  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the URL above.
  3. Set Expected HTTP status to 200.
  4. Set Expected response body contains to the name of a critical agent, e.g. "slack" or "rss".
  5. Click Save.

This confirms your most critical agent is at least registered. For deeper agent health, Beehive's API returns an active field per agent — you can set Expected response body contains to "active":true to verify at least one agent is in an active state.

Create one monitor per critical integration. If your Beehive setup relies on an email agent for inbound triggers, monitoring that agent's registration separately gives you faster, cleaner incident attribution when things break.


Step 3: Monitor the Event Trigger Processing Pipeline

Beehive processes events through a pipeline: an agent fires an event, Beehive matches it to configured chains, and executes actions. If the pipeline stalls (e.g. due to a corrupted chain configuration or a panicking event handler), events queue up without processing.

Monitor the chains endpoint to verify your automation chains are registered:

http://your-beehive-host:8181/v1/chains
  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the URL above.
  3. Set Expected HTTP status to 200.
  4. Set Expected response body contains to the name of a critical chain, e.g. "rss-to-slack".
  5. Click Save.

This confirms Beehive loaded and registered your automation chains. An empty chain list ([]) when you expect configured chains is a sign of a configuration loading failure.


Step 4: Cron Heartbeat for Scheduled Polling Agents

Some Beehive agents poll external services on a schedule — RSS readers, email checkers, and Twitter timeline agents all work this way. If polling stops (due to a connectivity issue, rate limit, or agent crash), new events from those sources are silently dropped.

Use Vigilmon's cron heartbeat to confirm polling agents are running:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set Name to Beehive - RSS polling agent.
  3. Set Expected ping interval to match your agent's polling frequency (e.g. 15 minutes).
  4. Set Grace period to 5 minutes.
  5. Copy the heartbeat URL.

Beehive doesn't natively support post-poll webhooks, so you'll need to verify polling indirectly. The cleanest approach is a lightweight wrapper script that calls the Beehive API to check last-event timestamps and pings Vigilmon if a recent event was processed:

#!/bin/bash
# Check that Beehive RSS agent processed an event in the last 30 minutes
LAST_EVENT=$(curl -s http://localhost:8181/v1/logs | \
  python3 -c "import sys,json; logs=json.load(sys.stdin); \
  recent=[l for l in logs if 'rss' in l.get('bee','').lower()]; \
  print(recent[0]['created_at'] if recent else '')")

if [ -n "$LAST_EVENT" ]; then
  curl -s https://vigilmon.online/heartbeat/abc123
fi

Run this script via system cron at the same frequency as your Beehive polling agent. If Beehive stops polling, the script sees no recent RSS events and doesn't ping — Vigilmon alerts after the grace period.


Step 5: WebSocket Real-Time Event Stream Health

Beehive exposes a WebSocket endpoint for real-time event streaming to the web UI. While you won't typically monitor the WebSocket directly, you can use an HTTP upgrade check as a proxy for WebSocket availability:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: http://your-beehive-host:8181/v1/ws
  3. Set Expected HTTP status to 200 (or 101 if your monitoring tool supports it — 101 Switching Protocols is the correct WebSocket upgrade response).
  4. Click Save.

If the WebSocket endpoint returns 404 or 500, the real-time event streaming layer has failed. This affects the web UI's live event feed but doesn't necessarily impact background automation execution — monitoring both the WebSocket and the main API gives you the distinction.


Step 6: Monitor the Action Execution Service

When Beehive matches an event to a chain, it executes the configured actions (posting a Slack message, sending an email, calling a webhook). Failed action executions are typically logged but not surfaced as an alert.

Monitor the logs endpoint for execution errors:

http://your-beehive-host:8181/v1/logs
  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the URL above.
  3. Set Expected HTTP status to 200.
  4. Click Save.

This confirms Beehive's logging service is running and accessible. For error-specific detection, set Expected response body does not contain to "error" in your monitoring tool if supported — though be aware this will trigger on any log line containing the word "error", including informational log messages about error handling.

A more targeted approach is to use the Vigilmon webhook with a small monitoring script that periodically queries the logs API and sends a Vigilmon alert if the error rate exceeds a threshold.


Step 7: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or a webhook endpoint.
  2. For the web server monitor, set Consecutive failures before alert to 2 — a single probe failure can be a network blip.
  3. For the cron heartbeat monitors, set Consecutive failures before alert to 1 — a missed polling cycle is always worth investigating.
  4. Group related monitors with a shared Alert Channel so Slack automation failures alert the same channel as the Beehive server monitor.

For planned Beehive upgrades:

# Open a maintenance window before restarting Beehive
curl -X POST https://vigilmon.online/api/maintenance \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"monitor_id": "abc123", "duration_minutes": 5}'

systemctl restart beehive

# Maintenance window expires automatically after 5 minutes

Summary

| Monitor | Target | What It Catches | |---|---|---| | HTTP web server | :8181 | Beehive process crash, HTTP listener failure | | HTTP hives API | :8181/v1/hives | Configuration load failure | | HTTP bees API | :8181/v1/bees | Agent connectivity loss | | HTTP chains API | :8181/v1/chains | Automation chain registration failure | | HTTP WebSocket | :8181/v1/ws | Real-time event stream failure | | Cron heartbeat | Vigilmon URL | Polling agent stopped, missed schedule |

Beehive's value is in its automation chains running reliably in the background. A crashed web server is obvious; a stalled polling agent or disconnected Slack integration is invisible until you notice that the RSS-to-Slack pipeline has been quiet for hours. With Vigilmon watching every layer, you'll catch both.

Monitor your app with Vigilmon

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

Start free →