Skip to content

Commit ee668e7

Browse files
Merge pull request #1737 from kube-logging/output-fields
fix(syslog-ng-outputs): fix output fields where necessary
2 parents 7e7a431 + 8a2754d commit ee668e7

File tree

14 files changed

+154
-6
lines changed

14 files changed

+154
-6
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,6 +1698,30 @@ spec:
16981698
type: boolean
16991699
compresslevel:
17001700
type: integer
1701+
disk_buffer:
1702+
properties:
1703+
compaction:
1704+
type: boolean
1705+
dir:
1706+
type: string
1707+
disk_buf_size:
1708+
format: int64
1709+
type: integer
1710+
mem_buf_length:
1711+
format: int64
1712+
type: integer
1713+
mem_buf_size:
1714+
format: int64
1715+
type: integer
1716+
q_out_size:
1717+
format: int64
1718+
type: integer
1719+
reliable:
1720+
type: boolean
1721+
required:
1722+
- disk_buf_size
1723+
- reliable
1724+
type: object
17011725
flush_grace_period:
17021726
type: integer
17031727
log-fifo-size:

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,6 +1694,30 @@ spec:
16941694
type: boolean
16951695
compresslevel:
16961696
type: integer
1697+
disk_buffer:
1698+
properties:
1699+
compaction:
1700+
type: boolean
1701+
dir:
1702+
type: string
1703+
disk_buf_size:
1704+
format: int64
1705+
type: integer
1706+
mem_buf_length:
1707+
format: int64
1708+
type: integer
1709+
mem_buf_size:
1710+
format: int64
1711+
type: integer
1712+
q_out_size:
1713+
format: int64
1714+
type: integer
1715+
reliable:
1716+
type: boolean
1717+
required:
1718+
- disk_buf_size
1719+
- reliable
1720+
type: object
16971721
flush_grace_period:
16981722
type: integer
16991723
log-fifo-size:

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,6 +1698,30 @@ spec:
16981698
type: boolean
16991699
compresslevel:
17001700
type: integer
1701+
disk_buffer:
1702+
properties:
1703+
compaction:
1704+
type: boolean
1705+
dir:
1706+
type: string
1707+
disk_buf_size:
1708+
format: int64
1709+
type: integer
1710+
mem_buf_length:
1711+
format: int64
1712+
type: integer
1713+
mem_buf_size:
1714+
format: int64
1715+
type: integer
1716+
q_out_size:
1717+
format: int64
1718+
type: integer
1719+
reliable:
1720+
type: boolean
1721+
required:
1722+
- disk_buf_size
1723+
- reliable
1724+
type: object
17011725
flush_grace_period:
17021726
type: integer
17031727
log-fifo-size:

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,6 +1694,30 @@ spec:
16941694
type: boolean
16951695
compresslevel:
16961696
type: integer
1697+
disk_buffer:
1698+
properties:
1699+
compaction:
1700+
type: boolean
1701+
dir:
1702+
type: string
1703+
disk_buf_size:
1704+
format: int64
1705+
type: integer
1706+
mem_buf_length:
1707+
format: int64
1708+
type: integer
1709+
mem_buf_size:
1710+
format: int64
1711+
type: integer
1712+
q_out_size:
1713+
format: int64
1714+
type: integer
1715+
reliable:
1716+
type: boolean
1717+
required:
1718+
- disk_buf_size
1719+
- reliable
1720+
type: object
16971721
flush_grace_period:
16981722
type: integer
16991723
log-fifo-size:

docs/configuration/plugins/syslogng-outputs/elasticsearch.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ spec:
4141
The document ID. If no ID is specified, a document ID is automatically generated.
4242

4343

44+
### disk_buffer (*DiskBuffer, optional) {#elasticsearchoutput-disk_buffer}
45+
46+
This option enables putting outgoing messages into the disk buffer of the destination to avoid message loss in case of a system failure on the destination side. For details, see the [Syslog-ng DiskBuffer options](../disk_buffer/).
47+
48+
Default: false
49+
4450
### index (string, optional) {#elasticsearchoutput-index}
4551

