{"record":{"id":"fa3bf4f90c0db3b8","repo":"fluent/fluentd","slug":"parameter-name-string-has-tag-placeholder","errorCode":null,"errorMessage":"Parameter '#{name}: #{string}' has tag placeholders, but chunk key 'tag' is not configured","messagePattern":"Parameter '#(.+?): #(.+?)' has tag placeholders, but chunk key 'tag' is not configured","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/plugin/output.rb","lineNumber":750,"sourceCode":"          if !sec && timekey\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' doesn't have timestamp placeholders for timekey #{timekey.to_i}\"\n          end\n          if sec && !timekey\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' has timestamp placeholders, but chunk key 'time' is not configured\"\n          end\n          if sec && timekey && timekey < sec\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' doesn't have timestamp placeholder for #{title}('#{example}') for timekey #{timekey.to_i}\"\n          end\n        end\n\n        def validate_tag!\n          parts = @argument[:parts]\n          tagkey = @argument[:tagkey]\n          if tagkey && parts.empty?\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' doesn't have tag placeholder\"\n          end\n          if !tagkey && !parts.empty?\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' has tag placeholders, but chunk key 'tag' is not configured\"\n          end\n        end\n\n        def validate_keys!\n          keys = @argument[:keys]\n          chunk_keys = @argument[:chunkkeys]\n          if (chunk_keys - keys).size > 0\n            not_specified = (chunk_keys - keys).sort\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' doesn't have enough placeholders for keys #{not_specified.join(',')}\"\n          end\n          if (keys - chunk_keys).size > 0\n            not_satisfied = (keys - chunk_keys).sort\n            raise Fluent::ConfigError, \"Parameter '#{name}: #{string}' has placeholders, but chunk keys doesn't have keys #{not_satisfied.join(',')}\"\n          end\n        end\n      end\n\n      TIME_KEY_PLACEHOLDER_THRESHOLDS = [","sourceCodeStart":732,"sourceCodeEnd":768,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin/output.rb#L732-L768","documentation":"The parameter string contains `${tag}` or `${tag[N]}` placeholders but `tag` is not a buffer chunk key (`!tagkey && !parts.empty?` in `validate_tag!`). Without tag chunking there is no per-tag metadata to substitute, so the placeholder would be left as a literal string and the config is rejected instead.","triggerScenarios":"`path /logs/${tag}.log` with `<buffer time>` or `<buffer tenant>` (tag not listed); any placeholder-validated parameter referencing ${tag} while the buffer chunks on something else.","commonSituations":"Removing `tag` from chunk keys while keeping a tag-templated path; using a path template copied from a per-tag example in an output chunked by a record field.","solutions":["Add `tag` to the chunk keys: `<buffer time,tag>` (timekey still required if `time` is present)","Or remove the `${tag}`/`${tag[N]}` placeholders from the parameter","If only part of the tag matters, chunk on tag anyway and reference `${tag[0]}` etc. in the path"],"exampleFix":"# before\n<buffer time>\n  timekey 1d\n</buffer>\npath /logs/${tag}/app.%Y%m%d.log\n\n# after\n<buffer time,tag>\n  timekey 1d\n</buffer>\npath /logs/${tag}/app.%Y%m%d.log","handlingStrategy":"validation","validationCode":"fluentd --dry-run -c /etc/fluent/fluent.conf","typeGuard":null,"tryCatchPattern":null,"preventionTips":["${tag} in a parameter requires tag in the chunk keys","When trimming chunk keys, grep the config for the corresponding placeholders","chunk_id and tag are special; every other ${key} must be a chunk key too"],"tags":["fluentd","placeholder","tag","path","configuration"],"backgroundTag":"template-placeholder-mismatch","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}