Swetrix is down. Your tracking script returns a 502. Every session, every conversion, every funnel step — gone. And because Swetrix is privacy-first and doesn't run third-party tracking pixels, there's no fallback data source. Your analytics gap is total.
Swetrix is an open-source, privacy-focused web analytics platform you can use as a cloud service at swetrix.com or self-host on your own infrastructure. It offers a clean alternative to Google Analytics without cookies, without GDPR concerns, and without proprietary lock-in. But the same openness that makes Swetrix self-hostable also means you're responsible for monitoring it — no external service watches whether your analytics endpoint is reachable.
Vigilmon fills that gap: external HTTP checks from multiple global regions, keyword monitoring, SSL expiry alerts, and instant notifications when your Swetrix stack has a problem.
This tutorial covers monitoring Swetrix with Vigilmon.
What You'll Build
- A Vigilmon HTTP monitor on the Swetrix tracking script
- A Swetrix API/hit endpoint monitor
- A dashboard availability monitor
- Alert channels to your team
Prerequisites
- A Swetrix account (Cloud at swetrix.com) or a self-hosted Swetrix instance
- A free account at vigilmon.online
Step 1: Monitor the Swetrix Tracking Script
Swetrix uses a JavaScript tracking script loaded from its CDN or your self-hosted server. This script is what captures pageviews, custom events, and performance metrics from your visitors. If it's unavailable, analytics collection stops silently.
For Swetrix Cloud, the tracking script is:
https://swetrix.org/swetrix.js
Test it:
curl -I https://swetrix.org/swetrix.js
Expected response:
HTTP/2 200
content-type: application/javascript; charset=utf-8
Set up the Vigilmon monitor:
- Log in to Vigilmon and click New Monitor → HTTP.
- Set URL to
https://swetrix.org/swetrix.js. - Set Check interval to 60 seconds.
- Set Expected status code to
200. - Under Advanced → Keyword check:
- Keyword present:
"swetrix"or"trackViews"
- Keyword present:
- Save.
For self-hosted Swetrix, replace the URL with your own domain's script endpoint.
Step 2: Monitor the Swetrix Event Ingestion API
The Swetrix tracker sends collected events to the Swetrix API. For Swetrix Cloud, this is https://api.swetrix.com/. If the API is down, the script loads but no data is recorded.
Check the API root:
curl -I https://api.swetrix.com/
Set up the monitor:
- Click New Monitor → HTTP in Vigilmon.
- Set URL to
https://api.swetrix.com/. - Set Expected status code to
200. - Under Advanced → Keyword check:
- Keyword absent:
"502","503","Gateway"
- Keyword absent:
- Save.
This confirms the Swetrix event API is live and accepting connections before events are even sent.
Step 3: Monitor the Swetrix Dashboard
Monitor the Swetrix dashboard to detect outages that prevent you from accessing your analytics reports.
Swetrix Cloud:
- Click New Monitor → HTTP in Vigilmon.
- Set URL to
https://swetrix.com/orhttps://app.swetrix.com/. - Set Expected status code to
200. - Under Advanced → Keyword check:
- Keyword present:
"Swetrix"
- Keyword present:
- Set Check interval to 5 minutes.
- Save.
Self-hosted Swetrix:
- Click New Monitor → HTTP in Vigilmon.
- Set URL to your Swetrix instance URL (e.g.,
https://analytics.yourcompany.com/). - Set Expected status code to
200. - Under Advanced → Keyword check:
- Keyword present:
"Swetrix" - Keyword absent:
"502","error"
- Keyword present:
- Save.
Step 4: Self-Hosted Swetrix — Infrastructure Checks
Swetrix's self-hosted deployment uses a Node.js API server backed by ClickHouse for event storage. This gives you additional failure surfaces to monitor.
Monitor ClickHouse Connectivity
Swetrix uses ClickHouse as its analytics database. ClickHouse exposes a built-in HTTP interface on port 8123:
curl http://your-clickhouse-host:8123/ping
Expected response:
Ok.
Add a monitor:
- Click New Monitor → HTTP in Vigilmon.
- Set URL to
http://your-clickhouse-host:8123/ping. - Set Expected status code to
200. - Under Advanced → Keyword check:
- Keyword present:
"Ok"
- Keyword present:
- Save.
If ClickHouse is unreachable, Swetrix will fail to record events even if the API process is running.
Monitor the Swetrix API Process
The Swetrix API server (Node.js) typically runs on port 5005. If it crashes, all event ingestion stops. The API endpoint monitor from Step 2 covers this at the reverse-proxy level — but if you want direct process monitoring, add:
- Click New Monitor → HTTP in Vigilmon.
- Set URL to
http://your-swetrix-host:5005/health(if Swetrix exposes a health endpoint directly) or rely on the proxied URL.
SSL Certificate Monitoring
- Open any of your Swetrix HTTPS monitors in Vigilmon.
- Under SSL, enable Certificate expiry alert.
- Set the threshold to 21 days.
Swetrix Cloud manages TLS on swetrix.com, swetrix.org, and api.swetrix.com. For self-hosted instances, TLS is typically managed by Nginx or Caddy — your SSL monitor in Vigilmon catches certificate expiry regardless.
Step 5: Verify Your Site Loads the Swetrix Snippet
Monitor your own site to confirm it still loads the Swetrix tracking script. A bad deployment, an accidental CSP header change, or a CMS update can remove or block the snippet without any visible error on your site.
- Click New Monitor → HTTP in Vigilmon.
- Set URL to
https://yoursite.com/(a page that always should have analytics). - Set Expected status code to
200. - Under Advanced → Keyword check:
- Keyword present:
"swetrix.org"or"swetrix.js"(or your self-hosted domain)
- Keyword present:
- Save.
Step 6: Alert Channels
Go to Notifications → New Channel in Vigilmon and configure:
- Email — immediate alerts when any Swetrix endpoint goes down
- Webhook — post to Slack, Discord, or PagerDuty
Slack alert example:
🔴 DOWN: swetrix.org/swetrix.js (HTTP 503)
Check: Swetrix Tracking Script
Region: US-West
Duration: 6 minutes
Triggered: 2026-07-03 17:08 UTC
Recovery notification:
✅ RECOVERED: swetrix.org/swetrix.js
Downtime: 11 minutes
Step 7: Status Page
Go to Status Pages → New Status Page in Vigilmon. Add all Swetrix monitors and publish. Share the URL with your data team so they have a single place to check Swetrix health when they spot anomalies in their weekly reports.
What You've Built
| Failure scenario | How Vigilmon catches it |
|---|---|
| Swetrix Cloud outage | Dashboard and script monitors detect non-200 |
| Tracking script CDN down | Script URL monitor fires within 60s |
| Event API unreachable (data loss) | API monitor returns 5xx |
| Self-hosted Swetrix process crash | Dashboard and API monitors both fail |
| ClickHouse unreachable (self-hosted) | /ping monitor returns non-200 |
| TLS certificate expiry (self-hosted) | SSL monitor alerts before expiry |
| Your site lost the Swetrix snippet | Site keyword monitor no longer finds script tag |
| Reverse proxy misconfiguration | Dashboard URL returns 502 |
Swetrix's open-source ethos means transparency and control over your analytics data. Vigilmon adds the last piece: external, continuous monitoring that confirms your analytics stack is actually working — not just the last time you looked at a dashboard.
Start monitoring your Swetrix integration today — register free at vigilmon.online.