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.conffile. - 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.
.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_TOKENwith the Axiom API token you have generated. For added security, store the API token in an environment variable. - Replace
DATASET_NAMEwith 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_NAMEwith 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_NAMEwith 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_NAMEwith 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_NAMEwith 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 theapache source type.
- Replace
API_TOKENwith the Axiom API token you have generated. For added security, store the API token in an environment variable. - Replace
DATASET_NAMEwith the name of the Axiom dataset where you want to send data.
nginx source type.
- Replace
API_TOKENwith the Axiom API token you have generated. For added security, store the API token in an environment variable. - Replace
DATASET_NAMEwith the name of the Axiom dataset where you want to send data.