Metrics Endpoint
All NetBird server components expose metrics in Prometheus format at the/metrics endpoint.
Management Server Metrics
The management server exposes metrics on a configurable port (default: 9090):Enable Metrics
Metrics are enabled by default. Configure the metrics port in your management server:Metrics use OpenTelemetry with Prometheus exporters for standardized observability.
Key Metrics to Monitor
gRPC API Metrics
Monitor peer connections and authentication:| Metric | Type | Description |
|---|---|---|
management.grpc.sync.request.counter | Counter | Number of sync requests from peers |
management.grpc.login.request.counter | Counter | Number of login requests |
management.grpc.login.request.blocked.counter | Counter | Blocked login attempts |
management.grpc.connected.streams | Gauge | Active peer connections |
management.grpc.login.request.duration.ms | Histogram | Login request latency |
management.grpc.sync.request.duration.ms | Histogram | Sync request latency |
management.grpc.updatechannel.queue | Histogram | Update channel queue depth |
HTTP API Metrics
Track REST API performance:| Metric | Type | Description |
|---|---|---|
management.http.request.counter | Counter | HTTP requests by endpoint and method |
management.http.response.counter | Counter | HTTP responses by status code |
management.http.request.duration.ms | Histogram | Request duration by endpoint |
management.http.request.counter.total | Counter | Total HTTP requests |
management.http.response.code.total | Counter | Total responses by status code |
Store Metrics
Monitor database and persistence performance:| Metric | Type | Description |
|---|---|---|
management.store.global.lock.acquisition.duration.micro | Histogram | Time to acquire store lock (µs) |
management.store.global.lock.acquisition.duration.ms | Histogram | Time holding store lock (ms) |
management.store.persistence.duration.micro | Histogram | Save/delete operation duration (µs) |
management.store.transaction.duration.ms | Histogram | Transaction duration (ms) |
Account Manager Metrics
Track network map calculation performance:| Metric | Type | Description |
|---|---|---|
management.account.update.account.peers.duration.ms | Histogram | Peer update preparation time |
management.account.get.peer.network.map.duration.ms | Histogram | Network map calculation time |
management.account.network.map.object.count | Histogram | Objects in network map |
management.account.peer.meta.update.counter | Counter | Peer metadata updates |
IDP Metrics
Monitor identity provider integration:| Metric | Type | Description |
|---|---|---|
management.idp.authenticate.request.counter | Counter | IDP authentication requests |
management.idp.get.user.by.email.counter | Counter | User lookup requests |
management.idp.request.error.counter | Counter | IDP request errors |
management.idp.request.status.error.counter | Counter | Non-2xx responses from IDP |
Health Checks
Relay Server Health
Relay servers expose a health check endpoint at/health:
Health check responses are cached for 3 seconds to reduce overhead.
Management Server Health
Check management server availability:Prometheus Configuration
Add NetBird components to yourprometheus.yml:
Grafana Dashboards
NetBird provides pre-built Grafana dashboards in the source repository:- Active peer connections
- Login and sync latencies
- Network map distribution times
- Store operation performance
- Error rates and blocked requests
Docker Compose Monitoring Stack
Example monitoring setup:Alerting Rules
High Login Latency Alert
High Login Latency Alert
Active Streams Alert
Active Streams Alert
Store Lock Contention Alert
Store Lock Contention Alert
What to Monitor
Peer Connectivity
Monitor
management.grpc.connected.streams to track active peers. Sudden drops indicate connectivity issues.API Performance
Watch login and sync duration histograms. P95 latency should be under 1 second for healthy operations.
Store Performance
Track lock acquisition and persistence metrics. High values indicate database bottlenecks.
Error Rates
Monitor blocked requests and IDP errors. Spikes indicate authentication or authorization problems.
Client Monitoring
Clients don’t expose metrics endpoints, but you can monitor client status:Use
netbird status --json to integrate client health checks into your monitoring system.