tutorial

Monitoring Diaspora with Vigilmon

Diaspora is the original distributed social network from 2010 — but its Sidekiq background workers can stall silently, breaking federation. Here's how to monitor your Diaspora pod with Vigilmon.

Diaspora is the original open-source distributed social network, launched in 2010 — predating ActivityPub and built on its own Diaspora federation protocol. Built with Ruby on Rails, Diaspora introduced the concept of user-controlled social pods with "aspects" (social circles) for fine-grained sharing controls. Diaspora pods federate with each other and with Friendica nodes that support the Diaspora protocol, and pods are listed in the pod directory at the-federation.info. Diaspora relies on Sidekiq for all background work — federation delivery, media processing, email notifications, and cleanup — and a stalled Sidekiq queue can silently break federation while the web interface remains fully accessible. Vigilmon gives you uptime monitoring for your pod's login page, NodeInfo federation endpoint, pod statistics API, SSL certificate alerts, and heartbeat monitoring for Sidekiq background workers.

What You'll Set Up

  • HTTP uptime monitor for the Diaspora pod login page
  • Federation metadata check via /nodeinfo/2.0
  • Pod statistics availability check via /statistics.json
  • SSL certificate expiry alerts for your Diaspora pod domain
  • Heartbeat monitoring for Diaspora's Sidekiq background worker queue

Prerequisites

  • Diaspora pod running behind an Nginx reverse proxy on port 443 (HTTPS)
  • Sidekiq running as a separate process or systemd service
  • A free Vigilmon account

Step 1: Monitor the Diaspora Pod Login Page

Diaspora pods typically require HTTPS and redirect unauthenticated visitors to the sign-in page. Monitoring the login page confirms the Rails application is running and Nginx is forwarding requests correctly.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your Diaspora pod URL: https://diaspora.yourdomain.com/users/sign_in
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

The /users/sign_in path is always accessible without authentication and returns a 200 with the Diaspora login form. Monitoring this specific path (rather than the root /) avoids following redirects, giving you a cleaner signal — a non-200 here means Rails is down or Nginx has lost the upstream Rails connection.


Step 2: Monitor the /nodeinfo/2.0 Federation Endpoint

NodeInfo is the standard protocol that Fediverse-compatible servers use to publish their software identity and usage statistics. Other Diaspora pods and Friendica nodes query your /nodeinfo/2.0 endpoint to confirm federation compatibility before connecting. If this endpoint returns an error, new federation connections with your pod will fail.

  1. In Vigilmon, click Add MonitorHTTP / HTTPS.
  2. Enter URL: https://diaspora.yourdomain.com/nodeinfo/2.0
  3. Set Method to GET.
  4. Set Expected HTTP status to 200.
  5. Set Expected response body contains to "diaspora" (present in the software.name field).
  6. Click Save.

A healthy Diaspora NodeInfo response looks like this:

{
  "version": "2.0",
  "software": {
    "name": "diaspora",
    "version": "0.7.18.0"
  },
  "protocols": ["diaspora"],
  "usage": {
    "users": { "total": 42, "activeHalfyear": 12, "activeMonth": 8 }
  }
}

NodeInfo endpoint failures are often caused by misconfigured Nginx location blocks or a Rails routing error introduced during a gem update.


Step 3: Monitor the /statistics.json Pod Statistics Endpoint

Diaspora exposes a /statistics.json endpoint that returns pod statistics including the software name, version, and user counts. This endpoint is used by pod directory services like the-federation.info and functions as a lightweight application availability check distinct from the NodeInfo endpoint.

  1. In Vigilmon, click Add MonitorHTTP / HTTPS.
  2. Enter URL: https://diaspora.yourdomain.com/statistics.json
  3. Set Method to GET.
  4. Set Expected HTTP status to 200.
  5. Set Expected response body contains to "name":"diaspora" (present in the JSON response software block).
  6. Click Save.

Both the NodeInfo and statistics monitors running together give you redundant API-layer coverage. If the login page is up but one of the API endpoints is down, the issue is usually a routing or middleware problem in the Rails application rather than a complete outage.


Step 4: SSL Certificate Alerts

