Prometheus Metrics

GET /metrics    (on metrics port :9093, NOT the API port)

Note: Metrics are served on a separate, dedicated port (:9093 by default, configurable via OSPREY_METRICS_LISTEN). This keeps operational telemetry isolated from the authenticated API surface on :8080.

Available metrics (API server):

Metric Type Labels Description
osprey_http_requests_total counter method, route, status HTTP request count by method, route pattern, HTTP status
osprey_http_request_duration_seconds histogram method, route HTTP request latency (buckets: 5ms–5s)
osprey_db_pool_total_conns gauge — Total connections in the pgx pool
osprey_db_pool_idle_conns gauge — Idle connections
osprey_db_pool_acquired_conns gauge — Currently acquired connections
osprey_db_pool_max_conns gauge — Maximum pool connections
osprey_nats_messages_published_total gauge — Total NATS messages published
osprey_nats_messages_received_total gauge — Total NATS messages received
osprey_nats_reconnects_total gauge — Total NATS reconnections
osprey_nats_connected gauge — NATS connection status (1/0)
osprey_ws_clients_connected gauge — Connected WebSocket clients
osprey_ws_messages_broadcast_total counter — Broadcast messages sent
osprey_ws_messages_dropped_total counter — Messages dropped (slow clients)

Engine metrics (port 9090):

Metric Type Labels Description
osprey_engine_snapshots_total counter area Topology snapshots processed
osprey_engine_snapshot_duration_seconds histogram area Snapshot processing time
osprey_engine_snapshot_errors_total counter — Snapshot processing errors
osprey_engine_devices_processed_total counter — Total devices processed
osprey_engine_links_processed_total counter — Total links processed
osprey_engine_stale_sweeps_total counter — Stale area sweep operations

Collector-manager metrics (port 9091):

Metric Type Labels Description
osprey_manager_collectors_running gauge — Running collector instances
osprey_manager_collectors_errored gauge — Errored collector instances
osprey_manager_sync_total counter — DB poll sync cycles
osprey_manager_sync_errors_total counter — Failed sync cycles

SNMP discovery metrics (collector-manager port 9091):

Metric Type Labels Description
osprey_snmp_isis_area_verification gauge collector, area, state One-hot latest IS-IS area verdict (unknown, verified, pending, unreachable, truncated)
osprey_snmp_isis_bootstrap_areas gauge collector, state Active handoff counts (desired, acked); both return to zero after handoff
osprey_snmp_lsdb_walk_truncated_total counter target, area, protocol LSDB walks rejected after transport or structural completeness validation

Engine and collector-manager metrics also include the osprey_db_pool_* and osprey_nats_* gauges.