Logit.io
Nginx logs: 5xx spikes, slow upstreams and noisy clients
← Back to blog
11/23/2026 · 22 min read

Nginx logs: 5xx spikes, slow upstreams and noisy clients

Logit.io Team
Logit.io Team
Technical Content Team

Last updated 11/23/2026

Log ManagementHow To GuidesOpensearch

To explain an Nginx 5xx spike, read the access log and the error log side by side: the access log tells you which status, path and upstream, and the error log tells you why Nginx gave up. Slow upstreams need one change first, because the default combined log format records no timings, so you add a JSON log_format with $request_time, $upstream_addr and $upstream_response_time. Logit.io's Dashboard Library has two Nginx packs for this, one for the Filebeat nginx module and one for JSON access logs, and together they cover 5xx spikes, slow upstreams and noisy clients.

This guide is the working version of that answer. You will change one line of Nginx configuration, ship two logs with Filebeat, prove the whole path with a throwaway test server on localhost, install the dashboards, and then work through three real problems: a burst of 502 and 504 responses, one upstream that has started to drag, and a client that is sending far more than its share. Each section names the exact fields and queries the dashboards use, so you can reproduce any panel in Discover or turn it into an alert.

If you want the background on how the Library decides which Nginx dashboards to tick for you, read Dashboard Library: why some dashboards arrive ticked and others don't. This post assumes the dashboards are there and focuses on reading them during an incident.

Contents

Three questions and where each answer lives

Most Nginx incidents start as one of three questions. Each one has a home log, a field to group by and a dashboard that already does the grouping. The two packs are Nginx, which reads Filebeat nginx module data, and Nginx (JSON logs), which reads an access log that Filebeat decodes into the logjson object.

QuestionWhere the answer livesFields to group byDashboard
Why are we returning 5xx?The access log for which requests and which upstream, the error log for the reasonlogjson.status, logjson.upstream_addr, log.level, messageLogit.io Nginx JSON HTTP 5xx errors, then Logit.io Nginx error logs
Which upstream is slow?A JSON access log with timing variables. The default log has none.logjson.request_time, logjson.upstream_addr, logjson.upstream_response_timeLogit.io Nginx JSON slow requests
Who is hammering us?The access log, once the client address is the real one and not your load balancerlogjson.remote_addr, logjson.http_user_agentLogit.io Nginx JSON high request rate clients

The Nginx (Filebeat module) pack has its own 5xx and high request rate dashboards built on http.response.status_code and source.ip. They are the right choice if you keep the combined access log. What the module pack cannot have is a slow request view, because the combined format has nothing to measure.

Why a stock access log can't show slow upstreams

Nginx's predefined combined format writes the client address, user, time, request line, status, bytes sent, referrer and user agent. There is no duration of any kind, so any "slow upstreams" dashboard has to start with a log format change on the server. That is the honest cost of this post: you edit Nginx configuration and reload it.

These are the variables that matter, all documented in the ngx_http_log_module and ngx_http_upstream_module references:

VariableWhat it measuresWhat to watch for
$request_timeSeconds, to the millisecond, from the first byte read from the client until the log line is writtenIncludes time spent uploading the request body and sending the response to a slow client
$upstream_response_timeSeconds spent receiving the response from the upstreamA list when Nginx tried more than one server, for example 0.000, 3.009. Empty when no upstream was involved.
$upstream_addrThe address of the upstream server, or servers, that handled the requestAlso a list on retries, matching the times above in order
$statusThe status sent to the clientFor proxied requests this can be the upstream's own status or one Nginx generated

The gap between the two times is useful. When $request_time is high and $upstream_response_time is low, the backend answered quickly and the time went on the client side, typically a slow mobile connection or a large download. When both are high together, the upstream is the problem.

Set up Nginx and Filebeat

Two Nginx logs take two paths to your Logs stack: the error log goes through the Filebeat nginx module and the nginx-error pipeline into log.level and message for the Nginx error logs dashboard, while a JSON access log is decoded by Filebeat into logjson fields such as status, request_time and upstream_addr for the Nginx (JSON logs) 5xx, slow request and client dashboards

The setup below was tested with Nginx 1.26.3 and Filebeat 8.15.2. The escape=json parameter needs Nginx 1.11.8 or later, so any supported distribution package is fine.

Step 1: add a JSON access log

