tutorial

Monitoring Apache Allura with Vigilmon

Apache Allura is a self-hosted software forge with a Python web app, Celery/Taskd background workers, and MongoDB — all components that can fail independently. Here's how to monitor Allura's endpoints and worker queues with Vigilmon.

Apache Allura is a self-hosted software forge that powers SourceForge and similar platforms. It provides Git and SVN hosting, wiki, issue tracking, and discussion forums in a single application. Allura runs as a Python WSGI app (Gunicorn or uWSGI) on port 8080 behind nginx, with Celery workers and a Taskd daemon handling background jobs, and MongoDB as the primary data store. Each of these components can fail independently — and when background workers stall, users see the web UI but repository operations and notifications silently stop working. Vigilmon monitors Allura's web endpoint, status pages, and background worker queues to catch failures across all layers.

What You'll Set Up

  • HTTP uptime monitor for the Allura web application (port 8080 or reverse-proxy URL)
  • Status endpoint probe for deep application health checks
  • Cron heartbeat monitors for Celery workers and Taskd
  • SSL certificate expiry alerts

Prerequisites

  • Apache Allura installed and running (Gunicorn/uWSGI on port 8080, typically behind nginx)
  • Celery workers and Taskd running for background job processing
  • A free Vigilmon account

Step 1: Monitor the Allura Web Application

Allura's web interface runs on port 8080 via Gunicorn or uWSGI. In production it's typically proxied by nginx on port 80/443. Monitor the public-facing URL:

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your Allura URL:
    • Direct Gunicorn: http://your-server:8080
    • Behind nginx: https://allura.yourdomain.com
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Click Save.

Allura's homepage returns 200 when the Python WSGI application is running and can connect to MongoDB. A 502 from nginx means Gunicorn has crashed; a direct connection refused on port 8080 means the WSGI process isn't listening.


Step 2: Probe the Allura Status Endpoint

Allura exposes a status endpoint at /nf/_oid/ (the neighborhood overview path) and a more direct health check at /health if configured. Probe the neighborhood status path, which exercises the full request stack including MongoDB:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://allura.yourdomain.com/nf/admin/.
  3. Set Expected HTTP status to 200 or 302 (a redirect to login is also a healthy response — it means the app is processing requests).
  4. Set Check interval to 2 minutes.
  5. Click Save.

For a more targeted health check, Allura can be configured to expose a lightweight endpoint. Add the following to your development.ini or production.ini:

[app:main]
# Enable health check endpoint
health_check.enabled = true

This enables https://allura.yourdomain.com/health which returns a JSON status object. If available, use this as your primary monitor URL instead of the /nf/admin/ path.


Step 3: TCP Port Monitor for nginx

Allura's nginx reverse proxy handles all inbound traffic. Monitor the nginx port directly as a separate check from the application:

  1. Click Add MonitorTCP Port.
  2. Enter your server hostname.
  3. Set Port to 443 (or 80 if not using HTTPS).
  4. Set Check interval to 1 minute.
  5. Click Save.

A TCP failure here while HTTP checks also fail indicates the nginx layer is down — a different remediation path than a failed Gunicorn process.


Step 4: Cron Heartbeat for Celery Workers

Allura uses Celery for asynchronous task processing: repository commits trigger indexing tasks, email notifications are queued as Celery jobs, and wiki rendering for large pages goes through the task queue. When Celery workers stop, these operations silently queue up with no visible error.

Add a periodic Celery task that pings Vigilmon. Create a custom task in your Allura configuration or use a cron job on the server:

# /etc/cron.d/vigilmon-allura-celery
# Check Celery worker every 10 minutes
*/10 * * * * allura /usr/local/bin/check-allura-celery.sh

Create /usr/local/bin/check-allura-celery.sh:

#!/bin/bash
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_CELERY_HEARTBEAT_ID"

# Ping a Celery worker and check it's responsive
if celery -A allura.tasks inspect ping --timeout 5 2>/dev/null | grep -q "pong"; then
    curl -fs "$HEARTBEAT_URL"
fi
chmod +x /usr/local/bin/check-allura-celery.sh

In Vigilmon:

  1. Click Add MonitorCron Heartbeat.
  2. Set the expected ping interval to 15 minutes.
  3. Copy the heartbeat URL and paste it into the script above.
  4. Click Save.

If the Celery broker (typically RabbitMQ or Redis) is down, or if all worker processes have crashed, the inspect ping call will timeout and the heartbeat won't fire.


Step 5: Cron Heartbeat for the Taskd Daemon

Allura also includes a taskd daemon that handles certain internal maintenance tasks separately from Celery. Monitor it with its own heartbeat:

# /etc/cron.d/vigilmon-allura-taskd
*/15 * * * * root /usr/local/bin/check-allura-taskd.sh

Create /usr/local/bin/check-allura-taskd.sh:

#!/bin/bash
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_TASKD_HEARTBEAT_ID"

# Check if taskd process is running
if pgrep -f "allura.command.taskd" > /dev/null 2>&1; then
    curl -fs "$HEARTBEAT_URL"
fi

In Vigilmon, add a second Cron Heartbeat monitor with a 20-minute expected interval for this Taskd check.

To start and verify Taskd:

# Start Taskd
paster taskd production.ini &

# Verify it's running
pgrep -a -f taskd

Step 6: Monitor Repository Hosting Ports

Allura serves Git over SSH and HTTP. If you've configured SSH repository access, monitor the SSH port:

  1. Click Add MonitorTCP Port.
  2. Enter your server hostname.
  3. Set Port to 22 (or your custom SSH port).
  4. Set Check interval to 5 minutes.
  5. Click Save.

For SVN over HTTP (DAV), monitor the dedicated path:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://allura.yourdomain.com/p/ (the project listing root).
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 5 minutes.
  5. Click Save.

Step 7: SSL Certificate Alerts

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

Check your current certificate status:

openssl s_client -connect allura.yourdomain.com:443 -servername allura.yourdomain.com \
  </dev/null 2>/dev/null | openssl x509 -noout -dates

If you're using Let's Encrypt with certbot:

certbot certificates
# or check auto-renewal
certbot renew --dry-run

Step 8: 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 monitor — Gunicorn worker restarts can cause brief gaps under load.
  3. Set the Celery and Taskd heartbeat monitors to alert after 1 missed ping — worker crashes don't self-recover.
  4. Set the TCP nginx monitor to alert after 1 failure — a TCP drop is unlikely to be transient.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Web UI | https://allura.yourdomain.com | Gunicorn/uWSGI crash, MongoDB disconnect | | Status endpoint | /nf/admin/ or /health | Deep app stack failure | | nginx TCP | TCP :443 | Reverse proxy down | | Celery heartbeat | Heartbeat URL | Worker crash, broker unavailable | | Taskd heartbeat | Heartbeat URL | Maintenance daemon stopped | | SSH port | TCP :22 | Git/SVN SSH access broken | | SSL certificate | HTTPS domain | Let's Encrypt renewal failure |

Allura's distributed architecture — WSGI app, Celery workers, Taskd, MongoDB, and nginx — means a healthy-looking web UI doesn't tell the full story. With Vigilmon's heartbeat monitors watching both worker queues, you'll know when repository indexing or email delivery has silently stopped before your users notice and file bug reports.

Monitor your app with Vigilmon

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

Start free →