Skip to main content
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

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 AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.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 send your 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 AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.Replace DATASET_NAME with the name of the Axiom dataset where you send your 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 AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.Replace DATASET_NAME with the name of the Axiom dataset where you send your data.

Collect and send PHP logs to Axiom

The example below shows a Fluentd configuration that sends PHP data to Axiom.
Replace AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.Replace DATASET_NAME with the name of the Axiom dataset where you send your data.

Collect and send Scala logs to Axiom

The example below shows a Fluentd configuration that sends Scala data to Axiom
Replace AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.Replace DATASET_NAME with the name of the Axiom dataset where you send your 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 send your 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 send your data.