Use exactly this format. The field names are the ones the Nginx (JSON logs) dashboards query, and status, bytes_sent and request_time are deliberately left unquoted so they arrive as numbers. upstream_response_time stays quoted because it can be a comma-separated list, and no panel averages it.

# /etc/nginx/conf.d/logjson.conf  (inside the http {} context)
log_format logjson escape=json '{"time_iso8601":"$time_iso8601","remote_addr":"$remote_addr",'
  '"request_method":"$request_method","request_uri":"$request_uri","status":$status,'
  '"bytes_sent":$bytes_sent,"request_time":$request_time,"http_host":"$http_host",'
  '"http_user_agent":"$http_user_agent","upstream_addr":"$upstream_addr",'
  '"upstream_response_time":"$upstream_response_time"}';

access_log /var/log/nginx/access.json.log logjson;

The access_log directive can appear more than once in the same context. If you still want the module pack's access map, top paths and source IP breakdowns, keep your existing combined access_log line next to the new one and Nginx writes both files. If disk space matters more, replace it. Test and reload, then look at the newest line:

sudo nginx -t && sudo systemctl reload nginx
sudo tail -n 1 /var/log/nginx/access.json.log

A line through a proxied location looks like this (illustrative, from a local test server):

{"time_iso8601":"2026-11-23T09:32:33+00:00","remote_addr":"127.0.0.1","request_method":"GET","request_uri":"/logit-test/slow","status":200,"bytes_sent":148,"request_time":2.001,"http_host":"127.0.0.1:8088","http_user_agent":"curl/8.5.0","upstream_addr":"127.0.0.1:8099","upstream_response_time":"2.001"}

Step 2: make the client address real

Behind a load balancer or CDN, $remote_addr is the load balancer, and every client dashboard will show one address doing all the traffic. The realip module fixes that in Nginx itself, so both the JSON log and the combined log carry the original client:

# Trust only the addresses your load balancers really use
set_real_ip_from 10.0.0.0/8;
real_ip_header X-Forwarded-For;
real_ip_recursive on;

Only list ranges you control in set_real_ip_from. Trusting everything lets any client forge its address with a header.

Step 3: ship the error log with the nginx module

Start with the Nginx integration guide, which installs Filebeat and gives you the output settings for your Logs stack. Then set the module so it reads the error log, and the access log only if you kept the combined file. This example assumes you replaced it:

# /etc/filebeat/modules.d/nginx.yml
- module: nginx
  access:
    enabled: false        # the JSON access log is read by the input below
  error:
    enabled: true
    # var.paths:
    #   - /var/log/nginx/error.log*
  ingress_controller:
    enabled: false

Leave ingress_controller off on a plain Nginx server. Its default path is the same /var/log/nginx/access.log*, and turning it on reads each access line twice. If you kept the combined log, set access.enabled: true as the integration guide shows.

Step 4: read the JSON log with a filestream input

Keep the modules block from the integration guide and add only this filebeat.inputs entry. It reads the JSON file and decodes each line into logjson with decode_json_fields. The timestamp processor sets @timestamp from the time Nginx wrote, rather than the time Filebeat read the line. That matters on the first run, when Filebeat backfills an existing file and would otherwise stamp hours of old requests with the current minute. The glob picks up rotated files such as access.json.log.1, and exclude_files skips the compressed .gz rotations.

# /etc/filebeat/filebeat.yml: keep the modules and output settings from the
# integration guide and add only this filebeat.inputs entry. If the file already
# has a filebeat.inputs list, add the "- type: filestream" item to that list.
filebeat.inputs:
  - type: filestream
    id: nginx-json-access
    paths:
      - /var/log/nginx/access.json.log*
    prospector.scanner.exclude_files: ['\.gz$']
    processors:
      - decode_json_fields:
          fields: ["message"]
          target: "logjson"
          add_error_key: true
      - timestamp:
          field: logjson.time_iso8601
          layouts: ['2006-01-02T15:04:05Z07:00']
          test: ['2026-11-23T09:32:31+00:00']
      - rename:
          fields:
            - from: "message"
              to: "event.original"
          ignore_missing: true
          fail_on_error: false

The rename step moves the raw line out of message. Your stack's Logstash parses any message that starts with { as JSON into top-level fields, so without it each request's fields would be stored twice in the same document.

Check the configuration and the connection, then restart:

sudo filebeat test config
sudo filebeat test output
sudo systemctl restart filebeat

