Microbin is a lightweight self-hosted paste service and URL shortener written in Rust, running on port 8080. It stores pastes on disk with configurable expiration, provides syntax highlighting for code pastes, and serves instant redirects for shortened URLs. Because it's intentionally minimal — no external database, no cloud dependency — it's also resilient to the kinds of failures that plague complex stacks. But "resilient" isn't "invincible": a full disk, a process crash, or a storage permission issue can silently break every shortened URL you've ever shared. Vigilmon watches Microbin continuously so you catch those failures before your links go dead.
What You'll Set Up
- Web server uptime monitor (port 8080)
- Paste creation API health check
- URL shortener redirect service probe
- Paste expiration cleanup job heartbeat
- Syntax highlighting service verification
- Storage backend availability check
Prerequisites
- Microbin running and accessible on port 8080
- A free Vigilmon account
Step 1: Monitor Microbin Web Server Uptime
The root endpoint confirms the Rust web server (Actix-web) is running and serving the Microbin UI:
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your Microbin URL:
http://YOUR_SERVER_IP:8080. - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Click Save.
If Microbin is behind a reverse proxy, monitor the proxied domain. Enable Monitor SSL certificate with a 21 day expiry alert if you're serving HTTPS — a Microbin instance with an expired cert silently breaks all HTTPS links shared from it.
Microbin starts in under a second thanks to Rust's compiled binary with no JVM or interpreter warmup. If this monitor reports down, the process has crashed or the host system is having issues — there's no "still starting" grace period to account for.
Step 2: Monitor the Paste Creation API
Paste creation is Microbin's core function. A healthy POST to the paste endpoint confirms the web server is processing requests and writing to the storage backend:
- Click Add Monitor → HTTP / HTTPS.
- Set Method to
POST. - Enter:
http://YOUR_SERVER_IP:8080/api/save. - Set Content-Type header to
application/x-www-form-urlencoded. - Set Request body to
content=vigilmon-health-check&expiration=never&privacy=public. - Set Expected HTTP status to
200or302(Microbin redirects to the created paste after successful creation). - Set Check interval to
5 minutes. - Click Save.
Note: This will create a real paste in your Microbin instance each time it runs. Set the expiration to a short value (e.g.,
1hour) to avoid accumulating test pastes. Alternatively, use the response body check to confirm you receive the paste view page markup.
A failure here with the root URL still returning 200 indicates a storage write failure — check disk space and permissions on the Microbin data directory:
# Check available disk space
df -h /path/to/microbin/data
# Check directory permissions
ls -la /path/to/microbin/data
Step 3: Monitor the URL Shortener Redirect Service
Every shortened URL Microbin serves is a redirect from a short code to the destination. If Microbin goes down, every one of those links breaks immediately — and there's no CDN or cached redirect layer to absorb the failure.
Create a permanent test redirect in your Microbin instance (set expiration to never), then monitor it:
- Create a test URL shortener entry in Microbin pointing to
https://vigilmon.online. - Note the short code from the resulting URL (e.g.,
http://YOUR_SERVER_IP:8080/SHORTCODE). - Click Add Monitor → HTTP / HTTPS.
- Enter:
http://YOUR_SERVER_IP:8080/SHORTCODE. - Set Expected HTTP status to
301or302. - Under Follow redirects, leave disabled — you want to confirm Microbin is serving the redirect, not that the destination is up.
- Set Check interval to
2 minutes. - Click Save.
This probe verifies that the paste storage is readable (Microbin looks up the redirect target from disk on every request) and the HTTP server is correctly handling the redirect response. A 404 means the short code is missing from storage; a 500 means a read error on the storage backend.
Step 4: Monitor Syntax Highlighting Service
When users view code pastes, Microbin applies syntax highlighting using its built-in highlighting engine. A paste with a known code type can verify this rendering path is working:
- Create a test code paste in Microbin with a specific language (e.g.,
rust) and set expiration tonever. Note the paste URL. - Click Add Monitor → HTTP / HTTPS.
- Enter the paste view URL:
http://YOUR_SERVER_IP:8080/YOUR_PASTE_ID. - Set Expected HTTP status to
200. - Under Response body contains, enter
highlightorlanguage-to confirm syntax highlighting markup is present in the rendered output. - Set Check interval to
10 minutes. - Click Save.
Step 5: Heartbeat for Paste Expiration Cleanup
Microbin removes expired pastes on a background schedule. If the cleanup job stalls, your storage fills up with expired content until disk pressure causes the service to fail. Monitor cleanup job health with a Vigilmon heartbeat:
Add a cron job on your host that checks for the expiration cleanup signal and pings Vigilmon:
#!/bin/bash
# Check that Microbin's data directory hasn't grown unexpectedly large
DATA_DIR="/path/to/microbin/data"
PASTE_COUNT=$(find "$DATA_DIR" -name "*.json" | wc -l)
# Alert if paste count exceeds expected maximum (adjust threshold for your usage)
if [ "$PASTE_COUNT" -lt 10000 ]; then
curl -s https://vigilmon.online/heartbeat/YOUR_HEARTBEAT_ID
fi
Set up the heartbeat in Vigilmon:
- Click Add Monitor → Cron Heartbeat.
- Set the expected ping interval to
1440minutes (24 hours) to match a daily cleanup check. - Copy the heartbeat URL and paste it into your script.
- Add the script to cron:
0 3 * * * /usr/local/bin/check-microbin-cleanup.sh. - Click Save.
Alternatively, if you run Microbin in Docker, monitor the container restart count as a proxy for crash-loop failures:
# Add to cron — alert if Microbin has restarted more than 3 times today
RESTART_COUNT=$(docker inspect microbin --format '{{.RestartCount}}')
if [ "$RESTART_COUNT" -lt 3 ]; then
curl -s https://vigilmon.online/heartbeat/YOUR_HEARTBEAT_ID
fi
Step 6: Monitor Storage Backend Availability
Microbin stores all pastes as files in a data directory. A simple TCP check on the host confirms the server is reachable at the network level, giving you a second-opinion monitor independent of the application:
- Click Add Monitor → TCP Port.
- Enter your server's hostname or IP.
- Set Port to
8080. - Set Check interval to
1 minute. - Click Save.
For a disk-level storage check, add a script that writes and reads a test file, pinging Vigilmon only when both succeed:
#!/bin/bash
TEST_FILE="/path/to/microbin/data/.vigilmon-health"
# Verify write and read on the data directory
echo "ok" > "$TEST_FILE" && cat "$TEST_FILE" > /dev/null
if [ $? -eq 0 ]; then
rm -f "$TEST_FILE"
curl -s https://vigilmon.online/heartbeat/YOUR_STORAGE_HEARTBEAT_ID
fi
Run this script every 15 minutes via cron. A storage heartbeat failure before the web server monitor fires gives you an early warning that disk issues are developing.
Step 7: Configure Alerts
Microbin is often used to share links publicly — a down instance means immediate broken links for anyone who clicks them:
- Go to Alert Channels in Vigilmon and add email and Slack (or a webhook to your preferred notification tool).
- Set Consecutive failures before alert to
1for the web server and redirect monitors — Microbin restarts instantly; two consecutive failures in two minutes means something is genuinely wrong. - For the paste creation API monitor, set to
2to tolerate a momentary storage hiccup. - Use Maintenance windows during updates:
# Open a maintenance window before updating the Microbin binary
curl -X POST https://vigilmon.online/api/maintenance \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"monitor_id": "YOUR_MONITOR_ID", "duration_minutes": 5}'
# Stop, update, and restart
docker compose pull microbin && docker compose up -d microbin
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Web server | http://HOST:8080 | Rust process crash, port unavailable |
| Paste API | POST /api/save | Storage write failure, disk full |
| URL redirect | GET /SHORTCODE | Storage read failure, missing paste |
| Syntax highlight | Paste view page | Rendering engine failure |
| Cleanup heartbeat | Heartbeat URL | Expiration cleanup job stalled |
| TCP port | :8080 | Host network / firewall issue |
| Storage heartbeat | Heartbeat URL | Disk I/O or permission issue |
Microbin's Rust foundation makes it one of the most stable self-hosted services you can run — a single binary with no runtime dependencies and no database to manage. But every link you share from it is only as reliable as your server. With Vigilmon watching the web server, redirect service, and storage backend, you'll know within a minute when your paste service needs attention, not after someone reports a broken link.