MediaWiki is the world's most widely deployed open-source wiki platform (PHP, MySQL/MariaDB), powering Wikipedia, Wikimedia Commons, and thousands of corporate intranets and documentation sites. When your MediaWiki instance goes down, every editor and reader loses access to your organisation's knowledge base. Vigilmon keeps watch around the clock — alerting you the moment the wiki UI, its API, SSL certificates, or background maintenance jobs show signs of trouble.
What You'll Set Up
- HTTP uptime monitor for the MediaWiki Main Page (web UI health check)
- API endpoint monitors for
/api.php(Action API) and/api/rest_v1/(REST API) - SSL certificate expiry alerts for HTTPS MediaWiki deployments
- Cron heartbeat monitors for MediaWiki maintenance scripts (
runJobs.php,updateSearchIndex.php)
Prerequisites
- MediaWiki 1.35+ (LTS) running on a server accessible over HTTP or HTTPS
- PHP-CLI available on the server (required for maintenance scripts)
- A free Vigilmon account
Step 1: Monitor the MediaWiki Main Page
The Main Page is the canonical health indicator for a MediaWiki install. A successful response confirms PHP is running, the database is reachable, and MediaWiki's core rendering pipeline is intact.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your wiki's Main Page URL:
Or, if you use short URLs:https://wiki.yourdomain.com/wiki/Main_Pagehttps://wiki.yourdomain.com/ - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - In Keyword check, enter a phrase from your Main Page that should always be present — for example,
MediaWikior your wiki's name. This catches cases where the page loads with an error message rather than real content. - Click Save.
Step 2: Monitor the MediaWiki Action API
MediaWiki's Action API (/api.php) is used by bots, extensions, mobile apps, and integrations. Monitoring it separately from the UI catches failures in the API layer while the wiki frontend still serves cached pages.
- Click Add Monitor → HTTP / HTTPS.
- Enter the siteinfo endpoint:
https://wiki.yourdomain.com/api.php?action=query&meta=siteinfo&format=json - Set Check interval to
5 minutes. - Set Expected HTTP status to
200. - In Keyword check, enter
generator— this key always appears in a healthy siteinfo response and confirms the API returned valid JSON. - Click Save.
This monitor alerts you if the Action API is returning errors or is unreachable, independently of whether the wiki frontend appears healthy.
Step 3: Monitor the MediaWiki REST API
MediaWiki 1.35+ ships a REST API under /api/rest_v1/. It serves page summaries, revisions, and media metadata and is used by many modern integrations. Add a monitor for the page summary endpoint:
- Click Add Monitor → HTTP / HTTPS.
- Enter the REST API page summary endpoint for a page that always exists on your wiki (substitute
Main_Pagewith the actual title if different):https://wiki.yourdomain.com/api/rest_v1/page/summary/Main_Page - Set Check interval to
5 minutes. - Set Expected HTTP status to
200. - In Keyword check, enter
title— present in every valid summary response. - Click Save.
Step 4: SSL Certificate Alerts
Let's Encrypt and other CAs issue short-lived certificates. A missed renewal causes your wiki to show browser security warnings to every visitor. Add a certificate expiry alert to each HTTPS monitor:
- Open any of the monitors you created above.
- Enable Monitor SSL certificate under the SSL section.
- Set Alert when certificate expires in less than
21 days. - Click Save.
Repeat for every hostname your wiki is reachable under (e.g., wiki.yourdomain.com, www.yourdomain.com). A 21-day window gives you three weekly renewal attempts before the certificate actually expires.
To verify your current certificate expiry from the command line:
echo | openssl s_client -servername wiki.yourdomain.com \
-connect wiki.yourdomain.com:443 2>/dev/null \
| openssl x509 -noout -dates
Step 5: Heartbeat Monitoring for MediaWiki Maintenance Scripts
MediaWiki's job queue and search index rely on PHP CLI maintenance scripts, typically invoked by cron. If the cron entry is misconfigured, the server runs out of disk space, or PHP crashes silently, jobs pile up — and the wiki degrades without any HTTP-level sign of failure.
Use Vigilmon's cron heartbeat to confirm each maintenance script actually completes.
runJobs.php (Job Queue Runner)
MediaWiki defers expensive operations (notifications, re-renders, file processing) to the job queue. runJobs.php drains the queue and should run frequently — every minute on busy wikis.
- In Vigilmon, click Add Monitor → Cron Heartbeat.
- Set the name to
MediaWiki runJobs. - Set Expected ping interval to
5 minutes(or match your cron frequency). - Copy the heartbeat URL (e.g.,
https://vigilmon.online/heartbeat/abc123). - Update your cron entry to ping Vigilmon on success:
# /etc/cron.d/mediawiki-runjobs
* * * * * www-data php /var/www/mediawiki/maintenance/runJobs.php --maxjobs=100 \
&& curl -s https://vigilmon.online/heartbeat/abc123
updateSearchIndex.php (Search Index Rebuilder)
If your wiki uses CirrusSearch, MWSearch, or the built-in SQLite search, the index must stay current for search to work.
- Click Add Monitor → Cron Heartbeat.
- Set the name to
MediaWiki updateSearchIndex. - Set Expected ping interval to match your cron schedule (e.g.,
60 minutes). - Update your cron entry:
# /etc/cron.d/mediawiki-searchindex
0 * * * * www-data php /var/www/mediawiki/maintenance/updateSearchIndex.php \
&& curl -s https://vigilmon.online/heartbeat/def456
If either script crashes mid-run or is skipped entirely, Vigilmon alerts you after the expected interval passes.
Step 6: Configure Alert Channels
- Go to Alert Channels in Vigilmon and add Slack, email, or a webhook to your preferred notification destination.
- Set Consecutive failures before alert to
2on the web UI monitor — a single slow PHP response can cause one probe to time out without indicating a real outage. - Use Maintenance windows in Vigilmon when running major MediaWiki upgrades or database maintenance:
# Suppress alerts for 30 minutes during an 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 |
|---|---|---|
| Main Page | https://wiki.yourdomain.com/wiki/Main_Page | PHP crash, DB down, rendering failure |
| Action API | /api.php?action=query&meta=siteinfo | API layer failure |
| REST API | /api/rest_v1/page/summary/Main_Page | REST API unavailable |
| SSL certificate | Each HTTPS hostname | Certificate expiry |
| runJobs heartbeat | Heartbeat URL | Job queue backlog, cron failure |
| updateSearchIndex heartbeat | Heartbeat URL | Stale search index, cron failure |
MediaWiki is battle-tested at Wikipedia scale — but your instance still needs active monitoring. With Vigilmon watching the wiki UI, API endpoints, SSL certificates, and maintenance scripts, you'll know about problems before your editors do.