Skip to content

Instantly share code, notes, and snippets.

View pietervogelaar's full-sized avatar

Pieter Vogelaar pietervogelaar

View GitHub Profile
@pietervogelaar
pietervogelaar / filter_detect_parser.rb
Created February 14, 2019 15:18
Fluentd parser detection with Kubernetes annotations
require 'fluent/plugin/filter'
# This filter detects the parser to use based on Kubernetes annotations.
#
# Annotation: fluentd.org/parser[_stream][-container]
#
# Suggest a pre-defined parser. The parser must be already registered by Fluentd. If present,
# the stream (stdout or stderr) will restrict that specific stream. If present, the container can
# override a specific container in a Pod.
#