Skip to content

Commit c30a55e

Browse files
chore: add time_as_integer support to Forward output
Signed-off-by: Davide Rossi <[email protected]>
1 parent ee668e7 commit c30a55e

File tree

6 files changed

+23
-0
lines changed

6 files changed

+23
-0
lines changed

charts/logging-operator/crds/logging.banzaicloud.io_clusteroutputs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,6 +2206,8 @@ spec:
22062206
type: array
22072207
slow_flush_log_threshold:
22082208
type: string
2209+
time_as_integer:
2210+
type: boolean
22092211
tls_allow_self_signed_cert:
22102212
type: boolean
22112213
tls_cert_logical_store_name:
@@ -9405,6 +9407,8 @@ spec:
94059407
type: array
94069408
slow_flush_log_threshold:
94079409
type: string
9410+
time_as_integer:
9411+
type: boolean
94089412
tls_allow_self_signed_cert:
94099413
type: boolean
94109414
tls_cert_logical_store_name:

charts/logging-operator/crds/logging.banzaicloud.io_outputs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,8 @@ spec:
22022202
type: array
22032203
slow_flush_log_threshold:
22042204
type: string
2205+
time_as_integer:
2206+
type: boolean
22052207
tls_allow_self_signed_cert:
22062208
type: boolean
22072209
tls_cert_logical_store_name:
@@ -8693,6 +8695,8 @@ spec:
86938695
type: array
86948696
slow_flush_log_threshold:
86958697
type: string
8698+
time_as_integer:
8699+
type: boolean
86968700
tls_allow_self_signed_cert:
86978701
type: boolean
86988702
tls_cert_logical_store_name:

config/crd/bases/logging.banzaicloud.io_clusteroutputs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,6 +2206,8 @@ spec:
22062206
type: array
22072207
slow_flush_log_threshold:
22082208
type: string
2209+
time_as_integer:
2210+
type: boolean
22092211
tls_allow_self_signed_cert:
22102212
type: boolean
22112213
tls_cert_logical_store_name:
@@ -9405,6 +9407,8 @@ spec:
94059407
type: array
94069408
slow_flush_log_threshold:
94079409
type: string
9410+
time_as_integer:
9411+
type: boolean
94089412
tls_allow_self_signed_cert:
94099413
type: boolean
94109414
tls_cert_logical_store_name:

config/crd/bases/logging.banzaicloud.io_outputs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,8 @@ spec:
22022202
type: array
22032203
slow_flush_log_threshold:
22042204
type: string
2205+
time_as_integer:
2206+
type: boolean
22052207
tls_allow_self_signed_cert:
22062208
type: boolean
22072209
tls_cert_logical_store_name:
@@ -8693,6 +8695,8 @@ spec:
86938695
type: array
86948696
slow_flush_log_threshold:
86958697
type: string
8698+
time_as_integer:
8699+
type: boolean
86968700
tls_allow_self_signed_cert:
86978701
type: boolean
86988702
tls_cert_logical_store_name:

docs/configuration/plugins/outputs/forward.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ Default: 60
111111
The threshold for chunk flush performance check. Parameter type is float, not time, default: 20.0 (seconds) If chunk flush takes longer time than this threshold, fluentd logs warning message and increases metric fluentd_output_status_slow_flush_count.
112112

113113

114+
### time_as_integer (bool, optional) {#forwardoutput-time_as_integer}
115+
116+
Format forwarded events time as an epoch Integer with second resolution. Useful when forwarding to old ( <= 0.12 ) Fluentd servers.
117+
118+
114119
### tls_allow_self_signed_cert (bool, optional) {#forwardoutput-tls_allow_self_signed_cert}
115120

116121
Allow self signed certificates or not.

pkg/sdk/logging/model/output/forward.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ type ForwardOutput struct {
104104
// Parameter type is float, not time, default: 20.0 (seconds)
105105
// If chunk flush takes longer time than this threshold, fluentd logs warning message and increases metric fluentd_output_status_slow_flush_count.
106106
SlowFlushLogThreshold string `json:"slow_flush_log_threshold,omitempty"`
107+
// Format forwarded events time as an epoch Integer with second resolution. Useful when forwarding to old ( <= 0.12 ) Fluentd servers.
108+
TimeAsInteger bool `json:"time_as_integer,omitempty"`
107109
}
108110

109111
func (f *ForwardOutput) ToDirective(secretLoader secret.SecretLoader, id string) (types.Directive, error) {

0 commit comments

Comments
 (0)