Skip to content

Commit 922a9ec

Browse files
authored
Merge pull request #1803 from bmichalkiewicz/gelf_output_plugin
Gelf output plugin: improved docs and add missing flags
2 parents 7ed7801 + cd12738 commit 922a9ec

File tree

14 files changed

+81
-91
lines changed

14 files changed

+81
-91
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
@@ -2685,6 +2685,8 @@ spec:
26852685
type: object
26862686
host:
26872687
type: string
2688+
max_bytes:
2689+
type: integer
26882690
port:
26892691
type: integer
26902692
protocol:
@@ -10084,6 +10086,8 @@ spec:
1008410086
type: object
1008510087
host:
1008610088
type: string
10089+
max_bytes:
10090+
type: integer
1008710091
port:
1008810092
type: integer
1008910093
protocol:

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2681,6 +2681,8 @@ spec:
26812681
type: object
26822682
host:
26832683
type: string
2684+
max_bytes:
2685+
type: integer
26842686
port:
26852687
type: integer
26862688
protocol:
@@ -9354,6 +9356,8 @@ spec:
93549356
type: object
93559357
host:
93569358
type: string
9359+
max_bytes:
9360+
type: integer
93579361
port:
93589362
type: integer
93599363
protocol:

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2685,6 +2685,8 @@ spec:
26852685
type: object
26862686
host:
26872687
type: string
2688+
max_bytes:
2689+
type: integer
26882690
port:
26892691
type: integer
26902692
protocol:
@@ -10084,6 +10086,8 @@ spec:
1008410086
type: object
1008510087
host:
1008610088
type: string
10089+
max_bytes:
10090+
type: integer
1008710091
port:
1008810092
type: integer
1008910093
protocol:

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2681,6 +2681,8 @@ spec:
26812681
type: object
26822682
host:
26832683
type: string
2684+
max_bytes:
2685+
type: integer
26842686
port:
26852687
type: integer
26862688
protocol:
@@ -9354,6 +9356,8 @@ spec:
93549356
type: object
93559357
host:
93569358
type: string
9359+
max_bytes:
9360+
type: integer
93579361
port:
93589362
type: integer
93599363
protocol:

docs/configuration/crds/v1beta1/output_types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ OutputSpec defines the desired state of Output
3232
### gcs (*output.GCSOutput, optional) {#outputspec-gcs}
3333

3434

35-
### gelf (*output.GELFOutputConfig, optional) {#outputspec-gelf}
35+
### gelf (*output.GelfOutputConfig, optional) {#outputspec-gelf}
3636

3737

3838
### http (*output.HTTPOutputConfig, optional) {#outputspec-http}

