fluent/fluentd · warning
Ruby DSL configuration format is deprecated. Please use orig
Error message
Ruby DSL configuration format is deprecated. Please use original configuration format. https://docs.fluentd.org/configuration/config-file
What it means
Fluentd supports parsing configuration in a Ruby DSL (files interpreted with eval via Config::DSL::Parser), but that format is deprecated. This warning is printed once by Fluent::Config.parse whenever it is invoked with parser: :ruby (e.g. `fluentd -c fluent.conf.rb`) before the DSL parser runs. The config still loads; only a migration to the standard directive-based format is requested.
Source
Thrown at lib/fluent/config.rb:78
when :v1 then :v1
when :v0 then :v0
else
raise ArgumentError, "Unknown Fluentd configuration syntax: '#{syntax}'"
end
elsif v1_config then :v1
else :v0
end
case parser
when :v1
require 'fluent/config/v1_parser'
V1Parser.parse(str, fname, basepath, Kernel.binding, on_file_parsed: on_file_parsed)
when :v0
# TODO: show deprecated message in v1
require 'fluent/config/parser'
Parser.parse(str, fname, basepath)
when :ruby
require 'fluent/config/dsl'
$log.warn("Ruby DSL configuration format is deprecated. Please use original configuration format. https://docs.fluentd.org/configuration/config-file") if $log
Config::DSL::Parser.parse(str, File.join(basepath, fname))
else
raise "[BUG] unknown configuration parser specification:'#{parser}'"
end
end
def self.new(name = '')
Element.new(name, '', {}, [])
end
end
end
View on GitHub (pinned to dd45c6e18d)
Solutions
- Rewrite the configuration in the standard @type/directive format documented at https://docs.fluentd.org/configuration/config-file.
- Rename the file so it is not picked up as Ruby DSL (drop the .rb convention and the ruby parser selection).
- If you call Config.parse programmatically, stop passing parser: :ruby (use :v1, the default).
- Audit deployment tooling for hardcoded `-c fluentd.conf.rb` invocations.
Example fix
# before (fluent.conf.rb, Ruby DSL) source do type :tail path '/var/log/app.log' tag app.log end # after (fluent.conf, standard format) <source> @type tail path /var/log/app.log tag app.log </source>
Defensive patterns
Strategy: validation
Validate before calling
# Fail CI if any Fluentd config still uses the Ruby DSL
require 'rbconfig'
configs = Dir.glob(['conf/*.rb', 'etc/*.rb'])
abort 'Ruby DSL configs are deprecated: ' + configs.join(', ') unless configs.empty? Prevention
- Standardize on the directive-based config format for all new services.
- Never pass parser: :ruby to Fluent::Config.parse in tooling.
- Keep config file extensions non-.rb so DSL parsing cannot be selected accidentally.
When it happens
Trigger: Running `fluentd -c somefile.rb`, passing a Ruby DSL config to Fluent::Config.parse(str, fname, basepath, parser: :ruby), or using tools (fluentd-ui, supervision wrappers) that select the :ruby parser.
Common situations: Legacy deployments from early Fluentd v0.x era still shipping .rb configs; copied examples from old blog posts; CI pipelines validating configs via the ruby parser.
Related errors
- unknown_key
- buffer path is not configured. specify 'path' in <buffer>
- regexp#{i} does not contain 2 parameters
- regexp#{i} contains a duplicated key, #{key}
- exclude#{i} does not contain 2 parameters
AI-assisted analysis of fluent/fluentd@dd45c6e18d (2026-08-21).
Data as JSON: /api/errors/f096ccd7a753af7d.
Report an issue: GitHub.