tutorial

Monitoring iTop ITSM with Vigilmon

iTop is a powerful open-source ITSM and CMDB platform — but it depends on PHP, MySQL, and background cron jobs that can fail silently. Here's how to monitor every layer of your iTop stack with Vigilmon.

iTop is an open-source ITIL-compliant IT Service Management platform and Configuration Management Database used by thousands of IT teams to manage incidents, changes, and CIs. It runs on a PHP/Apache stack with a MySQL backend and depends on background cron jobs for email notifications, data synchronization, and scheduled operations. When any of those layers fails silently, helpdesk tickets stop flowing and CI data goes stale without anyone noticing. Vigilmon gives you external uptime checks for iTop's web interface, REST API, database connectivity, and background scheduler so you catch failures before your service desk does.

What You'll Set Up

  • iTop web application availability check
  • PHP-FPM process health via status endpoint
  • MySQL database connectivity via a lightweight iTop page probe
  • Background cron scheduler heartbeat
  • Data synchronization pipeline health
  • REST API endpoint response time monitoring
  • Email notification delivery heartbeat
  • LDAP/Active Directory integration probe
  • File attachment storage service check

Prerequisites

  • iTop installed and accessible (default port 80 or 443)
  • SSH or server access to configure cron-probe scripts
  • A free Vigilmon account

Step 1: Monitor the iTop Web Application

iTop's login page is the most direct signal that the PHP stack, web server, and database are all healthy.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your iTop URL: https://itop.yourdomain.com/pages/UI.php
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Set Expected response body contains to iTop (the page title always includes the product name).
  7. Click Save.

If the page returns a PHP error, database connection failure, or blank response, this monitor fires immediately.


Step 2: Monitor PHP-FPM Health

iTop relies on PHP-FPM to process requests. PHP-FPM exposes a status page that shows active workers, idle processes, and request queues. Enable it in your PHP-FPM pool configuration:

; /etc/php/8.x/fpm/pool.d/www.conf
pm.status_path = /status

Then expose the status page through your web server (nginx example):

