tutorial

Monitoring Mattermost with Vigilmon: Health Endpoints, Database Checks & SSL Certificate Alerts

How to monitor self-hosted Mattermost team messaging with Vigilmon — ping health endpoint, database connectivity keyword check, web app availability, SSL certificate monitoring, and alerting for your team communication platform.

Mattermost is the leading self-hosted alternative to Slack — used by security-conscious teams, regulated industries, and organizations that need full control over their communication data. When Mattermost goes down, your team loses the messaging, file sharing, and notification infrastructure that coordinates daily work. A database connectivity failure can take Mattermost offline without any obvious process crash, and SSL expiry causes browser warnings that prevent users from logging in. Vigilmon gives you external visibility into Mattermost's health: the built-in ping endpoint, database connectivity, the web app, and SSL certificates — so you catch outages before your team notices.

What You'll Build

  • A monitor on Mattermost's /api/v4/system/ping health endpoint
  • A database connectivity keyword check via the ping endpoint response
  • A web app availability monitor
  • SSL certificate monitoring for your Mattermost domain
  • Alerting that distinguishes process failures from database connectivity issues

Prerequisites

  • A running Mattermost server (Team Edition or Enterprise) with HTTPS access
  • Mattermost accessible at a public or network-reachable URL (e.g., https://mattermost.example.com)
  • A free account at vigilmon.online

Step 1: Verify Mattermost's Ping Endpoint

Mattermost ships with a system ping endpoint that returns JSON with the server status and component health:

# Basic ping — returns {"status":"OK"} when healthy
curl https://mattermost.example.com/api/v4/system/ping

# Extended ping with database and file store checks
curl "https://mattermost.example.com/api/v4/system/ping?get_server_status=true"

A healthy Mattermost returns {"status":"OK"} with HTTP 200. If the database is unreachable, the response body contains "database_status":"UNHEALTHY" or the endpoint returns 500. The extended ping also exposes file store and cluster status.


Step 2: Create a Vigilmon Monitor for the Ping Endpoint

  1. Log in to VigilmonAdd Monitor → HTTP.
  2. URL: https://mattermost.example.com/api/v4/system/ping.
  3. Check interval: 60 seconds.
  4. Response timeout: 10 seconds.
  5. Expected status: 200.
  6. Keyword: "status":"OK".
  7. Label: Mattermost Ping.
  8. Click Save.

The keyword check catches the case where Mattermost returns 200 but the body signals degraded state. Without it, a 200 response from a degraded server would pass the status-code check silently.


Step 3: Add a Database Connectivity Check

Database connectivity failures are the most common cause of Mattermost downtime. Add a second monitor using the extended ping to specifically watch database status:

  1. Add Monitor → HTTP.
  2. URL: https://mattermost.example.com/api/v4/system/ping?get_server_status=true.
  3. Check interval: 60 seconds.
  4. Response timeout: 15 seconds.
  5. Expected status: 200.
  6. Keyword: "database_status":"OK".
  7. Label: Mattermost Database.
  8. Click Save.

When this monitor fires while the basic ping is green, the Mattermost process is running but the database connection pool has failed or the database server is unreachable. Users may be able to load cached pages but cannot send messages or access new data.


Step 4: Monitor Web App Availability

The Mattermost web app at the root URL is what users actually access. Monitor it to catch web server or reverse proxy failures that might not be reflected in the API:

  1. Add Monitor → HTTP.
  2. URL: https://mattermost.example.com.
  3. Check interval: 5 minutes.
  4. Response timeout: 15 seconds.
  5. Expected status: 200.
  6. Label: Mattermost Web App.
  7. Click Save.

If this monitor fires while the API ping endpoint is healthy, the web server or reverse proxy (nginx, Apache) has failed — the API may still respond but users cannot reach the application.


Step 5: Monitor SSL Certificates

An expired SSL certificate causes browsers to show a security warning and block access to Mattermost — users cannot log in or receive messages:

  1. Add Monitor → SSL Certificate.
  2. Domain: mattermost.example.com.
  3. Alert when expiry is within: 30 days.
  4. Alert again: 14 days, 7 days, 3 days, 1 day.
  5. Click Save.

If you use Let's Encrypt auto-renewal, SSL monitoring catches cases where the renewal job failed silently — auto-renewal failures are a common cause of unexpected certificate expiry.


Step 6: Configure Alerting

In Vigilmon under Settings → Notifications, configure your alert channels:

| Monitor | Trigger | Action | |---|---|---| | Ping endpoint (/api/v4/system/ping) | Non-200 or keyword missing | Mattermost process down or in error state; check server logs | | Database check | Keyword "database_status":"OK" missing | Database unreachable; check PostgreSQL/MySQL and connection pool | | Web app (root URL) | Non-200 | Web server or reverse proxy failed; check nginx/Apache | | SSL certificate | < 30 days to expiry | Renew certificate; check Let's Encrypt auto-renewal |

Alert after: 1 consecutive failure for the ping endpoint (messaging outages are immediately visible to users). 2 failures for the web app to avoid false positives during restarts or brief deploy windows.


Common Mattermost Failure Modes and What Vigilmon Catches

| Scenario | Vigilmon monitor | |---|---| | Mattermost process crash / OOM | Ping endpoint unreachable; alert within 60 s | | Database server unreachable | Database keyword check fires; ping may still return 200 | | Database connection pool exhausted | Database keyword check fires | | PostgreSQL/MySQL disk full | Database check fires; existing connections fail | | Reverse proxy (nginx) crash | Web app monitor fires; API ping may still respond | | Let's Encrypt renewal failure | SSL monitor alerts at 30-day threshold | | File storage (S3/local) unavailable | Extended ping may show file store unhealthy | | Mattermost config reload error | Ping intermittently fails during reload |


Mattermost's ping endpoint makes it easy to detect process failures, but the database check is the critical signal for the most common production failure mode — a running Mattermost process with a dead database connection. Vigilmon's layered monitoring of the ping endpoint, database connectivity, web app, and SSL certificate gives you complete visibility into Mattermost's health, so your team's communication platform stays available.

Start monitoring Mattermost in under 5 minutes — register free at vigilmon.online.

Monitor your app with Vigilmon

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

Start free →