No commit activity in last 3 years
No release in over 3 years
Rewrite tags of messages sent by AWS firelens for easy handling.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 1.14
~> 12.0
~> 3.0

Runtime

>= 0.14.10, < 2
 Project Readme

fluent-plugin-firelens-tag-filter

Fluentd output plugin to rewrite tag of message sent by AWS Firelens.

A tag of messages from AWS firelens has format like [containerName]-firelens-[taskID], but a tag of fluentd is a string separated by dots (e.g. myapp.access) usually.

fluent-plugin-firelens-tag-filter rewrites message tags from [containerName]-firelens-[taskID] to [tag_prefix].[containerName].(stdout|stderr).[taskID] by default.

Installation

RubyGems

$ gem install fluent-plugin-firelens-tag-filter

Bundler

Add following line to your Gemfile:

gem "fluent-plugin-firelens-tag-filter"

And then execute:

$ bundle

Configuration

<match *-firelens-*>
  @type firelens_tag_filter
  tag_prefix ecs       # default firelens
</match>

<filter ecs.nginx.stdout.**>
  @type parser
  key_name log
  format ltsv
</filter>

<match ecs.app.**>
  # ...
</match>

Customize tag format.

<match *-firelens-*>
  @type firelens_tag_filter
  tag ${container_name}.${source}
</match>

<match app.stdout>
  # ...
</match>

Placeholders allowed in tag as below.

  • ${container-name} : Container name in task.
  • ${task_id} : ECS task ID
  • ${source} : source field in record (stdout or stderr)

Copyright

  • Copyright(c) 2020- FUJIWARA Shunichiro
  • License
    • Apache License, Version 2.0