Bindplane is excited to join Dynatrace!Learn more
Back to Blueprints

Process NGINX Logs for Elasticsearch

Optimizes NGINX access and error logs for Elasticsearch ingestion via OTLP. Parses the combined log format, filters health check and static asset requests, maps HTTP status codes to OTLP severity levels, masks sensitive data, removes high-cardinality request identifiers, samples successful responses, and deduplicates error bursts.

Included Processors

1

Parse NGINX Combined Log Format

Parses NGINX combined log format extracting IP, timestamp, method, path, status code, response size, referrer, and user agent.

2

Parse NGINX Timestamp

Parses the NGINX timestamp into the log record time field.

3

Filter Health Checks

Drops health check and monitoring endpoint requests.

4

Filter Static Asset Requests

Drops requests for static assets (CSS, JS, images, fonts).

5

Map HTTP Status to Severity

Maps HTTP status codes to OTLP severity levels for Elasticsearch severity-based filtering and alerting.

6

Mask Sensitive Data

Redacts sensitive data from request paths and user information.

7

Add ECS-Compatible Fields

Adds Elastic Common Schema fields for HTTP access log data, enabling compatibility with built-in Kibana web server dashboards.

8

Sample Success Responses

Samples 50% of successful HTTP 2xx response logs to reduce volume.

9

Deduplicate Error Responses

Deduplicates repeated HTTP error logs within a 30-second window.

10

Delete Empty Fields

Removes null and empty values to reduce storage overhead.

Example Telemetry

Log

NameBeforeAfter
observed_time2023-12-25T21:15:30Z2023-12-25T21:15:30Z
time2023-12-25T21:15:30Z2023-12-25T18:15:30Z
severity_textWARN
severity_number013

Body

Changed
203.0.113.45 - - [25/Dec/2023:10:15:30 -0800] "GET /old-page HTTP/1.1" 301 512 "https://www.example.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
http_versionHTTP/1.1
ip****
methodGET
path/old-page
referrerhttps://www.example.com/
response_size512
status_code301
timestamp25/Dec/2023:10:15:30 -0800
user_agentMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36

Attributes

NameBeforeAfter
event.datasetnginx.access
event.kindevent

Resource

NameBeforeAfter
deployment.environmentproduction
service.namenginx

Related Blueprints