Skip to main content

Metrics

Comprehensive metrics for all your resources.

Overview​

SailOps collects and displays metrics for:

  • Containers - CPU, memory, network, storage
  • Databases - Connections, queries, storage
  • Cache - Memory, operations, hit rate
  • Gateways - Requests, latency, errors

Viewing Metrics​

Resource Metrics​

  1. Navigate to any resource (Container, Database, etc.)
  2. Click the Metrics tab
  3. Select time range
  4. View charts and data

Dashboard Metrics​

The dashboard shows overview metrics:

  • Resource usage across all containers
  • Database connection counts
  • Cache hit rates

Time Ranges​

Collection runs every 15 s. Gateway, route and website traffic use fixed complete intervals: the smallest step in 30, 60, 120, 300, 600, 900, 1800, 3600, 7200, 10800, 21600 or 43200 seconds that keeps the requested range at or below 100 points. Other resource charts use range/100 with a minimum of 30 s.

Requested rangeTraffic interval
15 minutes30 s
1 hour1 min
3 hours2 min
6 hours5 min
12 hours10 min
24 hours15 min
7 days2 h
30 days12 h

Traffic timestamps mark interval starts. The still-filling interval is omitted: the series ends at the last complete interval before the earlier of the requested end and now minus 30 s.

The ranges available in the toolbar depend on your organization's support plan. Each plan sets a maximum metric retention period — only ranges within that limit are offered. Custom date ranges are also validated against this limit.

info

Some resource types have shorter built-in limits regardless of your plan. For example, database, cache, NATS and gateway engine metrics are available for up to 30 days, and organization-level observability metrics for up to 24 hours. A message below the toolbar indicates when a range has been truncated.

Container Metrics​

CPU Usage​

Measures processor utilization:

CPU Usage (%) = (CPU time used / CPU time allocated) × 100
LevelMeaning
0-60%Normal operation
60-80%Consider scaling
80-100%Critical, scale immediately

Memory Usage​

Measures RAM utilization:

Memory Usage = Working Set Memory / Memory Limit
LevelMeaning
0-70%Healthy
70-85%Watch closely
85-100%Risk of OOM

Network I/O​

Measures data transfer:

  • Bytes Received - Incoming data
  • Bytes Transmitted - Outgoing data
  • Packets - Network packet counts

Storage I/O​

Measures disk operations:

  • Bytes Read - Data read from disk
  • Bytes Written - Data written to disk
  • IOPS - I/O operations per second

Container-Specific Metrics​

MetricDescription
RestartsNumber of container restarts
UptimeTime since last restart
ReplicasRunning vs desired instances

Database Metrics​

Connection Metrics​

MetricDescription
Active ConnectionsCurrently connected clients
Idle ConnectionsInactive connections
Max ConnectionsConnection limit
Connection WaitQueue time for connections

Query Metrics​

MetricDescription
Queries/secondQuery throughput
Query LatencyAverage query time
Slow QueriesQueries exceeding threshold
TransactionsTransaction count

Storage Metrics​

MetricDescription
Database SizeTotal data size
Table SizePer-table storage
Index SizeIndex storage
WAL SizeWrite-ahead log size

Replication Metrics (HA)​

MetricDescription
Replication LagBytes behind primary
Standby StatusReplica state
WAL PositionCurrent log position

Cache Metrics​

Memory Metrics​

MetricDescription
Used MemoryCurrent memory usage
Peak MemoryMaximum memory used
Memory FragmentationInternal fragmentation
Evicted KeysKeys removed due to memory

Operations Metrics​

MetricDescription
Commands/secondOperation throughput
Hit RatePercentage of cache hits
MissesCache miss count
KeyspaceTotal key count

Connection Metrics​

MetricDescription
Connected ClientsCurrent connections
Blocked ClientsClients in blocking ops
Rejected ConnectionsConnections refused

Gateway Metrics​

Where to find traffic​

  • Gateway Overview: compact charts; Observability: All routes or an HTTP, gRPC, TCP or TLS route.
  • Container Overview: Associated routes, with Requests/sec (last 5 min) and p99 upstream response time (latest complete interval). Shared routes carry Shared with {N} services · whole-route figures and are excluded from the container aggregate. Observability shows Route traffic per route.
  • Website Overview and Observability: Quick Expose and custom-domain HTTPRoutes summed across gateways. CDN edge cache hits and routes created outside SailOps are not attributed.
  • Managed Grafana: Gateways & Traffic.

Traffic definitions​