Diaspora pods must run over HTTPS — the Diaspora federation protocol uses HTTP Signatures with your server's SSL certificate as part of the trust chain. An expired certificate will immediately break all federation, causing your pod to stop receiving posts from contacts on other pods and stop delivering your posts outward.

  1. Open the HTTP / HTTPS monitor created in Step 1.
  2. Enable Monitor SSL certificate under the SSL section.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

Diaspora is typically deployed with Nginx terminating TLS using Let's Encrypt certificates managed by Certbot. A 21-day alert window gives you three automatic Certbot renewal cycles of buffer. If Certbot's renewal cron fails — due to DNS misconfiguration, a blocked port 80, or a changed IP — you'll know in time to renew manually before federation is affected.


Step 5: Heartbeat Monitoring for Sidekiq Background Workers

Diaspora uses Sidekiq (backed by Redis) for all background processing: federation delivery, receiving incoming activities from remote pods, processing media attachments, sending email notifications, and running periodic cleanup tasks. A stalled Sidekiq process — caused by a Redis crash, an OOM kill, or a stuck job holding locks — will silently stop all federation while the web UI remains functional. Users can still log in and write posts, but those posts never reach their followers on remote pods.

Use Vigilmon's cron heartbeat to verify Sidekiq is alive and processing:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set the expected ping interval to 10 minutes.
  3. Copy the heartbeat URL (e.g. https://vigilmon.online/heartbeat/abc123).

Diaspora ships with a Sidekiq web UI mounted at /sidekiq (requires admin authentication). You can query Sidekiq's statistics API to build a heartbeat check:

#!/bin/bash
# /usr/local/bin/diaspora-heartbeat.sh
# Check Sidekiq stats and ping Vigilmon if workers are active

DIASPORA_PATH="/var/www/diaspora/current"
HEARTBEAT_URL="https://vigilmon.online/heartbeat/abc123"

# Use redis-cli to check Sidekiq is connected and workers are present
BUSY=$(redis-cli llen queue:default 2>/dev/null)
SIDEKIQ_PID=$(pgrep -f "sidekiq" | head -1)

if [ -n "${SIDEKIQ_PID}" ]; then
  curl -s "${HEARTBEAT_URL}"
fi

Schedule the script:

# /etc/cron.d/diaspora-heartbeat
*/10 * * * * diaspora /usr/local/bin/diaspora-heartbeat.sh

For a more application-level approach, add a heartbeat job to Diaspora's Sidekiq configuration. Create a custom Sidekiq worker that pings Vigilmon when it runs:

# app/workers/heartbeat_worker.rb
class HeartbeatWorker
  include Sidekiq::Worker
  sidekiq_options queue: :default

  def perform
    Net::HTTP.get(URI("https://vigilmon.online/heartbeat/abc123"))
  end
end

Then schedule it using the sidekiq-cron gem in your Diaspora config/sidekiq.yml:

:schedule:
  heartbeat:
    cron: "*/10 * * * *"
    class: HeartbeatWorker

With this approach, Vigilmon only receives a ping when Sidekiq is actually running and processing the heartbeat job — a much more reliable signal than checking whether the process PID exists.


Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add your preferred channel: email, Slack, Discord webhook, or PagerDuty.
  2. Set Consecutive failures before alert to 2 on the login page monitor — Rails can briefly take a few seconds to restart via systemd after a crash.
  3. Set Consecutive failures before alert to 1 on the NodeInfo and statistics monitors — API failures at these endpoints have immediate impact on federation discoverability.
  4. Use Maintenance windows in Vigilmon during Diaspora upgrades. Major version upgrades require database migrations (rake db:migrate) and a brief restart of both the Rails app and Sidekiq.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Login page | /users/sign_in | Rails crash, Nginx proxy failure | | NodeInfo | /nodeinfo/2.0 (GET) | Federation discovery broken | | Statistics | /statistics.json (GET) | API layer failure | | SSL certificate | Pod domain | Let's Encrypt renewal failure | | Cron heartbeat | Heartbeat URL | Sidekiq stall, Redis failure |

Diaspora pioneered decentralized social networking with a user-owned, privacy-first model that remains compelling today. Its "aspects" system and federation protocol connect it to a wide network of compatible pods and Friendica nodes. With Vigilmon monitoring the login page, federation endpoints, SSL certificate, and Sidekiq background workers, you get comprehensive observability over your Diaspora pod — so federation problems are caught before they turn into silent data loss for your community.

Monitor your app with Vigilmon

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

Start free →