Operations
Metrics endpoint
Vektor exposes lightweight, in-process operational metrics at /metrics in the Prometheus text exposition format, ready to scrape by Prometheus/Grafana or read by hand while debugging.
Browse documentation
Getting started
Operations
Changelog
The /metrics endpoint
Every running server exposes metrics at /metrics. The endpoint lives outside the API router, so it is reachable even in API-only deployments and does not require authentication. Point your browser or curl at it:
curl http://localhost:8080/metricsThe response uses the Prometheus text/plain; version=0.0.4 content type. Each metric is emitted with its # HELP and # TYPE lines followed by the current value:
# HELP vektor_process_uptime_seconds Process uptime in seconds.
# TYPE vektor_process_uptime_seconds gauge
vektor_process_uptime_seconds 3821.44
# HELP vektor_http_requests_total Total number of HTTP requests handled since start.
# TYPE vektor_http_requests_total counter
vektor_http_requests_total 15204
# HELP vektor_websocket_active_connections Currently open realtime WebSocket connections.
# TYPE vektor_websocket_active_connections gauge
vektor_websocket_active_connections 7Exposed metrics
The snapshot is collected on demand each time the endpoint is scraped. The following series are exposed:
| Metric | Type | Description |
|---|---|---|
vektor_process_uptime_seconds | gauge | Process uptime in seconds. |
vektor_http_requests_total | counter | Total HTTP requests handled since start. |
vektor_http_requests_per_second | gauge | Average HTTP requests per second over the last 60s. |
vektor_websocket_active_connections | gauge | Currently open realtime WebSocket connections. |
vektor_spaces_total | gauge | Number of active spaces. |
vektor_users_total | gauge | Number of registered users. |
vektor_process_cpu_user_seconds_total | counter | Total user CPU time consumed, in seconds. |
vektor_process_cpu_system_seconds_total | counter | Total system CPU time consumed, in seconds. |
vektor_process_cpu_seconds_total | counter | Total CPU time (user + system), in seconds. |
vektor_process_cpu_utilization_ratio | gauge | Rolling 60s CPU usage as a fraction of one core (1.0 = one core fully busy). |
vektor_event_loop_delay_seconds | gauge | Most recent event loop delay sample, in seconds. |
vektor_event_loop_delay_max_seconds | gauge | Peak event loop delay over the last 60s. Sustained multi-second values mean the loop was blocked, stalling all clients. |
vektor_memory_rss_bytes | gauge | Resident set size (total memory allocated for the process). |
vektor_memory_heap_total_bytes | gauge | Total size of the V8 heap. |
vektor_memory_heap_used_bytes | gauge | Used size of the V8 heap. |
vektor_memory_external_bytes | gauge | Memory used by C++ objects bound to JavaScript objects. |
vektor_memory_array_buffers_bytes | gauge | Memory allocated for ArrayBuffers and SharedArrayBuffers. |
Prometheus scrape config
Add a scrape job pointing at your server to collect these metrics:
scrape_configs:
- job_name: vektor
metrics_path: /metrics
static_configs:
- targets: ["vektor.example.com:8080"]From there, the series are ready to graph in Grafana or alert on. For example, alerting when vektor_event_loop_delay_max_seconds stays above a threshold, or tracking vektor_spaces_total and vektor_users_total growth over time.