AnonUpload is a self-hosted anonymous file sharing platform — users drop a file, get a link, no account required. The simplicity is the point, but that same simplicity means there's no built-in dashboard to tell you when the upload endpoint is broken, disk space is exhausted, or the expiry job stopped cleaning up old files. Vigilmon gives you the external monitoring layer to catch these problems before your users walk into a dead upload page.
What You'll Set Up
- HTTP uptime monitor for the upload frontend
- Upload endpoint health check
- File expiry and cleanup job heartbeat
- Disk usage threshold alerting
- Download link availability monitoring
- SSL/TLS certificate expiry alerts
- Database connectivity check (SQLite or MySQL)
Prerequisites
- AnonUpload running on a VPS (PHP or Go implementation, port 80/443)
- Shell access to the server
- A free Vigilmon account
Step 1: Monitor Web Server Availability
The root upload page is the primary availability signal. Add an HTTP monitor in Vigilmon:
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your instance URL:
https://upload.yourdomain.com - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Enable Monitor SSL certificate and set the expiry alert threshold to
21 days. - Click Save.
Add a keyword check to confirm the upload form renders correctly:
- Under Keyword check, enter
<inputor the specific file input element text your implementation uses.
This catches cases where the server returns 200 but the application crashed and is serving an error page instead of the upload form.
Step 2: Add a Composite Health Check Endpoint
Create a health check script that tests the components AnonUpload depends on. For PHP-based implementations, add /var/www/anonupload/health.php:
<?php
header('Content-Type: application/json');
$checks = [];
$status = 200;
// Check upload directory is writable
$upload_dir = __DIR__ . '/uploads';
$checks['upload_dir'] = (is_dir($upload_dir) && is_writable($upload_dir)) ? 'ok' : 'error';
// Check disk space — alert if less than 10% free
$total = disk_total_space($upload_dir);
$free = disk_free_space($upload_dir);
$free_pct = ($total > 0) ? ($free / $total * 100) : 0;
$checks['disk_space'] = ($free_pct > 10) ? 'ok' : 'warn';
// Check database connectivity (adjust for your DB type)
if (file_exists(__DIR__ . '/data/anonupload.db')) {
// SQLite
try {
$db = new PDO('sqlite:' . __DIR__ . '/data/anonupload.db');
$db->query('SELECT 1');
$checks['database'] = 'ok';
} catch (Exception $e) {
$checks['database'] = 'error';
$status = 503;
}
} else {
// MySQL fallback
try {
$pdo = new PDO('mysql:host=127.0.0.1;dbname=anonupload', DB_USER, DB_PASS, [PDO::ATTR_TIMEOUT => 2]);
$pdo->query('SELECT 1');
$checks['database'] = 'ok';
} catch (Exception $e) {
$checks['database'] = 'error';
$status = 503;
}
}
if ($checks['upload_dir'] === 'error') {
$status = 503;
}
http_response_code($status);
echo json_encode([
'status' => $status === 200 ? 'ok' : 'degraded',
'disk_free' => round($free_pct, 1) . '%',
'checks' => $checks,
]);
For Go-based implementations, add a /health HTTP handler that checks disk space and the upload directory:
http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
var stat syscall.Statfs_t
if err := syscall.Statfs(uploadDir, &stat); err != nil {
http.Error(w, `{"status":"error","checks":{"disk":"error"}}`, 503)
return
}
freePct := float64(stat.Bavail) / float64(stat.Blocks) * 100
if freePct < 10 {
w.WriteHeader(503)
}
fmt.Fprintf(w, `{"status":"ok","disk_free":"%.1f%%"}`, freePct)
})
Add a second Vigilmon HTTP monitor pointed at https://upload.yourdomain.com/health with a 1 minute interval.
Step 3: Monitor the Upload Endpoint Directly
A broken upload endpoint is the most critical failure for AnonUpload — the server may be up but the POST handler could be broken. Test it with a lightweight synthetic probe.
Create a script on your server that performs a test upload and reports success:
#!/bin/bash
# /usr/local/bin/anonupload-probe.sh
set -e
UPLOAD_URL="https://upload.yourdomain.com/upload"
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_UPLOAD_TOKEN"
# Create a small test file
TMPFILE=$(mktemp)
echo "vigilmon probe $(date)" > "$TMPFILE"
# Attempt upload (adjust field name to match your implementation)
RESPONSE=$(curl -fsS -X POST "$UPLOAD_URL" \
-F "file=@$TMPFILE;filename=probe.txt" \
-w "%{http_code}" -o /dev/null)
rm -f "$TMPFILE"
if [ "$RESPONSE" = "200" ] || [ "$RESPONSE" = "302" ]; then
curl -fsS "$HEARTBEAT_URL" > /dev/null
else
echo "Upload probe failed with HTTP $RESPONSE" >&2
exit 1
fi
chmod +x /usr/local/bin/anonupload-probe.sh
Add a cron job to run it every 5 minutes:
*/5 * * * * /usr/local/bin/anonupload-probe.sh
Create a Vigilmon Cron Heartbeat monitor with a 10 minute expected interval. If the upload endpoint stops accepting files, the probe fails and Vigilmon alerts after one missed ping.
Step 4: Heartbeat for the File Expiry Job
AnonUpload automatically deletes files after their TTL expires. If the expiry job stops running, storage fills up and the service eventually refuses new uploads. This failure is silent — the web UI stays up while the disk fills.
Wrap the expiry job in a heartbeat. For PHP implementations that use a cron-driven cleanup script:
#!/bin/bash
# /etc/cron.hourly/anonupload-cleanup
set -e
cd /var/www/anonupload
# Run the expiry/cleanup script (adjust to your implementation's command)
php cleanup.php >> /var/log/anonupload/cleanup.log 2>&1
# Ping Vigilmon on success
curl -fsS --retry 3 "https://vigilmon.online/heartbeat/YOUR_CLEANUP_TOKEN" > /dev/null
chmod +x /etc/cron.hourly/anonupload-cleanup
Create a Vigilmon Cron Heartbeat monitor with a 2 hour expected interval. A missed cleanup cycle will alert within two hours, giving you time to investigate before disk usage becomes critical.
Step 5: Disk Usage Threshold Alert
File hosting services are uniquely vulnerable to disk exhaustion. Add a disk usage monitor that runs independently of the application:
#!/bin/bash
# /usr/local/bin/anonupload-disk-check.sh
UPLOAD_DIR="/var/www/anonupload/uploads"
HEARTBEAT_URL="https://vigilmon.online/heartbeat/YOUR_DISK_TOKEN"
THRESHOLD=85 # alert if usage exceeds 85%
USED=$(df "$UPLOAD_DIR" | awk 'NR==2 {print $5}' | tr -d '%')
if [ "$USED" -lt "$THRESHOLD" ]; then
curl -fsS "$HEARTBEAT_URL" > /dev/null
else
echo "Disk usage at ${USED}% — above ${THRESHOLD}% threshold" >&2
exit 1
fi
chmod +x /usr/local/bin/anonupload-disk-check.sh
# Run every 15 minutes
*/15 * * * * /usr/local/bin/anonupload-disk-check.sh
Create a Vigilmon Cron Heartbeat with a 30 minute expected interval. When disk usage crosses 85%, the script exits without pinging, and Vigilmon alerts within 30 minutes.
Step 6: Monitor Download Link Availability
A generated download link must remain accessible until the file's TTL expires. Add a synthetic check that verifies an existing known-good link resolves correctly.
After a successful test upload in Step 3, capture the generated download URL and store it. Create a daily monitor that verifies it returns the correct content:
- In Vigilmon, click Add Monitor → HTTP / HTTPS.
- Enter a known-good download URL:
https://upload.yourdomain.com/d/KNOWN_FILE_ID - Set Expected HTTP status to
200. - Set Check interval to
5 minutes.
When you rotate your test file, update the monitor URL. This check catches broken download handlers even when uploads are working.
Step 7: Configure Alert Channels
- Go to Alert Channels in Vigilmon and add your email or Slack webhook.
- On the main web monitor and upload endpoint heartbeat, set Consecutive failures before alert to
2. - On the disk usage heartbeat, set Consecutive failures before alert to
1— disk problems need immediate attention.
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Web availability | https://upload.yourdomain.com | Web server down, app crash |
| Health endpoint | /health or /health.php | Upload dir unwritable, DB down |
| Upload probe heartbeat | Vigilmon heartbeat URL | Upload handler broken |
| Expiry job heartbeat | Vigilmon heartbeat URL | File cleanup stopped, disk filling |
| Disk threshold heartbeat | Vigilmon heartbeat URL | Disk usage above 85% |
| Download link | Known-good download URL | Download handler broken |
| SSL certificate | Main domain | TLS certificate expired |
AnonUpload's value is in its reliability — users need to trust that their link will work and that old files disappear on schedule. With Vigilmon watching every layer, you catch failures before they turn into user-facing breakage or a full disk at 3 AM.
Get started free at vigilmon.online.