# Elastic ES|QL: Nginx integration access streams

Run one query in Kibana Discover with a chosen time range:

| File | Target version | Path handling |
| --- | --- | --- |
| [Decoded hunt](private_configuration_requests_decoded.esql) | Elasticsearch / Kibana 9.2+ | Original request target, split at literal `?`, then decoded once |
| [Literal hunt](private_configuration_requests_literal.esql) | Elasticsearch / Kibana 8.14+ | ECS `url.path` as ingested; no added decode |

Install and configure the [Elastic Nginx integration](https://www.elastic.co/docs/reference/integrations/nginx) to collect access logs into `logs-nginx.access-*`. It is listed at Basic subscription level. You need read access to those streams and permission to use ES|QL. If streams are renamed, replace the `FROM` selector after verifying the dataset. Preview first:

```esql
FROM logs-nginx.access-*
| WHERE event.dataset == "nginx.access"
| KEEP @timestamp, http.request.method, url.original, url.path, user_agent.original, source.ip
| LIMIT 20
```

Confirm single-valued `http.request.method` and the chosen path field. The [Nginx ingest pipeline](https://github.com/elastic/integrations/blob/main/packages/nginx/data_stream/access/elasticsearch/ingest_pipeline/default.yml) extracts the request and applies [uri_parts](https://www.elastic.co/docs/reference/ingest-processor/uri-parts-processor), whose default retains the original target; [ECS URL fields](https://www.elastic.co/docs/reference/ecs/ecs-url) separate the original target, path, and query. Missing fields cannot match. `URL_DECODE` returns null with a warning on failure; review those warnings and original events. The literal fallback has no additional encoded-path coverage guarantee. Its string functions are documented in the [8.14 reference](https://www.elastic.co/guide/en/elasticsearch/reference/8.14/esql-functions-operators.html).

The query retains source columns and adds `hunt_path`; inspect `event.original`, `user_agent.original`, receiving-server context, status, and source address. The 10,000-row cap requires narrower windows when reached. [ENDS_WITH](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/string-functions/ends_with) compares literal suffixes; [URL_DECODE](https://www.elastic.co/docs/reference/query-languages/esql/functions-operators/string-functions/url_decode) supports the decoded variant. Read common [compatibility limits](../README.md#match-scope-and-compatibility), including the address-list warning.
