tutorial

Monitoring eGroupWare / EGroupware with Vigilmon

EGroupware is a powerful open source groupware and CRM suite used across European enterprises and public sector. Here's how to monitor its web application, database, CalDAV endpoint, ActiveSync, and more with Vigilmon.

EGroupware is one of the most mature open source groupware and CRM platforms available, deployed across European enterprises, public sector organisations, and healthcare institutions. It provides email (via IMAP integration), calendar, contacts, tasks, project management, CRM, knowledge base, and file management — all in a unified PHP web application backed by MySQL/MariaDB. When EGroupware goes down, every collaboration function in your organisation stops.

Vigilmon gives you visibility into every layer of the stack: the PHP web application, the database, CalDAV/CardDAV endpoints, ActiveSync (eSync), IMAP connectivity, session management, and storage. This tutorial walks you through setting up comprehensive monitoring so you know about problems before your users do.

What You'll Set Up

  • HTTP uptime monitor for the EGroupware web application
  • Database health monitor (MySQL/MariaDB)
  • CalDAV/CardDAV endpoint health check
  • eSync/ActiveSync endpoint health check
  • IMAP connectivity heartbeat
  • PHP session store health check
  • File manager storage capacity alert
  • Alert routing to Slack or email

Prerequisites

  • EGroupware 21.1+ installed (Apache/Nginx + PHP + MySQL/MariaDB)
  • External IMAP server (Dovecot, Cyrus, or similar) configured
  • A free Vigilmon account

Step 1: Monitor the EGroupware Web Application

The EGroupware PHP application is the front door to all collaboration. If Apache/Nginx or PHP-FPM fails, every user is locked out.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter your EGroupware URL: https://groupware.yourdomain.com/login.php.
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Enable Monitor SSL certificate and alert when less than 21 days remain.
  7. Click Save.

For a richer health signal, add a lightweight health check script at a known path:

<?php
// /var/www/egroupware/health.php
// Simple liveness check — does not expose internal data
header('Content-Type: application/json');
echo json_encode(['status' => 'ok', 'ts' => time()]);

Then monitor https://groupware.yourdomain.com/health.php instead of the login page. This avoids false positives from login page redirects and gives you a clean 200 response to check.


Step 2: Monitor MySQL/MariaDB Database Health

All EGroupware data — calendar events, contacts, CRM records, user accounts — lives in MySQL/MariaDB. A database failure causes a complete application outage.

Add a TCP port monitor for the database:

  1. Click Add MonitorTCP Port.
  2. Enter your database server hostname or IP.
  3. Set Port to 3306.
  4. Set Check interval to 1 minute.
  5. Click Save.

For deeper query-level monitoring, create a dedicated health check endpoint that tests a real query:

<?php
// /var/www/egroupware/db-health.php
$dsn = 'mysql:host=localhost;dbname=egroupware;charset=utf8mb4';
try {
    $pdo = new PDO($dsn, 'egroupware', getenv('EGW_DB_PASS'));
    $pdo->query('SELECT 1');
    http_response_code(200);
    echo json_encode(['db' => 'ok']);
} catch (Exception $e) {
    http_response_code(503);
    echo json_encode(['db' => 'error']);
}

Monitor https://groupware.yourdomain.com/db-health.php with an expected HTTP status of 200 and alert on anything else.


Step 3: Monitor the CalDAV/CardDAV Endpoint

EGroupware exposes CalDAV and CardDAV via groupdav.php, enabling calendar and contact synchronisation with mobile devices and desktop clients. A failure here means calendars stop syncing across your organisation.

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://groupware.yourdomain.com/groupdav.php.
  3. Set Check interval to 2 minutes.
  4. Set Expected HTTP status to 401 (CalDAV returns 401 on unauthenticated access, which confirms the service is alive).
  5. Click Save.

Alternatively, if you have a monitoring service account, set it to 200 and pass HTTP Basic credentials in the monitor settings. A 401 response is a reliable liveness signal — it means Apache and PHP are processing CalDAV requests correctly.


Step 4: Monitor the eSync / ActiveSync Endpoint

EGroupware's eSync component provides Exchange ActiveSync protocol support for Outlook and mobile devices. Monitor the eSync endpoint to catch failures before users notice their email and calendars stop updating.

  1. Click Add MonitorHTTP / HTTPS.
  2. Enter https://groupware.yourdomain.com/Microsoft-Server-ActiveSync.
  3. Set Check interval to 2 minutes.
  4. Set Expected HTTP status to 401 (ActiveSync requires authentication; a 401 confirms the endpoint is alive).
  5. Click Save.

