From 9514ccdb1aefa9e377a13ce9f8390f9656654505 Mon Sep 17 00:00:00 2001 From: Takahiro Yamashita Date: Tue, 12 Mar 2024 09:06:30 +0900 Subject: [PATCH] in_syslog: add examples for yaml configuration Signed-off-by: Takahiro Yamashita --- pipeline/inputs/syslog.md | 69 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/pipeline/inputs/syslog.md b/pipeline/inputs/syslog.md index 1fe97fe67..cf2a8a0cc 100644 --- a/pipeline/inputs/syslog.md +++ b/pipeline/inputs/syslog.md @@ -42,6 +42,8 @@ By default the service will create and listen for Syslog messages on the unix so In your main configuration file append the following _Input_ & _Output_ sections: +{% tabs %} +{% tab title="fluent-bit.conf" %} ```python [SERVICE] Flush 1 @@ -59,6 +61,27 @@ In your main configuration file append the following _Input_ & _Output_ sections Name stdout Match * ``` +{% endtab %} + +{% tab title="fluent-bit.yaml" %} +```yaml +service: + flush: 1 + log_level: info + parsers_file: parsers.conf +pipeline: + inputs: + - name: syslog + path: /tmp/in_syslog + buffer_chunk_size: 32000 + buffer_max_size: 64000 + receive_buffer_size: 512000 + outputs: + - name: stdout + match: '*' +``` +{% endtab %} +{% endtabs %} ### Testing @@ -90,8 +113,10 @@ The following content aims to provide configuration examples for different use c #### Fluent Bit Configuration -Put the following content in your fluent-bit.conf file: +Put the following content in your configuration file: +{% tabs %} +{% tab title="fluent-bit.conf" %} ```text [SERVICE] Flush 1 @@ -108,6 +133,26 @@ Put the following content in your fluent-bit.conf file: Name stdout Match * ``` +{% endtab %} + +{% tab title="fluent-bit.yaml" %} +```yaml +service: + flush: 1 + parsers_file: parsers.conf +pipeline: + inputs: + - name: syslog + parser: syslog-rfc3164 + listen: 0.0.0.0 + port: 5140 + mode: tcp + outputs: + - name: stdout + match: '*' +``` +{% endtab %} +{% endtabs %} then start Fluent Bit. @@ -131,6 +176,8 @@ $ sudo service rsyslog restart Put the following content in your fluent-bit.conf file: +{% tabs %} +{% tab title="fluent-bit.conf" %} ```text [SERVICE] Flush 1 @@ -147,6 +194,26 @@ Put the following content in your fluent-bit.conf file: Name stdout Match * ``` +{% endtab %} + +{% tab title="fluent-bit.yaml" %} +```yaml +service: + flush: 1 + parsers_file: parsers.conf +pipeline: + inputs: + - name: syslog + parser: syslog-rfc3164 + path: /tmp/fluent-bit.sock + mode: unix_udp + unix_perm: 0644 + outputs: + - name: stdout + match: '*' +``` +{% endtab %} +{% endtabs %} then start Fluent Bit.