From 008651ced560ec3b8eff45f49799eeabe017666d Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Fri, 24 Jul 2026 11:58:03 +0900 Subject: [PATCH] Fix parameter default value and type Four mismatches found by comparing config_param declarations in fluentd v1.19 (0579b12b) with the documented tables. * inject_key_prefix, hash_value_field (filter/parser.md) Both are declared as :string with default nil, but the tables said "false", which is not a valid value for a string parameter: config_param :inject_key_prefix, :string, default: nil config_param :hash_value_field, :string, default: nil * resolve_hostname (input/forward.md) Declared as :bool with default nil, not false. The distinction matters here because of in_forward.rb:106-113: when source_hostname_key is set, a nil resolve_hostname is promoted to true, while an explicitly configured false raises "resolve_hostname must be true with source_hostname_key". So "unset" and "false" are not interchangeable. input/syslog.md already documents the same parameter of in_syslog, which shares the declaration, as nil. * generate_cert_expiration (configuration/transport-section.md) Declared as :time, not :integer: config_param :generate_cert_expiration, :time, default: 10 * 365 * 86400 The documented default is already correct, only the type was wrong. [time] is the notation used for time parameters in buffer-section.md. None of the four is overridden by config_set_default anywhere in the tree, so the declared values are the effective ones. The version columns were rechecked against the introducing commits and are correct as they are: 96664acd (v0.14.9) for the two filter_parser parameters and 5c6ffceb (v0.14.10) for resolve_hostname. Signed-off-by: Shizuo Fujita --- configuration/transport-section.md | 2 +- filter/parser.md | 4 ++-- input/forward.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configuration/transport-section.md b/configuration/transport-section.md index d37fd3d7..0d0de415 100644 --- a/configuration/transport-section.md +++ b/configuration/transport-section.md @@ -158,7 +158,7 @@ For ``: * Default: Mountain View * `generate_cert_common_name`: \[string\] * Default: `nil` -* `generate_cert_expiration`: \[integer\] +* `generate_cert_expiration`: \[time\] * Default: \(60 \* 60 \* 24 = 86400\) \* 365 \* 10 = 10 years ## Cert Digest Algorithm Parameter diff --git a/filter/parser.md b/filter/parser.md index c80bb5bc..4eb31b0b 100644 --- a/filter/parser.md +++ b/filter/parser.md @@ -195,7 +195,7 @@ If `true`, invalid string is replaced with safe characters and re-parse it. | type | default | version | | :--- | :--- | :--- | -| string | false | 0.14.9 | +| string | nil | 0.14.9 | Stores the parsed values with the specified key name prefix. @@ -222,7 +222,7 @@ With above configuration, here is the result: | type | default | version | | :--- | :--- | :--- | -| string | false | 0.14.9 | +| string | nil | 0.14.9 | Stores the parsed values as a hash value in a field. diff --git a/input/forward.md b/input/forward.md index 760163ce..42db2ff5 100644 --- a/input/forward.md +++ b/input/forward.md @@ -92,7 +92,7 @@ This parameter is deprecated since v1.14.6. Use `` directive instead. | type | default | version | | :--- | :--- | :--- | -| bool | false | 0.14.10 | +| bool | nil | 0.14.10 | Tries to resolve hostname from IP addresses or not.