Running in containers instead? Nginx images usually log to stdout, so write the same logjson format to /dev/stdout and apply the decode_json_fields processor in your container log shipper. The Kubernetes container logs guide covers the shipper side, and the Docker and Kubernetes integration pages have the base configuration.

Prove it with a test server

Waiting for a real outage to see whether the slow request panel works is a poor test. Instead, add a server block bound to localhost that produces a slow request, a timeout and a refused connection on demand. Remove it when you have finished.

# /etc/nginx/conf.d/logit-test.conf  (test server on localhost only; remove it afterwards)
server {
    listen 127.0.0.1:8088;

    # 2-second upstream for the slow request test
    location /logit-test/slow    { proxy_pass http://127.0.0.1:8099; }
    # Same upstream, but Nginx gives up after 1 second: a 504
    location /logit-test/timeout { proxy_read_timeout 1s; proxy_pass http://127.0.0.1:8099; }
    # Nothing listens on 8098: a 502
    location /logit-test/down    { proxy_pass http://127.0.0.1:8098; }
}

The slow upstream is a few lines of Python:

# slow_upstream.py: answers every GET after 2 seconds (Python 3.8 or later)
import http.server, time

class Slow(http.server.BaseHTTPRequestHandler):
    def do_GET(self):
        time.sleep(2)
        self.send_response(200)
        self.end_headers()
        self.wfile.write(b"slow ok\n")

http.server.HTTPServer(("127.0.0.1", 8099), Slow).serve_forever()

Start it, reload Nginx and send four requests, one of which hits a path that doesn't exist:

python3 slow_upstream.py &
sudo nginx -t && sudo systemctl reload nginx

for p in /logit-test-missing /logit-test/slow /logit-test/timeout /logit-test/down; do
  curl -s -o /dev/null -w "%{http_code} $p\n" "http://127.0.0.1:8088$p"
done

Illustrative output from a local test server:

404 /logit-test-missing
200 /logit-test/slow
504 /logit-test/timeout
502 /logit-test/down

The 502 and 504 also write error log lines. These are the reasons the access log can't give you (illustrative, local test server):

2026/11/23 09:32:33 [error] 3256#3256: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /logit-test/down HTTP/1.1", upstream: "http://127.0.0.1:8098/logit-test/down", host: "127.0.0.1:8088"
2026/11/23 09:32:34 [error] 3256#3256: *7 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: , request: "GET /logit-test/timeout HTTP/1.1", upstream: "http://127.0.0.1:8099/logit-test/timeout", host: "127.0.0.1:8088"

Within a minute or two, search Discover on filebeat-* with these two queries. The first should return the JSON documents with logjson.request_time just over 2 seconds for the slow request and just over 1 second for the timeout. The second should return both error lines with log.level set to error. The queries in this post use Lucene syntax, such as _exists_ and ranges, so switch the Discover query bar language from DQL to Lucene first.

_exists_:logjson.request_uri AND logjson.request_uri:\/logit-test*

event.dataset:nginx.error AND (message:"connect() failed" OR message:"upstream timed out")

If the first query returns nothing, check for lines that failed to decode. add_error_key puts JSON decoding failures in error.message, and those documents have no logjson fields at all, so search on the file path instead, or on _exists_:error.message across the index:

log.file.path:"/var/log/nginx/access.json.log" AND _exists_:error.message

The usual cause is a hand-edited log_format with a stray quote.

Install both packs

Open the Dashboard Library from your Logs stack, scan and look for both Nginx entries. The Nginx pack is detected from event.module:nginx, and its error logs dashboard is ticked once nginx.error events exist. The Nginx (JSON logs) pack is detected from logjson.request_uri, logjson.request_time or logjson.upstream_response_time on documents that are not module events, so running both side by side is fine. If you have just finished the test above, press Rescan stack to see the new data.

PackDashboardsBase filter
NginxWeb activity, HTTP 4xx errors, HTTP 5xx errors, high request rate clients, error logs, web request investigationevent.module:nginx AND agent.type:filebeat, with event.dataset:(nginx.access OR nginx.ingress_controller) on the access dashboards and event.dataset:nginx.error on the error logs dashboard
Nginx (JSON logs)Web activity, HTTP 4xx errors, HTTP 5xx errors, slow requests, high request rate clients, request investigation_exists_:logjson.request_uri AND NOT _exists_:logjson.controller

For this guide you need three dashboards from the JSON pack and one from the module pack: JSON HTTP 5xx errors, JSON slow requests, JSON high request rate clients and Nginx error logs. Install the rest if they are useful. Library dashboards install next to anything you have built and don't change it.

5xx spikes: let the error log say why

Logit.io Nginx JSON HTTP 5xx errors dashboard on demo data showing a 5xx count tile, a 5xx over time chart, Upstreams and Paths donuts and a table of 5xx requests with method, URI, status, client address and request time

Logit.io Nginx JSON HTTP 5xx errors, shown on demo data.

The JSON 5xx dashboard answers "which": a count and trend of responses with logjson.status from 500 to 599, an Upstreams donut on logjson.upstream_addr, a Paths donut on logjson.request_uri, and a table of the requests themselves. The first thing to look at is the Upstreams donut. If one address owns the slice, you have a backend problem. If the biggest slice is Unknown or blank, Nginx produced the error without talking to an upstream at all.

Then open the Nginx error logs dashboard for the same time range. It shows error event counts, hosts and log levels, and a table of @timestamp, event.dataset, log.level, host.name and message. Its HTTP requests and HTTP 4xx tiles count module access events, so they read 0 once you turn the access fileset off. Use the JSON pack for those numbers.

Here is how the common 5xx statuses map to error log text:

StatusError log text to search forUsual meaning
502connect() failed (111: Connection refused)Nothing listening on the upstream port. The app is down or restarting.
502no live upstreamsEvery server in the upstream group is marked failed
502upstream prematurely closed connectionThe app crashed or closed the socket mid-response
504upstream timed out (110: Connection timed out)The upstream accepted the request but didn't answer within proxy_read_timeout (60s by default)
503 or your limit_req_statuslimiting requests, excess:Your own rate limit rejected the request. See the noisy clients section.
500 from the appUsually nothingNginx passed through the upstream's own 500. The reason is in the application's logs, not Nginx's.

That last row is the one that catches people out. The error log only explains errors Nginx made itself. A 500 with an upstream address and a normal upstream_response_time is your application talking, and the next step is the app's logs for the same minute.

To tie the two logs together for one backend, filter the access log on the upstream and search the error log for the same address. The error log writes the upstream as a URL, and a phrase query on the address finds it:

_exists_:logjson.request_uri AND logjson.status:[500 TO 599] AND logjson.upstream_addr:"10.0.1.22:8080"

event.dataset:nginx.error AND message:"10.0.1.22:8080"

On a retry, logjson.upstream_addr holds both servers, such as 10.0.1.21:8080, 10.0.1.22:8080, and the first query won't match that document exactly. Retries also leave a [warn] line such as upstream server temporarily disabled, which is often the first sign of a backend going bad before clients see any 5xx at all.

Status 499 isn't a 5xx and doesn't appear on this dashboard. It is Nginx's code for "the client closed the connection before we answered", so it shows on the JSON HTTP 4xx dashboard. A rise in 499 alongside slow requests usually means clients gave up waiting, and the slow requests dashboard is where to look next.

Slow upstreams: request_time vs upstream_response_time

Logit.io Nginx JSON slow requests dashboard on demo data showing slow request count, mean and longest request time tiles, a slow requests over time chart, Paths and Upstreams donuts and a table of slow requests

Logit.io Nginx JSON slow requests, shown on demo data.

The slow requests dashboard defines slow as logjson.request_time:[1 TO 3600], one second or more. The Slow requests tile, the trend, both donuts and the table use that filter. Mean request time and Longest request read every request in the time range, not only the slow ones, which is why the mean can sit well under a second while the count is high. Read them as "how bad is the tail compared with normal".

Work through it in this order:

  1. Check the trend. A step up at one time points to a deploy or a dependency. A slow climb points to load or a resource filling up.
  2. Look at the Upstreams donut. One address dominating means one backend instance is slow, which is a different fix from every backend being slow.
  3. Open a few rows and compare logjson.request_time with logjson.upstream_response_time. Close together means the upstream. Far apart means the client side or a large response.
  4. Check the Paths donut for a single endpoint, such as an export or a report, that is slow by design and needs its own threshold.

To focus on one backend, use the same filter in Discover and add logjson.upstream_response_time as a column:

_exists_:logjson.request_uri AND logjson.request_time:[1 TO 3600] AND logjson.upstream_addr:"10.0.1.22:8080"

Two things in the data are worth knowing before you trust the numbers:

  • Blank upstreams. With escape=json, requests that never reached an upstream, such as static files and Nginx's own errors, log "upstream_addr":"". The Upstreams donuts group that as an empty value, and on a site that serves static files it can be the largest slice. It isn't a backend.
  • Whole-number request times. $request_time is often exactly 0.000 for cached or static responses, and JSON decoding turns that into the number 0. If the first document in a new daily index carries that value, the field can be mapped as a whole number type for the day and the decimals are dropped. In our local test, that is what happened: the slow count stayed right, because the threshold is whole seconds, but the mean and longest tiles lost their fractions. If the field shows as a long rather than a float in the index pattern, contact Logit.io support about mapping logjson.request_time as a float. Index templates only apply when an index is created, so a fix shows from the next daily index onwards.

Noisy clients: find them, then limit them

Logit.io Nginx JSON high request rate clients dashboard on demo data showing request, 4xx and 5xx count tiles, a requests over time chart, Client addresses and User agents donuts and a table of client requests

Logit.io Nginx JSON high request rate clients, shown on demo data.

The high request rate clients dashboard groups requests by logjson.remote_addr and logjson.http_user_agent, with request, 4xx and 5xx counts across the top. A healthy site has a long tail of clients. Worry when one address takes a large slice of the Client addresses donut, and look harder when the same address also lifts the 4xx tile, because a client probing paths that don't exist is usually a scanner, not a customer.

Before you block anything, check the address isn't your own: a monitoring check, a health probe or a load balancer that slipped past the realip settings. Then filter the table on the address and look at logjson.request_uri. Scanners request things like /wp-login.php and /.env on sites that have neither.

The limit_req module is the usual answer for one client sending too much. This allows ten requests a second per address with short bursts, and returns 429 instead of the default 503 so rate limiting doesn't look like an outage on the 5xx dashboard:

# http {} context: 10 requests a second per client address, short bursts allowed
limit_req_zone $binary_remote_addr zone=perip:10m rate=10r/s;

# server {} or location {} context
limit_req zone=perip burst=20 nodelay;
limit_req_status 429;

Every rejected request also writes an error line at error level, which you'll see on the Nginx error logs dashboard (illustrative):

2026/11/23 09:32:37 [error] 3256#3256: *14 limiting requests, excess: 20.985 by zone "perip", client: 192.0.2.44, server: shop.example.com, request: "GET /search?q=x HTTP/1.1", host: "shop.example.com"

Set the rate from what the clients dashboard shows normal clients doing, not from a guess. Too tight and you reject real customers on a busy page. If many legitimate users share one address, such as an office behind NAT, a per-address limit will hit all of them together.

Turn the dashboards into alerts

Dashboards help when someone is looking. Alerts cover the rest of the time. The rules below are for Logit.io alerting and use the same fields and filters as the panels. Replace the email addresses, then use Test only before enabling each rule, and tune the thresholds to your traffic.

A percentage match rule on the share of 5xx per site is more useful than a raw count, because it doesn't fire every time traffic grows:

name: Nginx 5xx share above 5% per site
type: percentage_match
index: "filebeat-*"
buffer_time:
  minutes: 10
filter:
  - query:
      query_string:
        query: "_exists_:logjson.request_uri AND NOT _exists_:logjson.controller"
query_key: logjson.http_host
match_bucket_filter:
  - range:
      logjson.status:
        gte: 500
        lte: 599
max_percentage: 5
min_denominator: 50
realert:
  minutes: 30
alert:
  - "email"
email:
  - "[email protected]"

A frequency rule with query_key on logjson.upstream_addr tells you which backend has started to drag. The filter leaves out requests with a blank upstream:

name: Slow requests piling up behind one upstream
type: frequency
index: "filebeat-*"
num_events: 30
timeframe:
  minutes: 10
query_key: logjson.upstream_addr
filter:
  - query:
      query_string:
        query: "_exists_:logjson.request_uri AND logjson.request_time:[1 TO 3600] AND _exists_:logjson.upstream_addr AND NOT logjson.upstream_addr:\"\""
realert:
  minutes: 30
alert:
  - "email"
email:
  - "[email protected]"

Another frequency rule, keyed on logjson.remote_addr, finds one client sending far more than normal. Set num_events well above what your busiest legitimate client does in five minutes:

name: One client sending 3,000 or more requests in 5 minutes
type: frequency
index: "filebeat-*"
num_events: 3000
timeframe:
  minutes: 5
query_key: logjson.remote_addr
filter:
  - query:
      query_string:
        query: "_exists_:logjson.request_uri AND NOT _exists_:logjson.controller"
realert:
  minutes: 60
alert:
  - "email"
email:
  - "[email protected]"

A spike rule on the error log catches errors before they show up as a 5xx share, for example retries starting to fail over:

name: Nginx error log spike
type: spike
index: "filebeat-*"
spike_height: 3
spike_type: up
timeframe:
  minutes: 15
threshold_cur: 20
filter:
  - query:
      query_string:
        query: "event.module:nginx AND event.dataset:nginx.error AND log.level:(error OR crit OR alert OR emerg)"
alert:
  - "email"
email:
  - "[email protected]"

If a rule should fire when logs stop arriving, use a flatline rule on the base access filter. An Nginx server that has gone quiet looks exactly like a healthy one on every dashboard above.

When the numbers look wrong

SymptomLikely causeFix
JSON dashboards empty, module ones fineThe filestream input isn't reading the file, or target isn't logjsonCheck the path and run filebeat test config. Search for _exists_:logjson.request_uri.
Documents from the JSON file have no logjson fieldsThe line isn't valid JSONSearch log.file.path:"/var/log/nginx/access.json.log" or _exists_:error.message, read error.message and fix quoting in log_format
Mean and longest tiles empty, slow count oddrequest_time is quoted, so it arrives as text and ranges compare it as a stringRemove the quotes around $request_time in log_format
Every request from one addressThe load balancer address is being loggedConfigure set_real_ip_from and real_ip_header
Request counts doubledThe ingress_controller fileset is on, or two inputs read the same fileTurn off ingress_controller and check each path is read once
A burst of old requests timestamped nowNo timestamp processor, so Filebeat used read timeAdd the timestamp processor on logjson.time_iso8601
Paths donut has hundreds of tiny slices$request_uri includes query stringsFilter to a path prefix, or log $uri in a separate field for grouping

What these packs don't cover

  • Percentiles. The slow requests view counts requests over one second and shows the mean and maximum. There is no p95 or p99 panel. You can build one in OpenSearch Dashboards with a percentiles aggregation on logjson.request_time.
  • ingress-nginx. The Kubernetes ingress controller logs a different format. The JSON pack excludes documents with logjson.controller so the two don't mix.
  • Connection metrics. Active connections and the other stub_status counters are metrics, not logs, and aren't on these dashboards.
  • Personal data. Client addresses, user agents and query strings can identify people. Decide how long you need them, and drop or mask fields you don't need before they leave the server.
  • Synthetic data. The JSON pack was built and checked on synthetic data in the format above. If your log format differs, expect to adjust field names or queries.
Start Free Trial

Unlock complete visibility with hosted ELK, Grafana, and Prometheus-backed Observability

Start Free Trial

FAQ

Do I need both Nginx packs?

No. If you only want the error log and your existing combined access log, the Nginx pack covers 5xx and noisy clients but not slow requests. If you only want the JSON access log, the Nginx (JSON logs) pack covers all three access-side questions, and you lose the error log reasons. Most teams run both, because the error log is where 502 and 504 explanations live.

Can I add $request_time to the end of the combined format instead?

You can, and the module's access pipeline still parses the line. It ignores the extra fields, though, so the timings never become searchable fields. The JSON format is the way to get timings onto the dashboards without writing your own parser.

Can I change what counts as a slow request?

The installed dashboard uses one second. You can edit the query on the installed panels, or save a copy, with a different range such as logjson.request_time:[0.5 TO 3600]. Saving a copy under a new name is safer, because reinstalling from the Library may replace an edited panel.

Why is upstream_response_time a string?

When Nginx tries more than one upstream server, the variable holds a list such as 0.000, 3.009, which isn't a number. Keeping it quoted means every line decodes. Use logjson.request_time for maths and read upstream_response_time when you inspect individual requests.

Does this work in Docker or Kubernetes?

Yes. Write the same JSON format to stdout and decode it into logjson in your container log shipper. The Kubernetes container logs guide covers that side. For the Kubernetes ingress controller itself, see the note on ingress-nginx above.

Is this available in the free trial?

Yes. The free trial includes the Dashboard Library, alerting and the Hosted OpenSearch MCP server, which works with any MCP-compatible client, so you can ask an assistant "which upstream had the most slow requests in the last hour" against the same logjson fields.

Next steps

Get the latest Elastic Stack & logging resources when you subscribe

Want to see this in action?
Start a free trial and connect logs to your alert workflows.