Monitoring

Table of contents

  1. Batch Monitor Tool
    1. Starting the Monitor
    2. Interface Features
      1. Navigation
      2. Status Tabs
      3. Display Elements
  2. API Status Endpoints
    1. Single Batch Status
    2. All Batches Status
  3. Logging
    1. Log Levels
    2. Log Location
  4. Performance Metrics
    1. Batch Statistics
    2. Cache Performance

Batch Monitor Tool

Starting the Monitor

./batch-monitor

Interface Features

  • ↑/↓: Navigate batches
  • ←/→: Switch tabs
  • Tab: Cycle through tabs
  • Enter: View details
  • q: Quit

Status Tabs

  • Active Batches
  • Completed Batches
  • Failed Batches
  • Expired Batches

Display Elements

  • Batch ID
  • Status
  • Creation Time
  • Progress Bar
  • Request Counts

API Status Endpoints

Single Batch Status

curl http://localhost:8080/v1/batches/{batch_id}

Response:

{
  "batch": {
    "id": "batch_123",
    "status": "completed",
    "created_at": 1678901234,
    "expires_at": 1678987634,
    "request_counts": {
      "total": 10,
      "completed": 10
    }
  }
}

All Batches Status

curl http://localhost:8080/v1/batches

Logging

Log Levels

  • INFO: General operation info
  • WARNING: Non-critical issues
  • ERROR: Critical problems

Log Location

  • Standard output (stdout)
  • Error output (stderr)
  • MongoDB logs (for persistence)

Performance Metrics

Batch Statistics

  • Total requests
  • Completed requests
  • Success rate
  • Processing time

Cache Performance

  • Hit rate
  • Miss rate
  • Cache size