DataVault Deployment/Operations

Monitoring

Monitor DataVault health and performance

Health Check

DataVault provides a simple health endpoint:

# Check if DataVault is running
curl http://localhost:8080/health
# Response: {"status":"healthy"}

# Check Weaviate database
curl http://localhost:8001/v1/.well-known/ready
# Response: {"status":"healthy"}

Basic Monitoring

Daily Health Check

daily-check.sh
#!/bin/bash
echo "=== DataVault Status - $(date) ==="

# Service status
docker compose ps

# Resource usage
docker stats --no-stream vault weaviate

# API health
if curl -s http://localhost:8080/health | grep -q "healthy"; then
    echo "✅ DataVault: Healthy"
else
    echo "❌ DataVault: Down"
fi

# Recent errors
docker compose logs --since 24h | grep -i error | tail -3

Built-in Monitoring

DataVault has optional built-in monitoring controlled by these config settings:

Monitoring Configuration
logging:
  # Heartbeat for uptime monitoring (requires external service)
  heartbeat_url: $HEARTBEAT_URL          # Optional: Better Stack, etc.
  heartbeat_interval_minutes: 1
  
  # System monitoring (0 to disable)
  system_monitoring_interval: 60         # CPU/memory stats
  storage_monitoring_interval: 300       # Disk usage
  database_monitoring_interval: 60       # Weaviate stats

System Monitoring API

If enabled, you can query system stats:

# Get system usage (requires authentication)
curl -H "Authorization: Bearer $VAULT_SECRET" \
  http://localhost:8080/health/system

# Get rate limit status  
curl -H "Authorization: Bearer $VAULT_SECRET" \
  http://localhost:8080/health/ratelimit

Log Monitoring

Check Logs

# Recent errors
docker compose logs | grep -i error | tail -10

# Ingestion issues
docker compose logs vault | grep -i "ingestion\|processing"

# Database connectivity
docker compose logs vault | grep -i "weaviate\|database"

# Piko tunnel status
docker compose logs piko

Log Files

If configured with log_to_file: true:

# Application logs
tail -f logs/app.log

# Web server logs  
tail -f logs/uvicorn.log

Performance Monitoring

Key Metrics

# Document count
curl -s http://localhost:8001/v1/meta | jq

# Processing performance
docker compose logs vault | grep -i "ingestion.*finished"

# Resource usage trends
docker stats --no-stream

Ingestion Status

Monitor document processing:

# Check current ingestion status
docker compose logs vault | grep -i "started\|finished" | tail -5

# Document processing time
docker compose logs vault | grep -i "total ingestion time"

Troubleshooting

Service Issues

# Restart services
docker compose restart

# Check service health
docker compose ps
curl http://localhost:8080/health

# View recent logs
docker compose logs --tail 50 vault

Connection Issues

# Test Piko tunnel
docker compose logs piko | tail -10

# Check external connectivity
curl -I https://piko.deploy.selectcode.dev

# Verify vault credentials
echo $VAULT_ID
echo $VAULT_SECRET

That's it. DataVault provides basic health endpoints and optional system monitoring. Use Docker logs for troubleshooting.