location /fpm-status {
    access_log off;
    allow 127.0.0.1;
    deny all;
    fastcgi_pass unix:/run/php/php8.x-fpm.sock;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

Add a Vigilmon HTTP monitor for http://localhost/fpm-status with expected status 200 and expected body contains pool:. A missing pool line indicates PHP-FPM has crashed or restarted into a degraded state.

If direct server access is not available from Vigilmon's probes, use a cron heartbeat script (see Step 4) that checks FPM locally and pings Vigilmon.


Step 3: Monitor MySQL Database Connectivity

iTop fails visibly when MySQL is down, but the failure mode is a PHP error page rather than an HTTP 500 — which Vigilmon's body-contains check catches.

Add a second HTTP monitor for the iTop configuration check page:

https://itop.yourdomain.com/setup/index.php

If iTop is properly installed, this page redirects to the main UI (301/302). Set Expected HTTP status to 301 or 302. If MySQL is down, the setup page loads with a database error instead of redirecting.

For a more direct database probe, create a minimal PHP health page on the server:

<?php
// /var/www/itop/health.php
$dsn = 'mysql:host=localhost;dbname=itop;charset=utf8';
try {
    $pdo = new PDO($dsn, 'itop_user', 'itop_password');
    echo 'ok';
} catch (PDOException $e) {
    http_response_code(503);
    echo 'db_error';
}

Add a Vigilmon HTTP monitor for https://itop.yourdomain.com/health.php with expected status 200 and expected body ok.


Step 4: Monitor the Background Cron Scheduler

iTop relies on a cron process (cron.php) for email notifications, background syncs, and scheduled operations. This process must run continuously but produces no HTTP endpoint. Use a Vigilmon cron heartbeat:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set the expected interval to 10 minutes (iTop cron typically runs every 1–5 minutes, so 10 minutes gives enough slack to catch a stopped cron without false alerts).
  3. Copy the heartbeat URL.
  4. Create a wrapper script:
#!/bin/bash
# /opt/scripts/itop-cron-probe.sh
php /var/www/itop/webservices/cron.php \
  --auth_user=admin \
  --auth_pwd="$ITOP_CRON_PASS" \
  --verbose=0 \
  && curl -s https://vigilmon.online/heartbeat/ITOP_CRON_KEY
  1. Add to the iTop server's crontab:
*/5 * * * * /opt/scripts/itop-cron-probe.sh >> /var/log/itop-cron.log 2>&1

If cron.php exits non-zero (database gone, PHP fatal error, disk full), the heartbeat never fires and Vigilmon alerts after 10 minutes.


Step 5: Monitor the Data Synchronization Pipeline

iTop's data synchronization module imports CIs from external sources (Active Directory, monitoring tools, CMDBs). Sync failures leave your CMDB stale without obvious UI errors.

Create a probe script that checks the last successful sync time via iTop's REST API:

#!/bin/bash
# Check that at least one sync task ran in the last 2 hours
RESULT=$(curl -s -u "admin:$ITOP_PASS" \
  "https://itop.yourdomain.com/webservices/rest.php?version=1.3&json_data=%7B%22operation%22%3A%22core%2Fget%22%2C%22class%22%3A%22SynchroDataSource%22%2C%22key%22%3A%22SELECT+SynchroDataSource%22%2C%22output_fields%22%3A%22last_synchro_date%22%7D")

LAST_SYNC=$(echo "$RESULT" | python3 -c "
import sys, json
data = json.load(sys.stdin)
objects = data.get('objects', {})
if objects:
    print(list(objects.values())[0]['fields']['last_synchro_date'])
")

echo "Last sync: $LAST_SYNC"
# If sync ran in the last 2 hours, ping the heartbeat
curl -s https://vigilmon.online/heartbeat/ITOP_SYNC_KEY

Schedule this script every 30 minutes and set the Vigilmon heartbeat interval to 120 minutes.


Step 6: Monitor the REST API

iTop's REST API is used by integrations, automation scripts, and CI import pipelines. Monitor it with a lightweight core/check_credentials call:

  1. Add a Vigilmon HTTP monitor for:
    https://itop.yourdomain.com/webservices/rest.php?version=1.3&json_data=%7B%22operation%22%3A%22core%2Fcheck_credentials%22%2C%22user%22%3A%22monitor%22%2C%22password%22%3A%22probe_pass%22%7D
    
  2. Set Expected HTTP status to 200.
  3. Set Expected response body contains to "code":0 (successful credential check).
  4. Set Response time alert to 3000 ms.

Create a dedicated read-only monitor user in iTop for this probe so the credentials are isolated from admin accounts.


Step 7: Monitor Email Notification Delivery

iTop sends email notifications for ticket updates, escalations, and approvals via its built-in mail driver. Silent email failures are one of the hardest ITSM problems to detect.

Set up a cron heartbeat that confirms iTop's mail queue is processing:

  1. Create a Vigilmon cron heartbeat with a 60-minute expected interval.
  2. Add a probe script that checks the iTop mail queue via the database:
#!/bin/bash
# Check that the mail queue has no items stuck longer than 30 minutes
STUCK=$(mysql -u itop_user -p"$MYSQL_PASS" itop -sN -e "
  SELECT COUNT(*) FROM priv_async_task
  WHERE status = 'error'
  AND (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(started)) > 1800;
")

if [ "$STUCK" = "0" ]; then
  curl -s https://vigilmon.online/heartbeat/ITOP_MAIL_KEY
else
  echo "Mail queue stuck: $STUCK tasks in error state"
fi

Schedule every 30 minutes. If stuck tasks accumulate and the heartbeat stops firing, Vigilmon alerts after 60 minutes.


Step 8: Monitor LDAP/Active Directory Integration

iTop can authenticate users against Active Directory or LDAP. An LDAP connectivity failure locks out all AD-authenticated users while local admin accounts still work — making the failure invisible until users start calling the helpdesk.

Add a TCP port monitor for your LDAP server:

  1. Click Add MonitorTCP Port.
  2. Enter your domain controller address and port: ldap.yourdomain.com:389 (or 636 for LDAPS).
  3. Set Check interval to 1 minute.
  4. Click Save.

For LDAPS, also add an SSL certificate monitor on port 636 with a 21-day expiry alert — an expired LDAP certificate locks out all AD users instantly.


Step 9: Monitor File Attachment Storage

iTop stores file attachments on disk (default: data/attachments/). A full disk or broken permissions cause silent upload failures — iTop shows a success message but the attachment never saves.

Create a disk-space probe:

#!/bin/bash
# Alert Vigilmon only when attachment storage is below 20% free
USAGE=$(df /var/www/itop/data/attachments | tail -1 | awk '{print $5}' | tr -d '%')
if [ "$USAGE" -lt 80 ]; then
  curl -s https://vigilmon.online/heartbeat/ITOP_STORAGE_KEY
else
  echo "Attachment storage at ${USAGE}% — disk critical"
fi

Set the Vigilmon heartbeat interval to 60 minutes and schedule the script every 30 minutes.


Step 10: 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 HTTP monitors — PHP-FPM restarts are brief and should not trigger false positives.
  3. For the REST API, set Response time alert to 3000 ms.
  4. Use Maintenance windows in Vigilmon when applying iTop updates or database migrations.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Web application | /pages/UI.php | PHP crash, web server down | | PHP-FPM status | /fpm-status | Worker pool exhausted or crashed | | MySQL connectivity | /health.php | Database connection failure | | Cron scheduler | Heartbeat URL | Background job stopped | | Data sync pipeline | Heartbeat URL | CMDB data going stale | | REST API | /webservices/rest.php | API errors, slow response | | Email delivery | Heartbeat URL | Mail queue stuck | | LDAP/AD | :389 TCP | Directory auth unavailable | | File storage | Heartbeat URL | Disk full, upload failures |

iTop is the system of record for your IT infrastructure — when it quietly degrades, every downstream process from incident management to change approval is affected. With Vigilmon watching the full stack from web interface to database to background scheduler, you get the same external visibility you would expect to have over any other critical business system.

Monitor your app with Vigilmon

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

Start free →