Read logs and metrics
Tail and search a service's logs, read build and deploy logs, and read the Metrics tab, the numbers on each canvas card and the canvas Traffic view. Also covers opting a worker's own metrics in.
When a service misbehaves, its logs say what happened and its metrics say how much. This page covers each place the console shows them and the API call behind it.
Before you begin
- Reading logs, metrics, instances and builds needs the
viewerrole or higher. Opting a worker's metrics in needsdeployer. - The service has a running deployment. A service that never started has no lines and no points.
Tail a service's logs
Select the service on the canvas, then select Logs. With a service selected, pressing L opens the same tab. The tab shows the newest 200 retained lines of the time range, newest at the bottom, and a Filter lines… box that takes the same search syntax as the environment view: words, "phrases", -word, OR, parentheses, level:, pod: and @field terms. Select Search syntax beside the box for the list, and see Search logs. A JSON line shows as fields; select one to filter by it. Under the lines you see live · tailing N instances and the environment's slug.
Choose all, warn+ or error to set the minimum level. warn+ includes errors. A line with no recognizable level shows only under all.
Pick a window in Time range: Last 15m, Last 1h (the default), Last 6h, Last 24h or Last 7d. If the window holds no lines, the tab offers Show the last 7 days. Select Custom range for a fixed From and To in UTC; Back to live returns to the tail.
Select Pause to hold new lines aside. The status reads paused · N lines buffered. Select Resume to append them.
Select Copy to put the lines on screen on the clipboard, or Download to save them as a .log file. Point at a line and select Copy line for one, or View in context to open the environment's Logs panel 2 minutes either side of it. Open in logs explorer opens the same panel with the current range, text and level.
Each line shows its UTC time, level, instance (such as web-0) and text. A divider in the tail marks each release's activation, so a spike lines up with what shipped.
A live tail closes after 15 minutes, and a credential holds at most 4 open streams. The console reconnects on its own, waiting from 1 to 30 seconds between attempts. The HTTP API page lists every stream limit.
Search logs
The environment view searches every service at once and filters by instance. Select Logs in the canvas header, or right-click an empty spot on the canvas and select Environment logs. The command palette lists the same view as Open logs explorer. Pressing / focuses the search box.
A Logs panel opens: "Every service in ENVIRONMENT_SLUG, newest at the bottom. Kept for 7 days." Columns are Time, Service, Pod and Message.
Type in the search box, which reads Search: error -debug level:warn until you type. After a short pause, the panel reloads with matching lines, highlights each match and counts them. Select the Search syntax button beside the box to list the operators. Select an example there to run it.
Pick an instance in All pods and a window in Time range: Last 15m, Last 1h (the default), Last 6h, Last 24h or Last 7d. Set the level floor with all, warn+ or error.
For any other window, select Custom range, enter From and To in UTC and select Show this range. A fixed window does not follow new lines and the Following toggle gives way to Back to live. The range label shows both ends, and a range that ends before it starts is refused with the reason under the pickers.
A line written as a JSON object shows as its fields, each one a button. Select a field to add @key:value to the search, such as @http.status:503. The footer toggle json: fields switches to json: raw to read the text the app wrote.
Point at a line and select View in context. The panel opens a fixed window of 2 minutes either side of that line, clears the text search, the pod and the level, scrolls to the line and highlights it. Select Back to live to return. In a service's Logs tab the same button opens the environment's Logs panel at that moment.
Select Load older lines to page back, 200 lines at a time. Select Download to save the lines on screen as a .log file.
The environment's Logs panel keeps its state in the page address: q for the search text, level (warn or error), range (15m, 1h, 6h, 24h or 7d), from and to for a custom range or a context view, and at for the line a context view centres on. A copied link opens the same search. Changes replace the current history entry, so the browser's Back button leaves the panel instead of stepping through each keystroke or range. A service's Logs tab does not write to the address.
Search syntax
Plain text still works. Every word you type must appear in the line, in any order and in any letter case, and a word matches inside a longer word: err finds error. Operators narrow or widen that.
| You write | It matches |
|---|---|
timeout refused | Lines containing both words. AND between terms means the same. |
"connection refused" | The exact phrase. Write \" for a quote and \\ for a backslash inside it. |
-debug, -"cache miss", -(a OR b) | Lines that do not contain the term or the group. |
error OR panic | Either term. OR binds more loosely than the implicit AND: a b OR c is (a AND b) OR c. |
(error OR panic) -retry | Parentheses group terms. |
level:error | Lines at exactly that level: debug, info, warn or error. A line with no recognized level matches no level: term. The level floor above the box is separate and means "this level or worse". |
service:web | Lines from the service with that slug. |
pod:rel-web-3- | Lines from pods whose name starts with that text. |
env:production | Lines from the environment with that slug. Only the environment-wide view accepts it. |
@http.status:>=500 | A field of a JSON line, reached by its dotted key, compared as a number with >, >=, < or <=. |
@latency_ms:100..250 | A number in a range with both ends included. @status:500.. and @status:..199 leave one end open. |
@user.id:42, @level:error, @ok:true | A field equal to a value. Text compares ignoring case, and a number matches the number 42 and the text "42". |
@msg:"disk full", @code:">5" | A quoted value is always an exact text match, so it can hold spaces and operator characters. |
Words that merely contain a colon, such as 12:30:45 or http://svc:8080, are plain text. Quote a word that starts with - to search for the dash. Array elements are reached by position, as in @items.0.id. A key that itself contains dots is found by its full name.
A query holds at most 1,024 bytes, 32 terms and 8 levels of parentheses and exclusions. @field terms read lines that are a single JSON object of up to 64 KiB. Any other line has no fields: an @field term never matches it and a -@field term always does.
A query the control plane cannot read does not run. The box shows the position, what is wrong and what to write instead, and echoes the query with the faulty text underlined. The list stays empty until the query is fixed, and the live tail does not open.
What runs in the database and what runs in the control plane
Every value in a query reaches the database as a bound parameter, never as SQL text. The database applies what it can express. The control plane then checks every returned line against the whole query, so the database only has to avoid dropping a line that matches.
| Evaluated in SQL | Evaluated in the control plane |
|---|---|
The environment and organization, from and to, serviceId, podName and the level floor. | The full query, over every line SQL returns. |
Words and phrases that use only ASCII characters, with or without -, when they sit in the query's top-level AND. | Words and phrases with other characters, so the database and the control plane cannot disagree about their case. |
level: and -level: at the top level. | OR, parentheses and - over a group. |
service:, resolved from its slug to the service, and pod:, at the top level. A second service: or pod: term is checked by the control plane. | Every @field term, because the fields live inside the line's JSON text. |
env:, which compares the environment's slug. | |
| The live tail, which never touches the database. |
A query that SQL can answer by itself returns a page in one query. A query with parts only the control plane can judge reads lines in batches of 500, and stops after 20,000 lines in one request. The page can then hold fewer lines than asked for and still carry a nextCursor. In the console, a search with no match in those lines says No match in the lines searched so far and offers Search older lines. The live tail reads the service and environment names when it connects, so a service created after that is not matched by service: until the tail reconnects.
A range that reaches past retention ends in a marker: log lines before TIMESTAMP are outside the 7-day retention window and were never stored. NebulaCtrl keeps 7 whole UTC days of lines and drops older days hourly.
The same search is listEnvironmentLogs:
curl -G "BASE_URL/api/v1/environments/ENVIRONMENT_ID/logs" \
-H "Authorization: Bearer NEBULA_TOKEN" \
--data-urlencode "q=level:error (timeout OR @http.status:>=500)" \
--data-urlencode "from=FROM_TIMESTAMP" \
--data-urlencode "to=TO_TIMESTAMP" \
--data-urlencode "limit=50"q, serviceId, podName, from, to and level are optional. from is inclusive and to is exclusive. Results come newest first, 50 per page by default and 200 at most. Follow nextCursor for the next page. The response also lists the plain words and phrases of q in highlight, the text the console marks.
A query the server refuses answers 422. The first entry of errors has location set to query.q, a message, and a value with position (counting from 1) and length, both in UTF-16 code units, the unit browsers index strings with.
Read a build's or a deployment's logs
Select the service, then Deployments, then the deployment. The deployment's card opens with the tabs Build logs, Deploy logs and Details. Build logs appears only for a deployment that came from a build.
Select Build logs for the build output, grouped by step, or Deploy logs for the output of that release's instances.
Type in Search N lines to filter, or use Wrap, Follow, Copy and Download. Select Errors only (N) to keep the lines that look like errors, and Jump to first error to scroll to the first one. On Deploy logs, Level keeps All, Warnings+ or Errors. Pressing / focuses the search box. If a failure is the reason you are here, select Copy failure report in the alert above the logs for a text you can paste into a chat or a bug report.
A build's log is kept for 7 days. The card fetches the first 5,000 build lines and says so when it stops: "Showing the first N lines; the rest was not fetched." Select Load the rest to fetch the remainder. Through the API, listBuildLogs pages a build's log oldest first (GET /api/v1/builds/{id}/logs, 200 lines by default, 1,000 at most), and streamBuildLogs tails it (GET /api/v1/builds/{id}/logs/stream). See Builds.
Read service metrics
Select the service, then Metrics. The tab shows the cards CPU, Memory, Requests, p95 latency, Error rate, Network in and Network out, plus one Disk · NAME card for each volume the service has. They refresh every 30 seconds.
Choose 1h, 24h or 7d. The note under the cards reads "One point per 1 min", "One point per 15 min" or "One point per 120 min".
Move the pointer over any chart. The cursor and the tooltip follow at the same moment in every other chart, so you can read CPU, memory, traffic and disk at one instant.
Drag across any chart to zoom to that range. A drag narrower than two points (never under a minute) selects nothing, and leaving the chart mid-drag cancels it. A Zoomed to bar shows both ends, and every chart redraws with finer points. Select Back to the last hour (or Back to the last 24 hours or Back to the last 7 days, whichever window you came from) to leave the zoom, or select 1h, 24h or 7d. The range is kept in the page address as from and to, each an ISO 8601 instant with a zone such as 2026-10-01T12:00:00Z. A zoom adds a history entry, so the browser's Back button returns to the range before the zoom, and a copied link opens the same range. A link whose from or to is malformed, or whose range ends before it starts, opens the trailing window. The API refuses a range under a minute or over 7 days wide.
| Card | What it is |
|---|---|
| CPU, Memory | Usage of the service's pods. With a limit, the card draws it as a line and shows "N% of limit". |
| Requests | Requests per minute through the cluster's proxy. |
| p95 latency | 95th-percentile response time. A bucket with too few requests has no point. |
| Error rate | Share of requests answered 5xx. A bucket with no requests has no point. |
| Network in, Network out | Bytes per second received and sent, summed over the service's pods. |
| Disk · NAME | Bytes used on the volume, with the volume's size as the limit line. Only services with volumes have these cards. |
"N% of limit" turns amber from 70% and red from 85%. The limit is the sum of the limits of the http and worker processes across their replicas. If any of them has no limit, the card says "no limit set".
See which release changed a curve
A dotted vertical line marks the moment each release took over serving in the range, and the legend gains Deploy. Point at the diamond on the line, or at the chart next to it, to read the release number, whether it was a deploy, a rollback or a promotion, the commit it was built from and the time. A change in a curve that starts at a line lines up with that release.
Sum or per instance
CPU and Memory start as Sum: one line for the total of every pod, with the limit of all of them together. Choose Per instance to draw one line for each pod instead, named by the generated tail of its name. The header still shows the total, and the limit line becomes one pod's limit when every pod has the same one. If the pods are sized differently, the card says "pods are sized differently" and draws no limit line. A pod appears only where it reported, so a pod that was replaced by a deploy ends where the next one begins. The view shows the 16 pods seen most recently and says so when it leaves older ones out. Per instance is unavailable, and the note under the cards says why, when no pod reported CPU or memory in the range. The choice is kept in the page address as view.
Network and disk
The agent reads each pod's network byte counters from its node's kubelet once a minute and reports the difference between two readings, so Network in and Network out have no point until a pod has been read twice. They count the pod's main interface, which includes traffic between your own services. A pod whose counters restarted or that the kubelet reported nothing for has no point for that minute; it does not read as zero.
Disk cards draw the volume's own usage once a minute. A volume that is a directory of the node's disk, which is what the default local storage of a K3s node provides, has no usage of its own to draw: the kubelet reports the whole node disk for it. Its card reads not reported with that reason, and the storage section of Settings says how much room the node's disk has left.
When there is nothing to draw
A card with no points reads — and, in place of the chart, not reported followed by a reason. It was not measured; it does not mean zero. For CPU and Memory the reason is "the cluster reports no CPU or memory metrics" or "no samples in this range". For Requests, p95 latency and Error rate it is "the cluster reports no traffic metrics" or "no requests in this range". For Network in and Network out it is "no network readings in this range", which an older agent or a kubelet without the counters also causes. For a Disk card it says the cluster has not reported the volume yet, that the volume is a directory of the node's disk, or that the range holds no samples. A stopped service shows No metrics while stopped above the cards, and the cards disappear when the range holds no points. A service whose last deployment failed with no earlier release live shows Metrics unavailable and a See why it failed button, which opens the Deployments tab, the same way.
The API operations are getServiceMetricsSummary (GET /api/v1/services/{id}/metrics/summary; the console uses it), getServiceMetrics (GET /api/v1/services/{id}/metrics) and getServiceTraffic (GET /api/v1/services/{id}/traffic). Each takes environmentId. The summary takes a window of 1h, 24h or 7d, or an explicit from and to in place of it (RFC 3339 timestamps, at least a minute and at most 7 days apart, with to read as now when it is later). It answers with cpu, memory, instances (CPU and memory per pod), network, disk, the traffic series and deployMarkers. network and the three traffic series are null when they were not reported, never an empty series. The other two take windows 1h, 6h and 24h. Points are kept for 7 days, like logs.
Read canvas metrics
Each service card on the canvas shows three numbers for the trailing 30 minutes, in 60-second buckets (up to 30 points). The agent samples every 15 seconds and the console reads every 30 seconds. A database service's template decides the card. Any other service follows its first process by name.
| Card | Shows |
|---|---|
http process | CPU, p95, RPM |
worker process | CPU, Mem, Restarts. Once opted in and scraped: CPU, Queue, Jobs/min. |
| PostgreSQL | Conns, QPS (writes per second), Lag (replication lag), writer and reader pips |
| Valkey | Mem, Ops/s, Hit (cache hit rate) |
cron process | Last run, Next, 7 runs (N/M ok) |
MySQL, MongoDB, job, proxy | no numbers |
CPU shows a share of the limit when one is known, and millicores otherwise. RPM and p95 cover the whole 30 minutes. p95 needs at least 10 requests in that window.
A reading turns amber, and an amber dot appears beside the service's status, from 90% of its warning level. Hover the dot for the list, such as "CPU 92% of 1 vCPU · near limit".
| Reading | Warning level |
|---|---|
| p95 | 300 ms |
| Queue | 60 |
| Conns | 160 |
| Lag | 1 s |
| CPU, Mem | the service's limit |
Nothing else turns amber. With no limit known, hovering CPU or Mem says "CPU limit not reported" or "Memory limit not reported" and the reading never turns amber. A limit is known only when every http and worker process of the service has both a CPU and a memory limit.
An RPM or p95 slot with no reading says why on hover. A service with only tailnet domains, or with no public domain, never passes through the proxy where traffic is measured, and a cluster without a Traefik metrics endpoint reports no traffic. See Domains and Tailscale.
A PostgreSQL card needs CloudNativePG on the cluster. Its pips show the instances CloudNativePG last reported, each lit when ready. A database silent for 2 minutes shows none. A Valkey card needs nothing: the agent reads its own INFO.
Read traffic on the canvas
The canvas shows how services are wired by default. To see what is measured, select Show traffic in the canvas menu, or run Show traffic on the canvas from the command palette. The mode is kept in the page address as canvas=traffic, so a copied link opens on the readings. Traffic mode shows two things and says "not measured" for the rest.
Connections to a database. An edge that ends at a PostgreSQL or Valkey database reads N conns, and its line is thicker the more connections the service holds. Hover the edge for the most connections the service held at any reading in the last 30 minutes. A service that holds none reads 0 conns, which is a measurement.
The agent reads the database's own client list once a minute: pg_stat_activity for PostgreSQL, CLIENT LIST for Valkey. It matches each client address to the pods of the services in the same environment. Nothing sits on the network path between two services.
- A connection is counted, not a request or a byte. The edge does not say how busy a connection is.
- A connection opened and closed between two readings is not seen.
- A connection from a job, a build, another cluster or a tool outside your services belongs to no edge. The API reports those together as
otherConnections. - MySQL and MongoDB are not read. Their edges read not measured, and so does a database that has not reported yet, whose agent is older than this view, or whose last reading is more than three minutes old.
Requests to a service. Each card shows RPM, the 5xx share and p95 for the last 30 minutes. These are the requests the cluster's proxy served to the service, the same source as the card numbers above. They count what enters a service, not what it calls. A slot with no reading says why on hover: no public domain, tailnet-only domains, no proxy metrics, no requests in the window, or fewer than 10 requests for a p95.
Everything else is not measured. An edge between two services reads not measured in Traffic mode, because nothing measures traffic between them. Wiring mode is unchanged.
The API operation is getEnvironmentTraffic. The window is 15m, 30m (the default) or 1h.
curl "BASE_URL/api/v1/environments/ENVIRONMENT_ID/traffic?window=30m" \
-H "Authorization: Bearer NEBULA_TOKEN"The reply lists databases (each with sampledAt and otherConnections, or an unreported reason), edges (client from, database to, connections, peak) and services (rpm, errorRate, p95Milli, or unreported with a reason per figure). A figure that is absent was not measured. For a database with a current reading, a client with no edge held no connection.
Opt a worker's metrics in
A worker shows its own numbers (Queue and Jobs/min) after you opt in and the agent scrapes at least one point for either.
Select the service, then Settings. Under Processes, select Edit… on the worker.
Turn on Scrape app-exported metrics for the canvas card. Metrics port and Metrics path appear.
Enter the port. Leave Metrics path empty for /metrics. Select Save process. A toast reads "Saved WORKER_NAME".
If nebula.toml sets the key, the switch and its fields are disabled and a note names the file that sets them. Remove the key from the file to edit it here.
A deployment freezes process settings, so the card changes after the next deployment of the service.
Your process exposes Prometheus text on that port and path:
| Name | Type | Card slot |
|---|---|---|
nebula_queue_depth | gauge | Queue |
nebula_jobs_processed_total | counter | Jobs/min |
Expose either or both. The agent reads the first series of each name, whatever type it declares. It scrapes one pod, the lowest-named, every 15 seconds. A scrape that fails is skipped silently. That covers a timeout over 3 seconds, a refused connection, a non-200 answer, a body over 256 KiB, unparseable text and a redirect, which the agent never follows. A counter that resets on restart skips one point.
The process needs a port, its own or Metrics port. Metrics apply only to a worker. The path must start with / and cannot start with // or contain @, ? or #. The card follows the service's first process by name, so a worker that is not first shows no app numbers. Turning the option off returns the card to Mem and Restarts once the last scraped points leave the card's 30-minute window.
Verify
- Logs: new lines appear and the status reads live.
- Metrics: the cards show values, or a reason after not reported.
- Opt-in: after a deployment and a minute or two, the worker card shows Queue or Jobs/min. If it still shows Mem, open the worker's logs and check that the endpoint answers with Prometheus text.
Next steps
- Processes: set resource limits that the amber thresholds judge against.
- Configure a service from its repository: keep the
[processes.<name>.metrics]table in Git. - HTTP API: authentication, pagination and event streams.
- Get notified about events: hear about failed deployments without watching a tail.
Approve changes and set deploy freezes
Decide pending approvals for protected environments, set the organization's change policy, skip approval for one service, schedule weekly deploy freezes and cap concurrent deployments in a project.
Open a shell and browse files in an instance
Open a terminal in a running instance from the browser, and list, download and upload its files. Covers who may do it, protected environments, the debug container fallback, limits and what is recorded.