MetricDefinition
Request rateHTTP and gRPC requests in each interval divided by its length, in req/s. TCP/TLS connections are shown separately.
Requests in windowHTTP and gRPC requests in observed intervals. Intervals with a counter reset or a collection gap are excluded. TCP/TLS connections are counted separately.
Success rate(total − 4xx − 5xx) / total. 1xx (including WebSocket 101 upgrades), redirects and 304 count as success. gRPC errors in grpc-status over HTTP 200 also count as HTTP success.
Error rate (4xx + 5xx)(4xx + 5xx) / HTTP and gRPC requests. Grafana's Error rate (5xx, selected range) uses sailops_gateway_5xx_ratio, which counts only 5xx and can be lower.
ErrorsCounts per displayed interval. A timeout before response headers is also counted as a 504; a timeout after headers keeps its status. Timeouts and connection failures overlap the status classes and are not part of the error rate.
Requests without a complete upstream responseSum requests minus response-time sample count over the window, excluding unobserved intervals. Includes timeouts after headers, client resets and WebSocket upgrades.
Gateway HTTP requestsRequests received, responses sent and 4xx/5xx responses on the gateway's listeners. Includes forwarded and gateway-generated responses. Available even when routed counters are missing, including gateways with no routes.
Answered by the gatewayRequests Envoy answered itself: no matching route (404), no available backend (503), policy denials (401/403/429), redirects. Not attributed to any route. Retried upstream attempts can hide part of it.
Requests closed before a responseGateway listener requests minus responses, summed over the window then clamped at zero. Gateway aggregate only; per-route client aborts are not measured.
TCP/TLS connectionsConnections opened through TCPRoute and TLSRoute; separate connection failures. Excluded from HTTP totals and ratios.

Route counters describe traffic forwarded to a backend. A route with no backend endpoints can therefore show no routed traffic. Gateway HTTP requests still shows observed listener traffic, including 404 or 503 responses. Answered by the gateway requires both routed and listener observations; it stays unavailable when routed counters are missing. No backend available is a gateway-aggregate state when that attribution shows a positive gateway 5xx count, rather than a route backend-status check. Gateway listener figures cover the whole listener, including any system-namespace routes. The shared gateway does not expose listener totals to an individual project. Listener-minus-upstream differences are signed per interval: sum over the window before clamping at zero, because retries count once per upstream attempt.

No traffic means an observed interval with zero HTTP requests; No HTTP traffic identifies TCP/TLS-only traffic. No Traffic Data means data is unavailable. Missing intervals remain gaps; no traffic has no success/error ratio or response-time value.

Upstream response time​

Time from the request fully received by the gateway until the upstream response completes. Excludes requests without a complete response (timeouts after headers, client resets, WebSocket upgrades). Whole milliseconds.

This includes upstream connection-pool wait, connection establishment, retries, backend processing and response transfer to the gateway. It excludes client TLS, request upload, pre-router filters and CDN cache hits. Envoy records whole milliseconds; averages below about 10 ms can read up to 0.5 ms low.

A stream the backend ends cleanly (SSE, server-streaming gRPC, large downloads) counts once, for its whole duration, in the interval where it ends. Streams cut by the request timeout or closed by the client count none. Set an appropriate route request timeout, or 0s for unlimited streams. A WebSocket upgrade counts once as a successful 101 and has no upstream response time sample.

Histograms flush every 5 s, so a response-time sample can land one interval late; compare incomplete-response counts over a window. Percentiles are linearly interpolated within histogram buckets like Prometheus histogram_quantile. Some percentiles exceed the largest histogram bound and are shown as lower bounds (> X ms).

Metric Visualization​

Chart Types​

Line Charts

  • Show trends over time
  • Compare multiple metrics
  • Identify patterns

Area Charts

  • Show cumulative values
  • Stack multiple series
  • Visualize totals

Bar Charts

  • Compare discrete values
  • Show distributions
  • Highlight peaks

Chart Interactions​

  • Hover - View exact values
  • Zoom - Focus on time range
  • Pan - Navigate time
  • Legend - Toggle series

Alerts and metrics​

See Alerts Overview and Grafana alerting. Configure No data handling explicitly.

Accessing Metrics​

Dashboard View​

All metrics are available through the SailOps dashboard:

  1. Navigate to any resource
  2. Click the Metrics tab
  3. Select the time range
  4. View real-time charts and data

Metric Retention​

How far back you can view metrics depends on your organization's support plan:

PlanMaximum Retention
Basic7 days
Starter30 days
Business90 days
Custom365 days

Samples are aggregated at query time without downsampling. Gateway, route and website traffic is limited to 30 days and the plan limit.

Best Practices​

1. Set Up Dashboards​

Create custom views for:

  • Production health
  • Development metrics
  • Cost optimization

2. Baseline Your Metrics​

Know what's normal:

  • Record baseline values
  • Understand daily patterns
  • Document expected ranges

3. Set Meaningful Alerts​

Alert on actionable conditions:

  • Avoid alert fatigue
  • Set appropriate thresholds
  • Include context

4. Review Regularly​

Weekly metric reviews:

  • Identify trends
  • Spot anomalies early
  • Plan capacity

Troubleshooting​

Metrics Not Showing​

  1. Verify resource is running
  2. Check time range selection
  3. Wait for data collection (1-2 minutes)
  4. Refresh the page

Metrics Look Wrong​

  1. Check time zone settings
  2. Verify metric calculation
  3. Compare with resource status
  4. Contact support if needed

Missing Historical Data​

  1. Check retention policy
  2. Verify time range exists