| name | implementing-log-forwarding-with-fluentd |
| description | Configure Fluentd and Fluent Bit for centralized log aggregation, routing, filtering, and enrichment across distributed infrastructure |
| domain | cybersecurity |
| subdomain | security-operations |
| tags | ["fluentd","fluent-bit","log-aggregation","log-forwarding","siem","centralized-logging","observability"] |
| version | 1.0 |
| author | mahipal |
| license | Apache-2.0 |
| nist_csf | ["DE.CM-01","RS.MA-01","GV.OV-01","DE.AE-02"] |
Implementing Log Forwarding with Fluentd
Overview
This skill covers configuring Fluentd and Fluent Bit for centralized log collection, routing, and enrichment. Fluent Bit acts as a lightweight log forwarder on endpoints, while Fluentd serves as the central aggregator and processor. The configuration covers input plugins for syslog, file tailing, and application logs, with output routing to Elasticsearch, S3, and Splunk.
When to Use
- When deploying or configuring implementing log forwarding with fluentd capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
Common Misconfigurations & Verification
- Buffer overflow silently drops logs: the default
overflow_action blocks or throws once a buffer fills, and under burst load events are lost. Configure <buffer> with @type file (path /var/log/fluentd/buffer), overflow_action block, and retry_forever true so backpressure spools to disk. Watch fluentd_output_status_buffer_queue_length and ..._retry_count.
- Memory buffer loses chunks on restart:
@type memory buffers vanish on restart/OOM. Use @type file for any security-relevant pipeline and confirm chunks flush (queue length returns to 0).
in_forward on 24224 with no TLS/auth accepts spoofed events: add <transport tls> and a <security><shared_key> block. Verify with openssl s_client -connect host:24224 (cert present) and reject events lacking the shared key.
- Tag/route mismatch sends events nowhere: a
<match> pattern that doesn't match the emitted tag silently discards records. Validate routing with fluentd --dry-run -c fluent.conf plus a test event via fluent-cat.
- Confirm end-to-end delivery: emit a known event with
fluent-cat/fluent-logger, then query the destination (Elasticsearch _count, the S3 object, a Splunk search) for it. Healthy buffer metrics are not proof the event landed.
Prerequisites
- Fluentd (td-agent) v1.16+ or Fluent Bit v3.0+