docs/configuration/plugins/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ For more information please click on the plugin name
3838
| **[Format rfc5424](outputs/format_rfc5424/)** | outputs | Specify how to format output record. | GA | [more info](https://github.com/cloudfoundry/fluent-plugin-syslog_rfc5424#format-section) |
3939
| **[Forward](outputs/forward/)** | outputs | Forwards events to other fluentd nodes. | GA | [more info](https://docs.fluentd.org/output/forward) |
4040
| **[Google Cloud Storage](outputs/gcs/)** | outputs | Store logs in Google Cloud Storage | GA | [0.4.0](https://github.com/kube-logging/fluent-plugin-gcs) |
41-
| **[Gelf](outputs/gelf/)** | outputs | Output plugin writes events to GELF | Testing | [1.0.8](https://github.com/hotschedules/fluent-plugin-gelf-hs) |
41+
| **[Gelf](outputs/gelf/)** | outputs | Output plugin writes logs to Graylog | Testing | [1.3.4](https://github.com/bmichalkiewicz/fluent-plugin-gelf-best) |
4242
| **[Http](outputs/http/)** | outputs | Sends logs to HTTP/HTTPS endpoints. | GA | [more info](https://docs.fluentd.org/output/http) |
4343
| **[Kafka](outputs/kafka/)** | outputs | Send your logs to Kafka | GA | [0.17.5](https://github.com/fluent/fluent-plugin-kafka/releases/tag/v0.17.5) |
4444
| **[Amazon Kinesis Firehose](outputs/kinesis_firehose/)** | outputs | Fluent plugin for Amazon Kinesis | Testing | [3.4.2](https://github.com/awslabs/aws-fluent-plugin-kinesis/releases/tag/v3.4.2) |
Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
---
2-
title: GELF
2+
title: Gelf
33
weight: 200
44
generated_file: true
55
---
66

7-
# [GELF Output](https://github.com/hotschedules/fluent-plugin-gelf-hs)
7+
# Gelf output plugin for Fluentd
88
## Overview
9-
Fluentd output plugin for GELF.
9+
10+
For details, see [https://github.com/bmichalkiewicz/fluent-plugin-gelf-best](https://github.com/bmichalkiewicz/fluent-plugin-gelf-best).
11+
12+
## Example
13+
```yaml
14+
spec:
15+
gelf:
16+
host: gelf-host
17+
port: 12201
18+
```
19+
1020
1121
## Configuration
1222
## Output Config
@@ -21,6 +31,12 @@ Available since ghcr.io/kube-logging/fluentd:v1.16-4.8-full [Buffer](../buffer/)
2131
Destination host
2232
2333
34+
### max_bytes (int, optional) {#output config-max_bytes}
35+
36+
MaxBytes specifies the maximum size, in bytes, of each individual log message. For details, see [https://github.com/Graylog2/graylog2-server/issues/873](https://github.com/Graylog2/graylog2-server/issues/873) Available since ghcr.io/kube-logging/fluentd:v1.16-4.10-full
37+
38+
Default: 3200
39+
2440
### port (int, required) {#output config-port}
2541
2642
Destination host port
@@ -34,42 +50,14 @@ Default: "udp"
3450
3551
### tls (*bool, optional) {#output config-tls}
3652
37-
Enable TlS
53+
Enable TLS
3854
3955
Default: false
4056
4157
### tls_options (map[string]string, optional) {#output config-tls_options}
4258
43-
TLS options .
44-
45-
Default: {}). For details, see [https://github.com/graylog-labs/gelf-rb/blob/72916932b789f7a6768c3cdd6ab69a3c942dbcef/lib/gelf/transport/tcp_tls.rb#L7-L12](https://github.com/graylog-labs/gelf-rb/blob/72916932b789f7a6768c3cdd6ab69a3c942dbcef/lib/gelf/transport/tcp_tls.rb#L7-L12
59+
TLS Options. For details, see [https://github.com/graylog-labs/gelf-rb/blob/72916932b789f7a6768c3cdd6ab69a3c942dbcef/lib/gelf/transport/tcp_tls.rb#L7-L12](https://github.com/graylog-labs/gelf-rb/blob/72916932b789f7a6768c3cdd6ab69a3c942dbcef/lib/gelf/transport/tcp_tls.rb#L7-L12).
4660
61+
Default: {}
4762
4863
49-
50-
## Example `GELF` output configurations
51-
52-
{{< highlight yaml >}}
53-
apiVersion: logging.banzaicloud.io/v1beta1
54-
kind: Output
55-
metadata:
56-
name: gelf-output-sample
57-
spec:
58-
gelf:
59-
host: gelf-host
60-
port: 12201
61-
{{</ highlight >}}
62-
63-
Fluentd config result:
64-
65-
{{< highlight xml >}}
66-
<match **>
67-
@type gelf
68-
@id test_gelf
69-
host gelf-host
70-
port 12201
71-
</match>
72-
{{</ highlight >}}
73-
74-
75-
---

pkg/sdk/logging/api/v1alpha1/output_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ type OutputSpec struct {
5454
AwsElasticsearchOutputConfig *output.AwsElasticsearchOutputConfig `json:"awsElasticsearch,omitempty"`
5555
RedisOutputConfig *output.RedisOutputConfig `json:"redis,omitempty"`
5656
SyslogOutputConfig *output.SyslogOutputConfig `json:"syslog,omitempty"`
57-
GELFOutputConfig *output.GELFOutputConfig `json:"gelf,omitempty"`
57+
GelfOutputConfig *output.GelfOutputConfig `json:"gelf,omitempty"`
5858
SQSOutputConfig *output.SQSOutputConfig `json:"sqs,omitempty"`
5959
RelabelOutputConfig *output.RelabelOutputConfig `json:"relabel,omitempty"`
6060
}

pkg/sdk/logging/api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/sdk/logging/api/v1beta1/output_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type OutputSpec struct {
5656
AwsElasticsearchOutputConfig *output.AwsElasticsearchOutputConfig `json:"awsElasticsearch,omitempty"`
5757
RedisOutputConfig *output.RedisOutputConfig `json:"redis,omitempty"`
5858
SyslogOutputConfig *output.SyslogOutputConfig `json:"syslog,omitempty"`
59-
GELFOutputConfig *output.GELFOutputConfig `json:"gelf,omitempty"`
59+
GelfOutputConfig *output.GelfOutputConfig `json:"gelf,omitempty"`
6060
SQSOutputConfig *output.SQSOutputConfig `json:"sqs,omitempty"`
6161
MattermostOutputConfig *output.MattermostOutputConfig `json:"mattermost,omitempty"`
6262
RelabelOutputConfig *output.RelabelOutputConfig `json:"relabel,omitempty"`

0 commit comments

Comments
 (0)