deploy/monitor.py probes /health, /mcp/rpc initialize, /scan x402 challenge,
and reads USDC.balanceOf(wallet) on Base mainnet via public RPC. Appends one
JSON line per run to data/monitor.jsonl and persists state to detect:
- service_down / ingest_stale / mcp_transport_broken / x402_misconfig
- FIRST_PAYMENT_RECEIVED (when wallet balance crosses 0)
- balance_changed (delta vs previous run)
Installed as aegis402-monitor.{service,timer} on the VPS with hardened
systemd sandbox (NoNewPrivileges, ProtectSystem=strict, ReadWritePaths
limited to data/). Timer active, first run green: cves=500, mcp=ok,
x402 challenge returns 402 with payTo=0x3D1F...4ff6, balance=0 USDC.
19 lines
421 B
Desktop File
19 lines
421 B
Desktop File
[Unit]
|
|
Description=Aegis402 monitoring probe
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=aegis
|
|
Group=aegis
|
|
WorkingDirectory=/home/aegis/aegis402
|
|
EnvironmentFile=/etc/aegis402.env
|
|
ExecStart=/home/aegis/aegis402/venv/bin/python deploy/monitor.py
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
NoNewPrivileges=yes
|
|
PrivateTmp=yes
|
|
ProtectSystem=strict
|
|
ReadWritePaths=/home/aegis/aegis402/data
|
|
ProtectHome=read-only
|