Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

SandboxDecoder / nginx_access.lua doesn't work with SSL log #1974

Description

@wwalker

Using the SandboxDecoder with nginx_access.lua, our logs don't parse. nothing comes out.
I can parse the same data with the PayloadRegexDecoder and it works.

Using 0.10.0 from the RPM on my workstation and from the .deb on my server. Both fail the same way. silently don't write anything to the output from nginx, but do write things from heka.{memstats,statmetrics,all-report}

This is my config:

  [hekad]
  maxprocs = 8

  [Dashboard]
  type = "DashboardOutput"
  address = ":4352"
  ticker_interval = 15

  [TestWebserver]
  type = "LogstreamerInput"
  log_directory = "/var/log/nginx"
  file_match = 'access\.log'
  decoder = "CombinedLogDecoder"

  [CombinedLogDecoder]
  type = "SandboxDecoder"
  filename = "lua_decoders/nginx_access.lua"

  [CombinedLogDecoder.config]
  type = "combined"
  user_agent_transform = true
  # combined log format
  #log_format = '$remote_addr - $remote_user [$time_local $time_zone] $server_port $ssl_protocol/$ssl_cipher $upstream_addr "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" -- [$request_time]'
  log_format = '$remote_addr - $remote_user [$time_local] $server_port $ssl_protocol/$ssl_cipher $upstream_addr "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" -- [$request_time]'

  [ESJsonEncoder]
  index = "%{Type}-%{%Y.%m.%d}"
  es_index_from_timestamp = true
  type_name = "%{Type}"
      [ESJsonEncoder.field_mappings]
      Timestamp = "@timestamp"
      Severity = "level"

  [ElasticSearchOutput]
  server = "http://10.20.30.50:9200"
  flush_interval = 5000
  flush_count = 10
  encoder = "ESJsonEncoder"
  message_matcher = "TRUE"

This is some log data:
10.20.30.40 - - [01/Aug/2016:06:31:59 +0000] 8443 TLSv1/DHE-RSA-AES256-SHA 10.20.30.40:8443 "POST /api/v2/samples HTTP/1.1" 200 446 "-" "Ruby" -- [0.078]
10.20.30.40 - - [01/Aug/2016:06:31:59 +0000] 8443 TLSv1/DHE-RSA-AES256-SHA 10.20.30.40:8443 "POST /api/v2/samples/state HTTP/1.1" 200 4161 "-" "Ruby" -- [0.054]
10.20.30.40 - - [01/Aug/2016:06:32:03 +0000] 8443 TLSv1/DHE-RSA-AES256-SHA 10.20.30.40:8443 "GET /api/v2/samples/2130a46fddf4fde50b7ff0d64f6d9706/video.webm?api_key=REdactED HTTP/1.1" 200 256537 "-" "Ruby" -- [8.951]
10.20.30.40 - - [01/Aug/2016:06:32:03 +0000] 8443 TLSv1/DHE-RSA-AES256-SHA 10.20.30.40:8443 "GET /api/v2/samples/4a62f6ba29c285a0afc7430922dfac07/video.webm?api_key=REdactED HTTP/1.1" 200 39615 "-" "Ruby" -- [4.038]
10.20.30.40 - - [01/Aug/2016:06:32:03 +0000] 8443 TLSv1/DHE-RSA-AES256-SHA 10.20.30.40:8443 "GET /api/v2/samples/2130a46fddf4fde50b7ff0d64f6d9706/processes.json?api_key=REdactED HTTP/1.1" 200 583852 "-" "Ruby" -- [0.390]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions