Send data from Fluentd to Axiom
This step-by-step guide will help you collect, aggregate, analyze, and route log files from multiple Fluentd sources into Axiom
Fluentd is an open-source log collector that allows you to collect, aggregate, process, analyze, and route log files.
With Fluentd, you can collect logs from multiple sources and ship it instantly into Axiom
Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
- Create an API token in Axiom with permissions to update the dataset you have created.
Installation
Visit the Fluentd download page to install Fluentd on your system.
Configuration
Fluentd lifecycle consist of five different components which are:
- Setup: Configure your
fluent.conf
file. - Inputs: Define your input listeners.
- Filters: Create a rule to allow or disallow an event.
- Matches: Send output to Axiom when input data match and pair specific data from your data input within your configuration.
- Labels: Groups filters and simplifies tag handling.
When setting up Fluentd, the configuration file .conf
is used to connect its components.
Configuring Fluentd using the HTTP output plugin
The example below shows a Fluentd configuration that sends data to Axiom using the HTTP output plugin:
- Replace
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable. - Replace
DATASET_NAME
with the name of the Axiom dataset where you want to send data.
Configuring Fluentd using the OpenSearch output plugin
The example below shows a Fluentd configuration that sends data to Axiom using the OpenSearch plugin:
Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.
Configure buffer interval with filter patterns
The example below shows a Fluentd configuration to hold logs in memory with specific flush intervals, size limits, and how to exclude specific logs based on patterns.
Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.
Collect and send PHP logs to Axiom
The example below shows a Fluentd configuration that sends PHP data to Axiom.
Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.
Collect and send Scala logs to Axiom
The example below shows a Fluentd configuration that sends Scala data to Axiom
Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.
Send virtual machine logs to Axiom using the HTTP output plugin
The example below shows a Fluentd configuration that sends data from your virtual machine to Axiom using the apache
source type.
- Replace
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable. - Replace
DATASET_NAME
with the name of the Axiom dataset where you want to send data.
The example below shows a Fluentd configuration that sends data from your virtual machine to Axiom using the nginx
source type.
- Replace
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable. - Replace
DATASET_NAME
with the name of the Axiom dataset where you want to send data.
Was this page helpful?