Skip to main content

Monitoring Guide

Monitor canister health and performance.

Overview

AgentVault provides comprehensive monitoring for deployed canisters.

Commands

Health Checks

# Basic health check
agentvault health

# Specific canister
agentvault health --canister-id <id>

# Detailed report
agentvault health --canister-id <id> --detailed

Status

# Project status
agentvault status

# Specific canister
agentvault status --canister-id <id>

Statistics

# Canister statistics
agentvault stats --canister-id <id>

# Time period
agentvault stats -c <id> --period 24h

Continuous Monitoring

# Start monitoring
agentvault monitor --canister-id <id>

# With alerts
agentvault monitor -c <id> --alert --webhook <url>

Health Indicators

IndicatorDescriptionHealthy
StatusCanister statusRunning
CyclesCycles balance> 1T
MemoryMemory usage< 80%
ErrorsError rate< 1%
LatencyResponse time< 1000ms

Metrics

Available Metrics

agentvault stats --canister-id <id> --format json
{
"requests": 10000,
"errors": 5,
"errorRate": 0.0005,
"avgLatency": 250,
"p99Latency": 800,
"memoryUsed": 134217728,
"memoryLimit": 268435456,
"cycles": 5000000000000
}

Metrics Collection

MetricTypeDescription
requestsCounterTotal requests
errorsCounterTotal errors
latencyHistogramResponse times
memoryGaugeMemory usage
cyclesGaugeCycles balance

Alerting

Webhook Alerts

# Configure webhook
agentvault monitor --alert --webhook https://hooks.example.com/alert

Alert Payload

{
"canisterId": "abcde-aaaab",
"alert": "cycles_low",
"value": 500000000000,
"threshold": 1000000000000,
"timestamp": "2026-02-12T14:30:00Z"
}

Alert Types

AlertTrigger
cycles_lowCycles below threshold
memory_highMemory above threshold
error_rate_highError rate above threshold
latency_highLatency above threshold
canister_stoppedCanister stopped unexpectedly

Log Analysis

View Logs

# Recent logs
agentvault logs --canister-id <id>

# Follow logs
agentvault logs -c <id> -f

# Filter by level
agentvault logs -c <id> --level error

# Time filter
agentvault logs -c <id> --since 1h

Log Levels

LevelDescription
debugDebug information
infoGeneral information
warnWarnings
errorErrors

Dashboard

The web dashboard provides visual monitoring:

cd webapp
npm install
npm run dev

Access at: http://localhost:3000

Dashboard Features

  • Real-time status updates
  • Metrics visualization
  • Log streaming
  • Alert configuration
  • Historical data

Best Practices

Monitoring Setup

  • Enable health checks
  • Configure alert webhooks
  • Set up dashboard access
  • Document escalation procedures

Regular Checks

  • Daily: Check cycles balance
  • Weekly: Review error rates
  • Monthly: Analyze trends
  • Quarterly: Review and adjust thresholds

Incident Response

  1. Receive alert
  2. Check dashboard for details
  3. Review recent logs
  4. Take corrective action
  5. Document incident