tutorial

Monitoring eLabFTW with Vigilmon

eLabFTW is the open-source electronic lab notebook trusted by research teams worldwide — but a silent PHP-FPM crash or a full MySQL disk can erase a day's experiment records. Here's how to monitor every layer with Vigilmon.

eLabFTW is an open-source electronic lab notebook (ELN) used by universities, pharmaceutical companies, and research institutes to record experiments, manage protocols, and share data securely. It runs on PHP/MySQL behind nginx or Apache on port 443 (HTTPS). When eLabFTW goes down, researchers lose access to protocols mid-experiment, PDF exports fail silently, and LDAP authentication errors lock out entire teams. Vigilmon gives you proactive visibility across every critical service so failures are caught in seconds, not hours.

What You'll Set Up

  • HTTPS web server availability monitor
  • PHP-FPM process health check
  • MySQL database connectivity monitor
  • File upload and storage backend health
  • PDF export generation service check
  • LDAP/SAML authentication integration probe
  • Email notification delivery heartbeat
  • API v2 endpoint response time monitoring
  • Scheduler and booking system health
  • Automated backup job heartbeat

Prerequisites

  • eLabFTW installed and running (Docker or bare-metal)
  • Access to the host server (for cron/systemd heartbeats)
  • A free Vigilmon account

Step 1: Monitor the HTTPS Web Server

The eLabFTW login page is your primary liveness signal. Monitor it first:

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

eLabFTW redirects unauthenticated requests to the login page — a 200 on the root URL confirms nginx, PHP-FPM, and the application bootstrap are all healthy.


Step 2: Monitor PHP-FPM Process Health

PHP-FPM handles all PHP execution. When it crashes, eLabFTW returns 502/504 errors. Add a status page monitor:

If your nginx config exposes the PHP-FPM status page (common in Docker installs):

location /fpm-status {
    access_log off;
    allow 127.0.0.1;
    deny all;
    fastcgi_pass php-fpm:9000;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

Then in Vigilmon:

  1. Add monitor — Type: HTTP / HTTPS.
  2. URL: http://localhost/fpm-status (or via your internal network).
  3. Expected status: 200.
  4. Body contains: pool: (PHP-FPM status output always starts with the pool name).
  5. Check interval: 1 minute.

Alternatively, add a TCP port check against the PHP-FPM socket port:

  1. Type: TCP Port.
  2. Host: your-elabftw-host, Port: 9000.
  3. Check interval: 1 minute.

Step 3: Monitor MySQL Database Connectivity

eLabFTW's experiment records, users, and protocols all live in MySQL. A lost database connection makes the app unusable within seconds. Monitor the MySQL port:

  1. Add monitor — Type: TCP Port.
  2. Host: your-mysql-host, Port: 3306.
  3. Check interval: 1 minute.
  4. Save.

For a deeper check, add an HTTP monitor against eLabFTW's built-in database connectivity endpoint:

https://your-elabftw-domain.example.com/app/controllers/CheckDbController.php

This controller runs a test query and returns an error page on failure. Set Expected status to 200.


Step 4: Monitor File Upload and Storage Backend

eLabFTW stores uploaded files (images, PDFs, raw data) in an uploads/ directory. A full disk or mount failure silently breaks all file attachments. Add a storage health probe:

If you expose a storage check route or use a dedicated health endpoint, monitor it. For Docker deployments, add a container-level check via a cron heartbeat:

#!/bin/bash
# probe-elabftw-storage.sh
UPLOADS_DIR="/path/to/elabftw/uploads"
THRESHOLD_PERCENT=90

USAGE=$(df "$UPLOADS_DIR" | awk 'NR==2 {print $5}' | tr -d '%')
if [ "$USAGE" -lt "$THRESHOLD_PERCENT" ]; then
  # Also verify we can write
  touch "$UPLOADS_DIR/.vigilmon_probe" && rm "$UPLOADS_DIR/.vigilmon_probe"
  curl -fsS "https://vigilmon.online/api/push/YOUR_STORAGE_HEARTBEAT_KEY" > /dev/null
fi

In Vigilmon:

  1. Add monitor — Type: Heartbeat.
  2. Set Expected interval to 5 minutes.

Run the script every 5 minutes via cron:

*/5 * * * * /usr/local/bin/probe-elabftw-storage.sh

Step 5: Monitor PDF Export Generation

eLabFTW uses a headless Chrome/wkhtmltopdf service to generate PDF exports of experiments. This service frequently fails under memory pressure. Add a keyword monitor on the eLabFTW admin panel's system status:

  1. Add monitor — Type: HTTP / HTTPS.
  2. URL: https://your-elabftw-domain.example.com/sysconfig.php (admin only — use an admin session cookie or a dedicated probe account).
  3. Body contains: PDF (the sysconfig page lists PDF generation status).
  4. Check interval: 5 minutes.

Alternatively, schedule a nightly PDF export test via the API and push a heartbeat on success:

# probe-elabftw-pdf.sh
TOKEN="your-api-token"
# Fetch a known experiment as PDF
curl -fsS -H "Authorization: $TOKEN" \
  "https://your-elabftw-domain.example.com/api/v2/experiments/1?format=pdf" \
  -o /tmp/probe.pdf \
  && curl -fsS "https://vigilmon.online/api/push/YOUR_PDF_HEARTBEAT_KEY" > /dev/null

Step 6: Monitor LDAP/SAML Authentication

If your institution uses LDAP or SAML SSO, an IdP outage locks out all users. Monitor your LDAP port directly:

  1. Add monitor — Type: TCP Port.
  2. Host: your-ldap-server, Port: 389 (or 636 for LDAPS).
  3. Check interval: 2 minutes.

For SAML/SSO, monitor the IdP metadata endpoint:

  1. Add monitor — Type: HTTP / HTTPS.
  2. URL: https://your-idp.example.com/metadata.
  3. Expected status: 200.
  4. Body contains: EntityDescriptor.
  5. Check interval: 2 minutes.

Step 7: Monitor Email Notification Delivery

eLabFTW sends email notifications for experiment comments, booking confirmations, and admin alerts. Test SMTP connectivity:

  1. Add monitor — Type: TCP Port.
  2. Host: your-smtp-host, Port: 587 (or 465/25).
  3. Check interval: 5 minutes.

For end-to-end verification, schedule a nightly test email via the eLabFTW API and push a heartbeat:

# probe-elabftw-email.sh
curl -fsS -X POST \
  -H "Authorization: your-api-token" \
  "https://your-elabftw-domain.example.com/api/v2/tests/email" \
  && curl -fsS "https://vigilmon.online/api/push/YOUR_EMAIL_HEARTBEAT_KEY" > /dev/null

Step 8: Monitor API v2 Response Times

The eLabFTW REST API (v2) is used by integrations, LIMS connectors, and automation scripts. Monitor endpoint response time:

  1. Add monitor — Type: HTTP / HTTPS.
  2. URL: https://your-elabftw-domain.example.com/api/v2/info.
  3. Expected status: 200.
  4. Check interval: 1 minute.
  5. Under Response time alert, set threshold to 3000 ms — API calls taking over 3 seconds indicate database or PHP performance problems.

The /api/v2/info endpoint requires no authentication and returns eLabFTW version info, making it a safe latency probe.


Step 9: Monitor Scheduler and Booking System

The eLabFTW scheduler lets teams book equipment and reserve lab time. Its availability depends on the database and a background cron job:

  1. Add monitor — Type: HTTP / HTTPS.
  2. URL: https://your-elabftw-domain.example.com/scheduler.php.
  3. Expected status: 200 (or 302 redirect to login — still proves the PHP router is alive).
  4. Check interval: 2 minutes.

Step 10: Monitor Automated Backup Jobs

eLabFTW backups protect years of experimental records. Monitor the backup cron job with a heartbeat:

# /etc/cron.d/elabftw-backup
0 2 * * * root /usr/local/bin/elabftw-backup.sh \
  && curl -fsS "https://vigilmon.online/api/push/YOUR_BACKUP_HEARTBEAT_KEY" > /dev/null

In Vigilmon:

  1. Add monitor — Type: Heartbeat.
  2. Set Expected interval to 25 hours (daily backup with 1-hour grace).
  3. Enable Alert after 1 missed heartbeat — a missed backup is always urgent.

Alerting Configuration

  1. Go to Alert Channels in Vigilmon and add email, Slack, or PagerDuty.
  2. Set Alert after: 2 consecutive failures for the web server and API monitors to avoid transient alerts.
  3. Set Alert after: 1 failure for MySQL and backup heartbeat monitors.
  4. Enable Recovery alerts so your team knows when eLabFTW is back after an outage.
  5. Set a Response time alert on the API v2 monitor at 3 seconds to catch slow queries before users notice.

Summary

| Monitor | Type | Interval | |---|---|---| | HTTPS web server | HTTP | 1 min | | PHP-FPM (TCP or status page) | TCP / HTTP | 1 min | | MySQL (port 3306) | TCP Port | 1 min | | File storage write test | Heartbeat | 5 min | | PDF export generation | Heartbeat | nightly | | LDAP port (389/636) | TCP Port | 2 min | | SAML IdP metadata | HTTP + keyword | 2 min | | SMTP port | TCP Port | 5 min | | API v2 /info endpoint | HTTP + latency | 1 min | | Scheduler page | HTTP | 2 min | | Daily backup job | Heartbeat | 25 hr |

Researchers trust eLabFTW with irreplaceable experiment data — the kind that supports publications, patents, and regulatory filings. These eleven monitors ensure the full stack from HTTPS to daily backups is healthy, so a PHP crash or full disk never costs a day's science.

Sign up for a free Vigilmon account to get started.

Monitor your app with Vigilmon

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

Start free →