fluent-bit: Deploy log collector for Victoria Logs

[fluent-bit][0] is a generic, highly-configurable log collector.  It was
apparently initially developed for fluentd, but is has so many output
capabilities that it works wil many different log aggregation systems,
including Victoria Logs.

Although Victoria Logs supports the Loki input format, and therefore
_Promtail_ would work, I want to try to avoid depending on third-party
repositories.  _fluent-bit_ is packaged by Fedora, so there shouldn't be
any dependency issues, etc.

[0]: https://fluentbit.io
This commit is contained in:
2025-08-05 06:51:10 -05:00
parent 71b1363c58
commit 0fe296f7f3
8 changed files with 160 additions and 1 deletions

View File

@@ -141,3 +141,23 @@ dnf_automatic_schedule: >-
| random(seed=inventory_hostname)
| string
}} *-*-* 04:00:00 America/Chicago
fluent_bit_filters:
# Avoid log amplification from logging the result of sending logs!
- name: grep
match: host.fluent-bit.service
exclude: message \[output:http:victorialogs\] .+, HTTP status=200$
fluent_bit_outputs:
- name: http
alias: victorialogs
match: host.*
host: logs.pyrocufflink.blue
port: 443
tls: true
tls.verify: true
tls.verify_hostname: true
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
json_date_format: iso8601
log_response_payload: false