{"record":{"id":"3153142d1e6fbe88","repo":"fluent/fluentd","slug":"missing-type-parameter-on-e-name-directive","errorCode":null,"errorMessage":"Missing '@type' parameter on <#{e.name}> directive","messagePattern":"Missing '@type' parameter on <#(.+?)> directive","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"critical","filePath":"lib/fluent/agent.rb","lineNumber":70,"sourceCode":"\n    attr_reader :log\n    attr_reader :outputs\n    attr_reader :filters\n    attr_reader :context\n    attr_reader :event_router\n    attr_reader :error_collector\n\n    def configure(conf)\n      super\n\n      # initialize <match> and <filter> elements\n      conf.elements('filter', 'match').each { |e|\n        if !Fluent::Engine.supervisor_mode && e.for_another_worker?\n          next\n        end\n        pattern = e.arg.empty? ? '**' : e.arg\n        type = e['@type']\n        raise ConfigError, \"Missing '@type' parameter on <#{e.name}> directive\" unless type\n        if e.name == 'filter'\n          add_filter(type, pattern, e)\n        else\n          add_match(type, pattern, e)\n        end\n      }\n    end\n\n    def lifecycle_control_list\n      return @lifecycle_control_list if @lifecycle_control_list\n\n      lifecycle_control_list = {\n        input: [],\n        output_with_router: [],\n        filter: [],\n        output: [],\n      }\n      if self.respond_to?(:inputs)","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/agent.rb#L52-L88","documentation":"Raised as Fluent::ConfigError by Fluent::Agent#configure while walking every <filter> and <match> element: it reads only e['@type'], and a nil value aborts configuration with 'Missing @type parameter on <match>/<filter> directive'. Elements marked for another worker (multi-worker setups) are skipped, but everything else must name an output or filter plugin.","triggerScenarios":"A <match pattern> or <filter pattern> block with no @type line at all; using the v0.12-era 'type file' spelling, which this v1 code path never reads; an empty placeholder match block left in the config.","commonSituations":"Hand-edited configs after copying a template; migrating v0.12 configs where 'type' was renamed to '@type'; commented-out @type lines accidentally left commented.","solutions":["Add @type <plugin_name> as the first parameter of every <match> and <filter> block (e.g. @type stdout, @type record_transformer)","Replace legacy 'type' keys with '@type' - the v1 agent only reads '@type'","Validate before deploy with fluentd --dry-run -c /etc/fluent/fluent.conf so startup never hits it in production"],"exampleFix":"# before\n<match myapp.**>\n</match>\n\n# after\n<match myapp.**>\n  @type stdout\n</match>","handlingStrategy":"validation","validationCode":"require 'fluent/config'\nconf = Fluent::Config.parse(File.read('/etc/fluent/fluent.conf'), 'fluent.conf', Dir.pwd, true)\nconf.elements('filter', 'match').each do |e|\n  abort \"missing @type in <#{e.name}>\" unless e['@type']\nend","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Adopt the habit: every <match>/<filter> block starts with an @type line","Replace v0.12 'type' keys with '@type' during migration","Add fluentd --dry-run (or fluentd --dry-run -c) to the deploy pipeline"],"tags":["fluentd","config","match","filter","missing-parameter"],"backgroundTag":"missing-required-parameter","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}