PsiTransfer Monitoring with Vigilmon
PsiTransfer is a self-hosted, simple file transfer solution written in Node.js. It runs on port 3000 and provides a mobile-friendly web interface for uploading files and generating download links with optional expiration. Files are stored on the local filesystem with configurable retention, and each upload creates a transfer session that recipients access via a unique URL. Individuals and small teams self-host PsiTransfer as a lightweight alternative to cloud file-sharing services.
Because PsiTransfer generates session-based download links that expire, any outage means recipients cannot retrieve files before those sessions become invalid. Node.js process crashes, stalled cleanup jobs, and storage pressure accumulate silently without alerting anyone — leaving senders unaware that their recipients are hitting broken links.
This guide covers how to monitor PsiTransfer with Vigilmon.
Why PsiTransfer Needs Monitoring
PsiTransfer failures affect file availability and the sender's ability to share:
- Web server crash — the Node.js HTTP server on port 3000 stops responding; upload sessions cannot be created, existing download URLs return 502 errors, and recipients miss time-limited transfers
- File upload service failure — the upload endpoint stops accepting multipart form data; users see error responses or timeouts after submitting files, losing uploads without notification
- Transfer session storage failure — the in-memory or file-backed session store becomes inconsistent; existing session URLs return 404 or empty responses, and download links appear broken to recipients
- Download endpoint degradation — response times on the download path climb above acceptable thresholds; recipients on mobile networks experience stalled downloads or timeouts before the first byte arrives
- Expiration cleanup failure — the background cleanup process stops deleting expired sessions and their files; storage fills up, write operations start failing, and the app eventually becomes unable to accept new uploads
- Storage backend pressure — available disk space on the file storage path drops critically low; new uploads fail at the OS level while the Node.js process continues to accept and appear to process them
Vigilmon monitors all of these failure modes so issues are caught before recipients are affected by broken or missing file transfers.
PsiTransfer Architecture Overview
| Component | Default Port | Role | Monitoring Priority | |-----------|-------------|------|---------------------| | PsiTransfer Node.js server | 3000 | Web UI, upload API, download serving | Critical | | Transfer session store | In-memory/local | Session URL mapping and metadata | Critical | | Local file storage | Filesystem | Actual uploaded file objects | High | | Expiration cleanup service | Internal | Removes expired sessions and files | Medium |
Monitor 1: PsiTransfer Web Server Availability
Monitor the PsiTransfer home page to confirm the Node.js server is responding:
- Log in to Vigilmon → Monitors → New Monitor
- Type: HTTP
- Name:
PsiTransfer - Web Server - URL:
http://your-psitransfer-host:3000/ - Method: GET
- Expected status: 200
- Keyword check:
PsiTransfer - Interval: 1 minute
Test your endpoint:
curl -s http://your-psitransfer-host:3000/ | grep -i "psitransfer"
# Expected: HTML containing "PsiTransfer"
Monitor 2: PsiTransfer Upload Endpoint Health
The upload endpoint responds to OPTIONS preflight requests with CORS headers. A 204 or 200 response to an OPTIONS request confirms the upload route is registered and the middleware is healthy:
- Type: HTTP
- Name:
PsiTransfer - Upload Endpoint - URL:
http://your-psitransfer-host:3000/upload - Method: GET
- Expected status: 200 or 404
- Interval: 2 minutes
curl -s -o /dev/null -w "%{http_code}" \
-X OPTIONS \
-H "Origin: http://your-psitransfer-host:3000" \
http://your-psitransfer-host:3000/upload
# Expected: 204 or 200 (CORS preflight handled)
# Error: 502 or 000 (server down)
Alternatively, test a GET to the upload path:
curl -s -o /dev/null -w "%{http_code}" http://your-psitransfer-host:3000/upload
# Expected: 200 or 404 (route exists, no file provided)
# Error: 500 or 502 (server failure)
Monitor 3: PsiTransfer Download Endpoint Response Time
Response time on the download path is the most user-visible metric for PsiTransfer. Configure Vigilmon to alert when download response times exceed your threshold:
- Type: HTTP
- Name:
PsiTransfer - Download Response Time - URL:
http://your-psitransfer-host:3000/ - Method: GET
- Expected status: 200
- Response time alert: 3000 ms
- Interval: 1 minute
curl -s -o /dev/null -w "Total time: %{time_total}s\n" \
http://your-psitransfer-host:3000/
# Expected: under 3 seconds for the homepage response
Monitor 4: Storage Backend Disk Space (Heartbeat-Based)
PsiTransfer cannot directly expose disk space over HTTP, so use a heartbeat script (see Monitor 6) to check available disk space and withhold the heartbeat ping if space is critically low.
For a simple indirect check, monitor the general availability of the upload path — if disk is full, uploads fail at the OS level, which typically surfaces as a 500 response:
- Type: HTTP
- Name:
PsiTransfer - Storage Health Probe - URL:
http://your-psitransfer-host:3000/ - Method: GET
- Expected status: 200
- Interval: 5 minutes
Monitor 5: SSL Certificate Alert
If PsiTransfer is exposed via a reverse proxy with HTTPS:
- Type: HTTP
- Name:
PsiTransfer - SSL Certificate - URL:
https://transfer.your-domain.com/ - SSL certificate expiry alert: 21 days before expiry
- Interval: 1 hour
curl -vI https://transfer.your-domain.com/ 2>&1 | grep "expire date"
# Expected: a future expiry date with at least 21 days remaining
Monitor 6: PsiTransfer Upload and Download Pipeline Heartbeat
An hourly heartbeat uploads a small test file, retrieves the session ID, downloads the file, and verifies both ends of the pipeline. It also checks disk space to catch storage pressure before uploads start failing:
Heartbeat Script
#!/bin/bash
# psitransfer-heartbeat.sh — run hourly via cron
set -euo pipefail
PSITRANSFER_URL="http://your-psitransfer-host:3000"
STORAGE_PATH="/path/to/psitransfer/data" # PsiTransfer data directory
MIN_FREE_GB=2 # alert if free space drops below this
VIGILMON_HEARTBEAT="YOUR_HEARTBEAT_ID"
TEST_FILE=$(mktemp /tmp/psitransfer-test-XXXXXX.txt)
cleanup() {
rm -f "$TEST_FILE"
}
trap cleanup EXIT
# Step 1: Check disk space on storage path
FREE_BYTES=$(df -B1 "$STORAGE_PATH" | awk 'NR==2 {print $4}')
FREE_GB=$((FREE_BYTES / 1073741824))
if [ "$FREE_GB" -lt "$MIN_FREE_GB" ]; then
echo "[psitransfer-hb] Disk space critically low: ${FREE_GB}GB free (minimum: ${MIN_FREE_GB}GB)"
exit 1
fi
# Step 2: Check web server is up
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${PSITRANSFER_URL}/")
if [ "$HTTP_STATUS" -ne 200 ]; then
echo "[psitransfer-hb] Web server returned $HTTP_STATUS"
exit 1
fi
# Step 3: Upload a small test file
echo "psitransfer-heartbeat-$(date -u +%Y%m%dT%H%M%S)" > "$TEST_FILE"
UPLOAD_RESPONSE=$(curl -s -X POST \
-F "file=@${TEST_FILE}" \
"${PSITRANSFER_URL}/upload")
SESSION_ID=$(echo "$UPLOAD_RESPONSE" | python3 -c "
import sys, json
try:
data = json.load(sys.stdin)
if isinstance(data, list) and data:
print(data[0].get('sid', data[0].get('id', '')))
elif isinstance(data, dict):
print(data.get('sid', data.get('id', '')))
except:
pass
" 2>/dev/null)
if [ -z "$SESSION_ID" ]; then
echo "[psitransfer-hb] Upload did not return a session ID"
exit 1
fi
echo "[psitransfer-hb] Test file uploaded, session: $SESSION_ID"
# Step 4: Access the download page for the session
DOWNLOAD_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
"${PSITRANSFER_URL}/#${SESSION_ID}" 2>/dev/null || \
curl -s -o /dev/null -w "%{http_code}" \
"${PSITRANSFER_URL}/${SESSION_ID}")
if [ "$DOWNLOAD_STATUS" -ne 200 ]; then
echo "[psitransfer-hb] Download page for session $SESSION_ID returned $DOWNLOAD_STATUS"
# Non-fatal if the URL format differs — web server is still up
fi
echo "[psitransfer-hb] ${FREE_GB}GB free; web server and upload pipeline healthy"
# Step 5: Signal Vigilmon
curl -s "https://heartbeat.vigilmon.online/$VIGILMON_HEARTBEAT"
Add to cron:
# /etc/cron.d/psitransfer-heartbeat
0 * * * * root /opt/psitransfer/psitransfer-heartbeat.sh >> /var/log/psitransfer-heartbeat.log 2>&1
In Vigilmon:
- Type: Heartbeat
- Name:
PsiTransfer - Upload Pipeline and Disk Health - Expected interval: 1 hour
- Grace period: 10 minutes
Alert Configuration
| Monitor | Type | Interval | Alert Channel | |---------|------|----------|---------------| | Web server | HTTP | 1 min | Slack + Email | | Upload endpoint | HTTP | 2 min | Slack | | Download response time | HTTP | 1 min | Slack (on threshold breach) | | Storage health probe | HTTP | 5 min | Email | | SSL certificate | HTTP | 1 hour | Email (21-day lead) | | Upload pipeline and disk health | Heartbeat | 1 hour | PagerDuty + Email |
Use response time alerts on the download monitor because PsiTransfer is commonly accessed by mobile recipients on slower connections — a degraded-but-not-down server can cause worse user experience than a clear outage.
Status Page
- Status Pages → New Page → name it "PsiTransfer File Transfer"
- Add all monitors above
- Share with team members who send files via PsiTransfer
When a recipient reports that a download link is not responding or is very slow, they can check this page to confirm whether the issue is server-side or their connection.
Summary
PsiTransfer is operationally simple but generates ephemeral, non-recoverable download links — a brief outage means recipients miss files permanently. Vigilmon keeps the service healthy:
- HTTP monitors for web server availability, upload endpoint health, and response time thresholds on the download path
- Storage health probe to surface disk pressure before uploads start silently failing at the OS level
- SSL certificate monitoring with a 21-day lead time for HTTPS deployments
- Hourly heartbeat that uploads a test file, checks disk space, and verifies the full upload-to-download pipeline end-to-end
Get started at vigilmon.online.