all: Split up Fluent Bit vars
Instead of defining the common values for Fluent bit inputs, filters, and outputs directly in the variables used by the _fluent-bit_ role, we need to split these into reusable pieces. This way, hosts and groups that need to use a slightly different pipeline configuration can access the default values without having to redefine them.
This commit is contained in:
@@ -142,7 +142,7 @@ dnf_automatic_schedule: >-
|
|||||||
| string
|
| string
|
||||||
}} *-*-* 04:00:00 America/Chicago
|
}} *-*-* 04:00:00 America/Chicago
|
||||||
|
|
||||||
fluent_bit_filters:
|
fluent_bit_default_filters:
|
||||||
# Avoid log amplification from logging the result of sending logs!
|
# Avoid log amplification from logging the result of sending logs!
|
||||||
- name: grep
|
- name: grep
|
||||||
match: host.fluent-bit.service
|
match: host.fluent-bit.service
|
||||||
@@ -175,21 +175,28 @@ fluent_bit_filters:
|
|||||||
- message
|
- message
|
||||||
- tags
|
- tags
|
||||||
- topic
|
- topic
|
||||||
fluent_bit_outputs:
|
|
||||||
- name: http
|
fluent_bit_filters: '{{ fluent_bit_default_filters }}'
|
||||||
alias: victorialogs
|
|
||||||
match: host.*
|
fluent_bit_output_template_victorialogs:
|
||||||
host: logs.pyrocufflink.blue
|
host: logs.pyrocufflink.blue
|
||||||
port: 443
|
port: 443
|
||||||
tls: true
|
tls: true
|
||||||
tls.verify: true
|
tls.verify: true
|
||||||
tls.verify_hostname: true
|
tls.verify_hostname: true
|
||||||
tls.ca_file: /etc/pki/ca-trust/source/anchors/dch-root-ca-r2.crt
|
tls.ca_file: /etc/pki/ca-trust/source/anchors/dch-root-ca-r2.crt
|
||||||
uri: /insert/jsonline?_stream_fields=hostname,systemd_unit&_msg_field=message&_time_field=date
|
|
||||||
format: json_lines
|
format: json_lines
|
||||||
json_date_format: iso8601
|
json_date_format: iso8601
|
||||||
log_response_payload: false
|
log_response_payload: false
|
||||||
- name: http
|
|
||||||
|
fluent_bit_output_systemd:
|
||||||
|
name: http
|
||||||
|
alias: victorialogs
|
||||||
|
match: host.*
|
||||||
|
uri: /insert/jsonline?_stream_fields=hostname,systemd_unit&_msg_field=message&_time_field=date
|
||||||
|
|
||||||
|
fluent_bit_output_ntfy:
|
||||||
|
name: http
|
||||||
alias: ntfy
|
alias: ntfy
|
||||||
workers: 1
|
workers: 1
|
||||||
match: ntfy
|
match: ntfy
|
||||||
@@ -202,3 +209,9 @@ fluent_bit_outputs:
|
|||||||
format: json_lines
|
format: json_lines
|
||||||
json_date_key: false
|
json_date_key: false
|
||||||
log_response_payload: false
|
log_response_payload: false
|
||||||
|
|
||||||
|
fluent_bit_main_outputs:
|
||||||
|
- '{{ fluent_bit_output_systemd | combine(fluent_bit_output_template_victorialogs) }}'
|
||||||
|
- '{{ fluent_bit_output_ntfy }}'
|
||||||
|
|
||||||
|
fluent_bit_outputs: '{{ fluent_bit_main_outputs }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user