Fluentd
Fluentd is a data collector for your applications and services. Fluentd can be configured to send logs to Parseable with HTTP output plugin and JSON output format.
This document explains how to set up Fluentd to ship logs to Parseable Docker Compose and Kubernetes. This should give you an idea on how to configure the output plugin for other scenarios.
For demo purpose, we used Fluentd's Memory Metrics Input plugin as the source of logs.
Docker Compose
Please ensure Docker Compose installed on your machine. Then run the following commands to set up Parseable and Fluentd.
You can now access the Parseable dashboard on http://localhost:8000. You should see a dataset called fluentbitdemo populated with log data generated by the Memory Metrics Input plugin.
Kubernetes
- Please ensure kubectl and helm installed and configured to access your Kubernetes cluster.
- Parseable installed on your Kubernetes cluster. Refer the Parseable Kubernetes documentation.
Install Fluentd
We use the official Fluentd Helm chart. But, we'll use a modified values.yaml file, that contains the configuration for Fluentd to send logs to Parseable.
Fluentd Configuration
Let's take a deeper look at the Fluentd configuration in values.yaml. Here we use the kubernetes filter to enrich the logs with Kubernetes metadata. We then use the http output plugin to send logs to Parseable. Notice the Match section in the http output plugin. We use kube.* to match all logs from Kubernetes filter. With the header X-P-Stream fluentbitdemo, we tell Parseable to send the logs to the fluentbitdemo stream.
Check logs in Parseable
Port forward Parseable service to access the dashboard with:
You can now check the Parseable server fluentbitdemo stream to see the logs from this setup.
Navigate to the Parseable dashboard and verify that logs are being ingested correctly.