Know why Nginx answers 502, and which server causes it.
WatchLog reads Nginx’s access and error logs on the machine and turns them into metrics there: status codes, latency, sites, URLs and upstreams, on Kubernetes and on plain Linux servers. When a 502 starts, it names the upstream server behind it.
No user, no module. No log line leaves the machine. Open source.

A 502 is the symptom.
WatchLog shows the cause.
It reads the logs where they are
Open-source Nginx tells almost nothing: stub_status has connection and request totals. WatchLog’s agent reads the access and error logs on the machine and turns each line into numbers there. No log line leaves it, none is stored.
It names the server behind a 502
“502 because server 10.0.3.14:3000 of upstream cart refuses connections.” The cause comes from the error log, and the address is named by the workload behind it: a Deployment, a systemd service or a container.
It sees where clients give up
“Clients give up (499) on /search: its p95 is 9 s.” URLs become patterns like /orders/{id} on the machine, so one slow endpoint stands out from the rest of the traffic.
Sites, URLs, upstreams, errors, latency, clients.
Request flow
Requests in, Nginx, upstreams and responses in one strip, with the finding first, six tiles against their usual and health checks. Every tab filters by site.
Sites and URLs
Each server name with its requests, 5xx, 4xx, 499, p95, bandwidth and certificate. Every URL as a pattern: the slowest, the largest and where clients give up.
Upstreams
Each upstream with its servers side by side: requests, 5xx, response and connect time, retries and the last rollout. Each address named by the workload behind it.
Errors, with why
502, 504, 499, rate limited, 404s from scanners and dropped connections, and why from the error log: refused, timed out, no live upstreams, worker_connections, limit_req.
Latency
The request time distribution, p50, p95 and p99, and where the time goes: connecting, waiting for the backend, sending. The slowest URLs and upstreams.
Clients, cache, workers, TLS
The busiest addresses, crawlers and scanners; the cache hit share against the day before; connections against worker_connections and failed reloads; TLS versions and certificates.
On from the first minute.
Press Monitor and these are created; you tick the ones that start on. Each goes to Slack, Telegram, email or a webhook, and says what, where and which upstream.
- More than 5 % of requests answer 5xx for 5 minutescritical
- An upstream with no server answeringcritical
- A reload or start failscritical
- p95 over twice its usual for 10 minuteswarning
- Nginx drops connectionswarning
- A certificate expires within 14 dayswarning
- Rate-limit rejections above the usual for 10 minuteswarning
One click. No user, no module.
- Install the WatchLog agentOne command on a server, or one Helm chart on a cluster.
- WatchLog finds NginxNginx, OpenResty, Angie or ingress-nginx, from the processes, images and ports the agent already sees. It appears under Applications.
- Press MonitorNo user, no password, no module. The default combined format is enough; the page and its alerts start at once.
# Optional, in the http block: latency, upstream timings, cache shares
log_format watchlog '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" "$http_user_agent" '
'rt=$request_time uct=$upstream_connect_time uht=$upstream_header_time '
'urt=$upstream_response_time ua="$upstream_addr" us="$upstream_status" '
'cs=$upstream_cache_status sn="$server_name" rl=$request_length '
'bs=$bytes_sent scheme=$scheme tls=$ssl_protocol uh="$proxy_host"';
access_log /dev/stdout watchlog;
# then roll the Deployment out; ingress-nginx is read as it is# Optional, in the http block: latency, upstream timings, cache shares
log_format watchlog '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" "$http_user_agent" '
'rt=$request_time uct=$upstream_connect_time uht=$upstream_header_time '
'urt=$upstream_response_time ua="$upstream_addr" us="$upstream_status" '
'cs=$upstream_cache_status sn="$server_name" rl=$request_length '
'bs=$bytes_sent scheme=$scheme tls=$ssl_protocol uh="$proxy_host"';
access_log /var/log/nginx/access.log watchlog;
# then check and reload it yourself
docker exec shop-nginx-1 sh -c "nginx -t && nginx -s reload"Optional. The default combined format already gives requests, status codes, 499s, sites, URLs, clients and the error log’s causes. This line adds latency, upstream timings and cache shares; it starts with combined, so other tools that read the log keep working. You reload Nginx yourself.
Installed with apt or dnf on a Linux server? WatchLog finds it by its unit’s name and reads the log files its configuration names. It never writes the configuration, reloads Nginx or opens a private key. Applications on Linux servers.
Against an exporter, or shipping the logs.
| What | WatchLog | An exporter, or a log pipeline you run |
|---|---|---|
| Time to the first chart | Minutes | Hours: an exporter or a log pipeline, then dashboards |
| Status codes, latency, URLs | From the logs, counted on the machine | Not in stub_status; a log pipeline you run |
| Why a 502 | From the error log, the server named | The error log, searched by hand |
| Where log lines go | Nowhere: counted, then dropped | To a log store, kept and paid for |
| Default alerts | Seven, written for you | Rules you write |
| Works on plain Linux servers | Yes, and Kubernetes | Depends on your setup |
| Reads query strings and cookies | Never | Whatever the log holds |
Ask your AI about Nginx.
Claude and ChatGPT read the same facts through WatchLog’s MCP server, read-only: the status codes and where they come from, the error log’s causes, the slowest URL patterns and each upstream’s servers.
Connect your assistant →Why are users getting 502s?
get_application · explain_problem
7 % of requests through nginx answer 502. The error log says why: server 10.0.3.14:3000 of upstream cart refuses connections. That address is a pod of shop/cart, rolled out 2 minutes ago.
Nginx monitoring, answered.
- Which Nginx does it work with?
- Nginx, OpenResty, Angie and ingress-nginx, installed from a package or from source on a Linux server, in Docker or on Kubernetes. It needs no module, no NGINX Plus and no VTS.
- Does WatchLog collect my Nginx logs?
- No. The agent reads the access and error logs on the machine and turns each line into counts, sums, latency histograms and short top lists there. Then the line is dropped: no log line leaves the machine and none is stored.
- What does it never read?
- Query strings, cookies, headers and bodies. URLs become patterns inside the agent, like /orders/{id}; a user agent becomes one of six classes; an error-log line becomes a cause from a fixed list. It never opens a private key.
- What happens to client addresses?
- WatchLog keeps the 50 busiest per site for 24 hours, so the Clients tab can name a scanner or the address that sends 38 % of the traffic. An Owner or Admin can shorten them to their networks, or keep none.
- Do I have to change the Nginx configuration?
- No. The default combined format gives requests, status codes, 499s, sites, URLs, clients and the error log’s causes. One log_format line adds latency, upstream timings and cache shares; you reload Nginx yourself. WatchLog never writes the configuration.
- Does it work with ingress-nginx?
- Yes. Its own metrics stay the source for requests, 5xx, latency, upstreams and certificates when they are on; the log adds URLs, clients and the error log’s causes. On Kubernetes WatchLog reads the pod’s output, never its ConfigMap.
- What does it cost on the machine?
- Measured with the whole agent on one core of a small VM: 2.2 % of the core at 1,000 log lines a second and 8 % at 20,000, with about 30 MiB of memory. Above 20,000 lines a second it samples, and says how much.
- Is it free?
- The open-source edition is free without limits. WatchLog Cloud is free for 5 servers or nodes.
Other applications WatchLog monitors
See your own Nginx in five minutes.
Free on WatchLog Cloud for 5 servers or nodes, or run it yourself, open source.