Rustypaste is a no-frills, self-hosted paste service written in Rust — fast, lightweight, and designed to run as a single binary with file-based storage. It handles text pastes, file uploads, burn-after-reading links, and paste expiration, all on port 8000 by default. When the upload endpoint silently returns errors, storage fills up, or expired-paste cleanup stops running, your users get broken links with no built-in alert. Vigilmon provides the uptime monitoring layer Rustypaste doesn't ship with, so you know the moment your paste service needs attention.
What You'll Set Up
- Web service availability monitor (port 8000)
- Paste creation API health check
- File upload endpoint availability probe
- Burn-after-reading (one-shot) service health check
- Paste expiration cleanup job heartbeat
- Storage backend (local/S3) connectivity probe
Prerequisites
- Rustypaste running and accessible on port 8000
- A free Vigilmon account
Step 1: Monitor the Rustypaste Web Service
The root endpoint confirms the Rust binary is alive and accepting connections:
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your Rustypaste URL:
http://YOUR_SERVER_IP:8000. - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Click Save.
If Rustypaste is behind a reverse proxy (nginx, Caddy, Traefik), monitor the proxied URL. The root path returns a minimal HTML or redirect response — a 200 here confirms the binary is running and the TCP listener is up.
Step 2: Monitor the Paste Creation API
The primary function of Rustypaste is accepting content submissions. Test the paste endpoint directly to confirm uploads are being processed:
- Click Add Monitor → HTTP / HTTPS.
- Enter the health-check URL:
http://YOUR_SERVER_IP:8000/health(or your configured health path). - Set Expected HTTP status to
200. - Set Check interval to
2 minutes. - Click Save.
If Rustypaste does not expose a dedicated /health endpoint in your version, probe the version endpoint instead:
- Click Add Monitor → HTTP / HTTPS.
- Enter:
http://YOUR_SERVER_IP:8000/version. - Set Expected HTTP status to
200. - Under Response body contains, enter
rustypasteto confirm a valid version string is returned. - Set Check interval to
2 minutes. - Click Save.
A failure here means the paste API is unreachable even though the port may still accept TCP connections.
Step 3: Monitor the File Upload Endpoint
Rustypaste handles file uploads via a multipart/form-data POST to the root path. Validate this pathway is reachable with a lightweight probe:
- Click Add Monitor → HTTP / HTTPS.
- Enter:
http://YOUR_SERVER_IP:8000. - Set Method to
POST. - Set Expected HTTP status to
200or400— a 400 from a malformed empty POST confirms the upload handler is active and parsing requests; a 405 would indicate the route is misconfigured. - Set Check interval to
5 minutes. - Click Save.
Tip: If your Rustypaste instance requires an authentication token, add the
Authorization: Bearer YOUR_AUTH_TOKENheader under Custom Headers so the probe is not rejected by auth middleware before reaching the upload handler.
Step 4: Monitor One-Shot (Burn After Reading) Service Health
Rustypaste supports one-shot pastes that delete themselves after the first view. These rely on filesystem operations completing atomically. Probe the one-shot upload path to confirm this feature is operational:
- Use a cron heartbeat to periodically create a test one-shot paste and verify it returns a valid URL:
#!/bin/bash
# Create a test one-shot paste
RESPONSE=$(curl -s -X POST http://YOUR_SERVER_IP:8000 \
-F "oneshot=test-oneshot-probe" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN")
# A valid response contains a URL pointing to the stored paste
if echo "$RESPONSE" | grep -q "http"; then
curl -s https://vigilmon.online/heartbeat/YOUR_ONESHOT_HEARTBEAT_ID
fi
- In Vigilmon, click Add Monitor → Cron Heartbeat.
- Set expected ping interval to
30 minutes. - Copy the heartbeat URL into the script above.
- Click Save.
If one-shot paste creation fails (storage full, permissions error, filesystem corruption), Vigilmon alerts after the expected interval without a ping.
Step 5: Heartbeat for Paste Expiration Cleanup
Rustypaste runs a background job that deletes expired pastes based on the expire_files setting in your config. This job produces no HTTP output when it runs. Use a Vigilmon cron heartbeat to detect when cleanup stops:
Add a systemd timer or cron job that checks for Rustypaste's cleanup activity and pings Vigilmon on success:
#!/bin/bash
# Verify Rustypaste process is alive and responsive
HEALTH=$(curl -s -o /dev/null -w "%{http_code}" \
--max-time 5 http://YOUR_SERVER_IP:8000/version)
if [ "$HEALTH" -eq 200 ]; then
# Service is up; treat as cleanup job still running
curl -s https://vigilmon.online/heartbeat/YOUR_CLEANUP_HEARTBEAT_ID
fi
Set up in Vigilmon:
- Click Add Monitor → Cron Heartbeat.
- Set the expected ping interval to match your cleanup schedule (e.g.,
60minutes). - Copy the heartbeat URL and paste it into the script.
- Add the script to crontab:
0 * * * * /usr/local/bin/check-rustypaste.sh - Click Save.
Step 6: Monitor Storage Backend Connectivity
Rustypaste stores pastes on the local filesystem or in an S3-compatible bucket. A full disk or lost S3 credentials cause upload failures without crashing the service. Detect storage problems early:
For local filesystem storage, monitor disk usage:
#!/bin/bash
# Check paste storage directory is writable and not critically full
USAGE=$(df /path/to/rustypaste/upload | awk 'NR==2 {print $5}' | tr -d '%')
if [ "$USAGE" -lt 90 ]; then
curl -s https://vigilmon.online/heartbeat/YOUR_STORAGE_HEARTBEAT_ID
fi
For S3-compatible storage, create a test object periodically:
#!/bin/bash
# Test S3 write access
aws s3 cp /dev/stdin s3://YOUR_BUCKET/probe-$(date +%s).txt \
--content-type text/plain <<< "vigilmon-probe" \
--quiet 2>/dev/null
if [ $? -eq 0 ]; then
curl -s https://vigilmon.online/heartbeat/YOUR_S3_HEARTBEAT_ID
fi
Add a Cron Heartbeat monitor in Vigilmon with a 15-minute interval for each storage probe.
Step 7: Configure Alerts and Maintenance Windows
- Go to Alert Channels in Vigilmon and add email, Slack, or a webhook endpoint.
- For the main service and upload API monitors, set Consecutive failures before alert to
2to avoid false alerts from brief Rust GC pauses. - For storage monitors, set to
1for immediate notification — a full disk causes immediate upload failures. - Use Maintenance windows when updating Rustypaste to suppress alerts during the restart:
# Open a 5-minute maintenance window before updating
curl -X POST https://vigilmon.online/api/maintenance \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"monitor_id": "YOUR_MONITOR_ID", "duration_minutes": 5}'
# Pull the latest Rustypaste binary and restart
systemctl restart rustypaste
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Web service | http://HOST:8000 | Binary crash, TCP listener down |
| Version/health API | /version or /health | Paste API unreachable |
| Upload endpoint | POST / | Upload handler misconfigured or failing |
| One-shot heartbeat | Heartbeat URL | Burn-after-reading writes failing |
| Cleanup heartbeat | Heartbeat URL | Expiration job not running |
| Storage probe | Filesystem / S3 | Disk full or S3 credentials lost |
Rustypaste's simplicity is its strength — but that same minimalism means no built-in health dashboard, no alert system, and no visibility into storage problems until users start reporting broken paste links. With Vigilmon watching every critical path from upload acceptance to storage health, you catch failures before they reach your users.