If eSync is running on a separate subdomain or path, update the URL accordingly. The critical signal is that the endpoint responds — a connection refused or 502 indicates PHP-FPM or Apache failure.


Step 5: Monitor IMAP Server Connectivity

EGroupware does not implement its own IMAP server — it connects to an external IMAP daemon (Dovecot, Cyrus, or similar). If IMAP becomes unreachable, EGroupware's webmail module loses access to email for all users.

Add a TCP port monitor for IMAP:

  1. Click Add MonitorTCP Port.
  2. Enter your IMAP server hostname.
  3. Set Port to 993 (IMAPS) or 143 (IMAP with STARTTLS).
  4. Set Check interval to 1 minute.
  5. Click Save.

Add a second TCP monitor for SMTP if EGroupware is also sending email:

  1. Add another TCP Port monitor.
  2. Set Port to 587 (submission) or 25.
  3. Click Save.

Step 6: Monitor PHP Session Store Health

EGroupware manages user sessions either in the database or via filesystem-based sessions. A broken session store causes all authenticated users to be logged out immediately.

Create a session store health endpoint:

<?php
// /var/www/egroupware/session-health.php
session_start();
if (session_status() === PHP_SESSION_ACTIVE) {
    http_response_code(200);
    echo json_encode(['sessions' => 'ok']);
} else {
    http_response_code(503);
    echo json_encode(['sessions' => 'error']);
}
session_destroy();

Monitor https://groupware.yourdomain.com/session-health.php every 2 minutes with an expected status of 200.

For database-backed sessions, you can extend the db-health.php check from Step 2 to query the egw_sessions table:

$stmt = $pdo->query('SELECT COUNT(*) FROM egw_sessions WHERE session_logintime > UNIX_TIMESTAMP() - 3600');
$count = $stmt->fetchColumn();
echo json_encode(['db' => 'ok', 'active_sessions' => $count]);

Step 7: Monitor File Manager Storage

EGroupware's file manager stores user attachments and documents on disk. If storage fills up, file uploads fail and application errors appear.

Create a disk space health endpoint:

<?php
// /var/www/egroupware/storage-health.php
$path = '/var/lib/egroupware';
$free  = disk_free_space($path);
$total = disk_total_space($path);
$pct   = ($total - $free) / $total * 100;

if ($pct > 90) {
    http_response_code(503);
    echo json_encode(['storage' => 'critical', 'used_pct' => round($pct, 1)]);
} elseif ($pct > 80) {
    http_response_code(429);
    echo json_encode(['storage' => 'warning', 'used_pct' => round($pct, 1)]);
} else {
    http_response_code(200);
    echo json_encode(['storage' => 'ok', 'used_pct' => round($pct, 1)]);
}

Monitor this endpoint every 5 minutes. Set an alert on any status other than 200 — a 429 warns you at 80% capacity; a 503 fires at 90%.


Step 8: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or a webhook.
  2. For the web application and database monitors, set Consecutive failures before alert to 2 — this avoids noise from transient PHP or MySQL hiccups.
  3. For the storage monitor, set it to 1 — disk-full events are urgent and won't self-resolve.
  4. Use Maintenance windows in Vigilmon during EGroupware upgrades to suppress expected downtime alerts.

To automate maintenance windows via the Vigilmon API:

# Before starting an EGroupware upgrade
curl -X POST https://vigilmon.online/api/maintenance \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"monitor_id": "YOUR_MONITOR_ID", "duration_minutes": 30}'

Summary

| Monitor | Target | What It Catches | |---|---|---| | Web application | /login.php or /health.php | Apache/Nginx or PHP-FPM failure | | Database | TCP port 3306 | MySQL/MariaDB crash | | DB query health | /db-health.php | Query failures, connection pool exhaustion | | CalDAV/CardDAV | /groupdav.php | Mobile calendar/contact sync failure | | eSync / ActiveSync | /Microsoft-Server-ActiveSync | Outlook and mobile email sync failure | | IMAP | TCP port 993 | External IMAP server unreachable | | Session store | /session-health.php | Session backend failure causing logouts | | File storage | /storage-health.php | Disk full, file upload failures |

EGroupware's breadth — groupware, CRM, file management, CalDAV, ActiveSync — means there are many surfaces to watch. With Vigilmon covering each layer from the PHP application down to the IMAP connection and disk capacity, you have the visibility to catch failures before they interrupt your organisation's day-to-day collaboration.

Monitor your app with Vigilmon

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

Start free →