Skip to content

Buffer section does not accept arguments #70

Open
@MaxAnderson95

Description

@MaxAnderson95

I just extended the logging-operator project to support this plugin for Logicmonitor (See this PR). However I've discovered, that the fluent config that logging-operator generates is incompatible with this plugin. Specifically as it relates to the buffer section.

The logging-operator generates a config similar to this:

<match **>
    @type lm
    @id flow:quickstart:log-generator:output:quickstart:lm
    access_id REDACTED
    access_key REDACTED
    company_domain logicmonitor.com
    company_name REDACTED
    flush_interval 30s
    include_metadata true
    <buffer tag,time>
      @type file
      path /buffers/flow:quickstart:log-generator:output:quickstart:lm.*.buffer
      retry_forever true
      timekey 10m
      timekey_wait 1m
    </buffer>
</match>

Notice the arguments of tag and time being passed to buffer. This causes the following error on config validation:

2025-06-06 15:49:24 +0000 [error]: config error file="/fluentd/etc/fluent.conf" error_class=Fluent::ConfigError error="this plugin 'Fluent::LmOutput' cannot handle arguments for <buffer ...> section"

I believe this is caused by the use of the old 0.12 fluentd plugin syntax still in use here:

module Fluent
  class LmOutput < BufferedOutput

According to the documentation for developing an output plugin in fluentd 1.0, you're supposed to extend the Fluent::Plugin::Output Class, and then implement the def write(chunk) method to handle buffering.

The gemspec already requires fluentd 1.0, so I think this change is safe to make.

Can the plugin be updated to support this new syntax?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions