Append a field to your logs that you can ingest directly into elasticsearch with no dissect or parsing magic

Usage:

In your services file you append it as a monolog processor. So for example if your service parameters look like this:

parameters:
  monolog.channel_handlers:
    default: ['file']
  monolog.processors: ['message_placeholder', 'current_user', 'request_uri', 'ip', 'referer']

Change it to this:

parameters:
  monolog.channel_handlers:
    default: ['file']
  monolog.processors: ['message_placeholder', 'current_user', 'request_uri', 'ip', 'referer', 'elasticsearch_date']

This will give you an additional field called extra.elasticsearch_date. If you are sending this field directly to elasticsearch from filebeat, you can use it like this (example):

processors:
      - timestamp:
          ignore_missing: true
          ignore_failure: true
          field: extra.elasticsearch_date
          timezone: "Europe/Oslo"
          layouts:
            - '2006-01-02T15:04:05Z'
            - '2020-06-02T13:20:50.516Z'
          test:
            - '2019-06-22T16:33:51Z'
            - '2020-06-02T13:20:50.516Z'
Supporting organizations: 
Development and maintenance
Development and maintenance

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Ecosystem: Monolog
  • chart icon40 sites report using this module
  • Created by eiriksm on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases