tutorial

Monitoring GLPI with Vigilmon

GLPI is the most widely deployed open-source IT asset management and help desk platform. Here's how to monitor the web UI, REST API, database, SSL certificates, and cron heartbeats with Vigilmon.

GLPI (Gestionnaire Libre de Parc Informatique) powers IT help desks and asset inventories at thousands of enterprises worldwide. It manages tickets, hardware assets, software licenses, and contracts — all through a self-hosted PHP application backed by MariaDB. When GLPI goes down, your support team can't log tickets, technicians lose visibility into assets, and automated maintenance tasks stop silently. Vigilmon keeps watch over every layer: the web UI, the REST API, the database port, SSL certificates, and the cron scheduler that drives automated maintenance.

What You'll Set Up

  • HTTP monitor for the GLPI login page (web UI health check)
  • HTTP monitor for the /apirest.php/initSession REST API endpoint
  • TCP port monitor for the MariaDB/MySQL database (port 3306)
  • SSL certificate expiry alerts for HTTPS-proxied GLPI setups
  • Cron heartbeat for GLPI scheduled maintenance jobs (glpi-cron.php)

Prerequisites

  • GLPI 10.x installed and accessible over HTTP or HTTPS
  • MariaDB or MySQL running on the same host or a separate DB server
  • A free Vigilmon account

Step 1: Monitor the GLPI Web UI (Login Page)

The GLPI login page is the top-level health indicator: if it loads, the PHP application and web server are functioning.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter the GLPI login URL: https://glpi.yourdomain.com/ (or the path if GLPI is in a subdirectory, e.g. https://yourdomain.com/glpi/).
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Under Keyword check, enter GLPI to confirm the page content loads correctly.
  7. Click Save.

A keyword check catches cases where the web server is up but PHP or the database connection is broken and GLPI renders an error page instead of the login form.


Step 2: Monitor the GLPI REST API Endpoint

GLPI exposes a REST API at /apirest.php. The initSession endpoint is an unauthenticated availability probe — it returns an HTTP 400 (missing credentials) when the API is reachable, which is sufficient to confirm the REST layer is operational.

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter the URL: https://glpi.yourdomain.com/apirest.php/initSession.
  3. Set Check interval to 5 minutes.
  4. Set Expected HTTP status to 400 (the API rejects the unauthenticated request but the endpoint is reachable).
  5. Click Save.

If you have an API token and prefer an authenticated check:

GET /apirest.php/initSession
Authorization: user_token YOUR_GLPI_API_TOKEN
App-Token: YOUR_APP_TOKEN

Set Expected HTTP status to 200 and optionally add a keyword check for "session_token" in the response body for a stronger signal.


Step 3: Monitor the MariaDB/MySQL Database Port

GLPI depends entirely on its database. A dead DB connection causes PHP errors on every page load. Monitor the TCP port directly to catch database host failures before GLPI surfaces them as HTTP 500 errors.

  1. Click Add MonitorTCP Port.
  2. Enter the database host (e.g. db.internal or localhost if monitoring from an agent on the same host).
  3. Set Port to 3306.
  4. Set Check interval to 1 minute.
  5. Click Save.

If your MariaDB listens on a non-standard port, update accordingly. For remote database hosts, make sure the Vigilmon probe can reach the port — adjust firewall rules to allow the Vigilmon probe IPs if needed.


Step 4: SSL Certificate Alerts for HTTPS GLPI Setups

Most production GLPI installations sit behind an nginx or Apache reverse proxy that terminates TLS. Certificate expiry is easy to miss — especially on self-signed or manually renewed certificates.

  1. Open the HTTP / HTTPS monitor you 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.

A 21-day alert window gives you time to renew the certificate before browsers start blocking access. For GLPI setups where the DB or API server also has its own TLS endpoint, add an SSL monitor for that hostname as well.

To check your current certificate expiry manually:

echo | openssl s_client -connect glpi.yourdomain.com:443 2>/dev/null | openssl x509 -noout -dates

Step 5: Heartbeat Monitoring for GLPI Cron Jobs

GLPI relies on glpi-cron.php (or the bin/console glpi:system:scheduler:run CLI command on GLPI 10.x) to perform automated maintenance: ticket escalations, email notifications, inventory synchronization, and cleanup tasks. If the cron job stops running, these processes halt silently with no visible error in the UI.

Set up a Vigilmon cron heartbeat to detect missed runs:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set the expected ping interval to 60 minutes (or match your cron schedule).
  3. Copy the heartbeat URL (e.g. https://vigilmon.online/heartbeat/abc123).
  4. Edit your server crontab (crontab -e as the web server user or root):
*/5 * * * * /usr/bin/php /var/www/html/glpi/bin/console glpi:system:scheduler:run >> /var/log/glpi-cron.log 2>&1 && curl -s https://vigilmon.online/heartbeat/abc123

For older GLPI setups using glpi-cron.php directly:

*/5 * * * * /usr/bin/php /var/www/html/glpi/front/cron.php >> /var/log/glpi-cron.log 2>&1 && curl -s https://vigilmon.online/heartbeat/abc123

The && ensures the heartbeat ping only fires when the cron script exits successfully. If the cron process crashes or returns an error, the ping is skipped and Vigilmon alerts after the expected interval.


Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and connect Slack, email, Microsoft Teams, or a webhook.
  2. Set Consecutive failures before alert to 2 on the web UI monitor — a single slow response during peak load shouldn't page anyone.
  3. Set Consecutive failures before alert to 1 on the database TCP monitor — a DB outage is always critical.
  4. Use Maintenance windows in Vigilmon before running GLPI upgrades:
# Pause monitoring before upgrade
curl -X POST https://vigilmon.online/api/maintenance \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"monitor_id": "glpi-webui", "duration_minutes": 30}'

# Run GLPI upgrade
php bin/console glpi:database:update

# Maintenance window expires automatically

Summary

| Monitor | Target | What It Catches | |---|---|---| | HTTP — web UI | https://glpi.yourdomain.com/ | App crash, PHP error, web server down | | HTTP — REST API | /apirest.php/initSession | API layer failure | | TCP port | MariaDB host :3306 | Database host unreachable | | SSL certificate | GLPI domain | Certificate expiry, renewal failure | | Cron heartbeat | Heartbeat URL | Missed cron run, scheduler crash |

GLPI's value is entirely dependent on availability — support teams can't log tickets and management can't run asset reports when it's down. With Vigilmon watching every layer from the login page to the database port and cron scheduler, you catch problems before your help desk staff does.

Monitor your app with Vigilmon

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

Start free →