Skip to content

Monitoring & Logs

Health endpoint

GET /api/health

Returns a JSON status:

json
{
  "status": "ok",
  "database": "ok",
  "storage": "ok"
}

Use this endpoint with external monitoring systems (e.g., Uptime Kuma).

Log streams

Clavis writes four log files:

StreamPathContent
audit.log/logs/audit.logSecurity-relevant events (HMAC chain)
app.log/logs/app.logApplication logs
error.log/logs/error.logErrors and exceptions
access.log/logs/access.logHTTP requests

Logs are stored in the Docker volume clavis_logs and are rotated daily.

Retention periods

StreamRetention
Audit logs365 days
App logs90 days
Error logs90 days
Access logs90 days

Log cleanup

The cleanup script removes logs past their retention period:

bash
deployment/scripts/log-cleanup.sh

Recommended as a daily cron job:

bash
# crontab -e
0 4 * * * /path/to/App/deployment/scripts/log-cleanup.sh

External monitoring

Recommendation: Uptime Kuma on a separate server, polling the health endpoint every 60 seconds and sending alert notifications (e.g., Telegram).