4652
Name of the data stream, index, or index alias to perform the action on.

docs/configuration/plugins/syslogng-outputs/openobserve.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ For details on the available options of the output, see the [documentation of th
4141
### (HTTPOutput, required) {#openobserveoutput-}
4242

4343

44+
### disk_buffer (*DiskBuffer, optional) {#openobserveoutput-disk_buffer}
45+
46+
This option enables putting outgoing messages into the disk buffer of the destination to avoid message loss in case of a system failure on the destination side. For details, see the [Syslog-ng DiskBuffer options](../disk_buffer/).
47+
48+
Default: false
49+
4450
### organization (string, optional) {#openobserveoutput-organization}
4551

4652
Name of the organization in OpenObserve.

docs/configuration/plugins/syslogng-outputs/s3.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ Enable or disable compression.
7373

7474
Default: false
7575

76+
### disk_buffer (*DiskBuffer, optional) {#s3output-disk_buffer}
77+
78+
This option enables putting outgoing messages into the disk buffer of the destination to avoid message loss in case of a system failure on the destination side. For details, see the [Syslog-ng DiskBuffer options](../disk_buffer/).
79+
80+
Default: false
81+
7682
### flush_grace_period (int, optional) {#s3output-flush_grace_period}
7783

7884
Set the number of seconds for flush period.
@@ -101,7 +107,7 @@ Default: 32
101107
The object_key for the S3 server.
102108

103109

104-
### object_key_timestamp (RawString, optional) {#s3output-object_key_timestamp}
110+
### object_key_timestamp (string, optional) {#s3output-object_key_timestamp}
105111

106112
Set object_key_timestamp
107113

@@ -131,7 +137,7 @@ The secret_key for the S3 server.
131137
Set the storage_class option.
132138

133139

134-
### template (RawString, optional) {#s3output-template}
140+
### template (string, optional) {#s3output-template}
135141

136142
Template
137143

docs/configuration/plugins/syslogng-outputs/splunk_hec.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ Fallback option for source field.
5555
Fallback option for sourcetype field.
5656

5757

58+
### disk_buffer (*DiskBuffer, optional) {#splunkhecoutput-disk_buffer}
59+
60+
This option enables putting outgoing messages into the disk buffer of the destination to avoid message loss in case of a system failure on the destination side. For details, see the [Syslog-ng DiskBuffer options](../disk_buffer/).
61+
62+
Default: false
63+
5864
### event (string, optional) {#splunkhecoutput-event}
5965

6066
event() accepts a template, which declares the content of the log message sent to Splunk. Default value: `${MSG}`

pkg/sdk/logging/model/syslogng/config/output_tests/s3_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ destination "output_default_test-s3-out" {
194194
},
195195
},
196196
ObjectKey: "${HOST}/my-logs",
197-
ObjectKeyTimestamp: `"timestamp"`,
198-
Template: `"${MESSAGE}\n"`,
197+
ObjectKeyTimestamp: "timestamp",
198+
Template: "${MESSAGE}\n",
199199
Compression: config.NewFalse(),
200200
CompressLevel: 9,
201201
ChunkSize: 5,

pkg/sdk/logging/model/syslogng/output/elasticsearch.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ type ElasticsearchOutput struct {
6969
LogstashPrefixSeparator string `json:"logstash_prefix_separator,omitempty" syslog-ng:"ignore"`
7070
// Set the suffix for logs in logstash format. Default: `"${YEAR}.${MONTH}.${DAY}"`
7171
LogStashSuffix string `json:"logstash_suffix,omitempty" syslog-ng:"ignore"`
72+
// This option enables putting outgoing messages into the disk buffer of the destination to avoid message loss in case of a system failure on the destination side. For details, see the [Syslog-ng DiskBuffer options](../disk_buffer/). (default: false)
73+
DiskBuffer *DiskBuffer `json:"disk_buffer,omitempty"`
7274
}
7375

7476
func (o *ElasticsearchOutput) BeforeRender() {

0 commit comments

Comments
 (0)