tutorial

Monitoring Phabricator with Vigilmon

Phabricator is a self-hosted code review and project management platform with a web app, background daemons, and optional notification server — each a separate failure point. Here's how to monitor all of them with Vigilmon.

Phabricator is a comprehensive self-hosted platform for code review (Differential), repository hosting (Diffusion), issue tracking (Maniphest), and project management. Unlike simpler apps, Phabricator has multiple moving parts: the PHP web application served by Apache or nginx, background daemons (phd) that process queued tasks, and an optional notification server for real-time updates. Any one of these can fail independently. Vigilmon lets you monitor the web interface, probe the API endpoint for liveness, and use heartbeat monitors to verify the daemon processes keep running.

What You'll Set Up

  • HTTP uptime monitor for the Phabricator web application
  • API endpoint probe for liveness checking beyond the homepage
  • Cron heartbeat monitor for the phd background daemon
  • SSL certificate expiry alerts

Prerequisites

  • Phabricator installed and running behind Apache or nginx on port 80/443
  • The phd daemon manager running (./bin/phd start from the Phabricator root)
  • A free Vigilmon account

Step 1: Monitor the Phabricator Web Application

Phabricator's web interface is served by Apache or nginx, typically on port 80 (HTTP) or 443 (HTTPS). The root URL loads the login page or dashboard depending on whether the visitor is authenticated.

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

Phabricator returns a 200 from the root path regardless of authentication state. A non-200 response (or a connection timeout) means either the web server or the PHP-FPM process has failed.


Step 2: Probe the Phabricator API for Deep Liveness

Phabricator's REST API lives at /api/ and can be probed without authentication to verify that PHP is executing and the application is fully initialized (not just the web server returning a static error page).

Call the conduit.ping method — it requires no API token and returns a JSON response:

https://phabricator.yourdomain.com/api/conduit.ping

The request must be a POST with output=json in the body, but Vigilmon's HTTP monitor can send a POST request:

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://phabricator.yourdomain.com/api/conduit.ping.
  3. Set Method to POST.
  4. Set Request body to output=json.
  5. Set Expected HTTP status to 200.
  6. Set Expected response body contains to "result" (the JSON response always includes a result key when PHP is running).
  7. Set Check interval to 2 minutes.
  8. Click Save.

A 200 with a JSON body containing "result" means the PHP interpreter is running, the database connection is alive, and the Conduit API framework is initialized — a much stronger signal than just checking the homepage.


Step 3: Heartbeat Monitor for the phd Daemon

Phabricator's background daemon manager (phd) runs a set of worker processes that handle task queues: sending emails, processing repository imports, running Herald rules, and more. The phd process runs separately from Apache/nginx and is not visible to HTTP monitors.

Set up a heartbeat cron job on the Phabricator server that pings Vigilmon only when phd is running:

# /etc/cron.d/vigilmon-phd-heartbeat
# Runs every 10 minutes; pings Vigilmon only if phd is active
*/10 * * * * www-data /usr/local/bin/vigilmon-phd-check.sh

Create /usr/local/bin/vigilmon-phd-check.sh:

#!/bin/bash
PHABRICATOR_DIR="/var/www/phabricator"
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_HEARTBEAT_ID"

# Check if phd is running
if "$PHABRICATOR_DIR/bin/phd" status 2>/dev/null | grep -q "running"; then
    curl -fs "$HEARTBEAT_URL"
fi
chmod +x /usr/local/bin/vigilmon-phd-check.sh

Then in Vigilmon:

  1. Click Add MonitorCron Heartbeat.
  2. Set the expected ping interval to 15 minutes (slightly longer than the 10-minute cron interval).
  3. Copy the heartbeat URL and paste it into the script above.
  4. Click Save.

You can also verify daemon status directly:

# Check which phd workers are running
/var/www/phabricator/bin/phd status

A healthy output looks like:

RUNNING  PhabricatorTaskmasterDaemon (PID: 12345)
RUNNING  PhabricatorRepositoryPullLocalDaemon (PID: 12346)
RUNNING  PhabricatorTriggerDaemon (PID: 12347)

If phd has crashed, restart it with:

/var/www/phabricator/bin/phd restart

Step 4: Monitor the File Server (Optional)

Phabricator can serve uploaded files through a dedicated file endpoint. If you use the local disk storage backend (rather than S3 or similar), the file endpoint is:

https://phabricator.yourdomain.com/file/
  1. Click Add MonitorHTTP / HTTPS.
  2. Enter: https://phabricator.yourdomain.com/file/.
  3. Set Expected HTTP status to 200 or 403 (either is acceptable — a 403 means the endpoint is alive but requires authentication, which is correct behavior).
  4. Set Check interval to 5 minutes.
  5. Click Save.

Step 5: Monitor the Notification Server (Optional)

If you've enabled the real-time notification server (aphlict), it runs as a separate Node.js process on a configurable port (default 22280 for the client port and 22281 for the admin port). Monitor the admin port to verify the process is alive:

  1. Click Add MonitorTCP Port.
  2. Enter your Phabricator server hostname.
  3. Set Port to 22281 (or your configured admin port from notification.servers in your Phabricator config).
  4. Set Check interval to 5 minutes.
  5. Click Save.

To find your configured notification server ports:

/var/www/phabricator/bin/config get notification.servers

Step 6: SSL Certificate Alerts

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

If you're using Let's Encrypt via certbot, check that the auto-renewal timer is active:

systemctl status certbot.timer
# or
/etc/cron.d/certbot

Phabricator requires HTTPS for Git operations (Diffusion uses HTTPS for repository cloning), so certificate expiry immediately breaks the Git workflow for your developers.


Step 7: 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 — PHP-FPM restarts can cause a brief gap.
  3. Set the phd heartbeat to alert immediately (1 missed ping = alert) since daemon crashes are not transient.
  4. If you use Phabricator's own Herald notification rules, consider adding a Vigilmon webhook as a Phabricator Herald action so Phabricator itself can trigger Vigilmon alerts for application-level events.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Web UI | https://phabricator.yourdomain.com | Apache/nginx or PHP-FPM down | | API probe | /api/conduit.ping | PHP crash, database connection failure | | phd heartbeat | Heartbeat URL | Daemon crash, task queue stalled | | File server | /file/ | File storage endpoint unavailable | | Notification server | TCP :22281 | aphlict process stopped | | SSL certificate | HTTPS domain | Let's Encrypt renewal failure |

Phabricator's architecture means a healthy homepage doesn't guarantee healthy operations — the daemon queue could be stalled while the web UI looks fine. Vigilmon's combination of API probing and heartbeat monitoring gives you visibility into all three layers: the web application, the database, and the background workers.

Monitor your app with Vigilmon

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

Start free →