Introduction
Fluentd is an open-source data collector designed for creating a unified logging layer. It enables seamless aggregation and distribution of data for improved data utilization and comprehension.
OpsRamp provides the capability to export logs from Fluentd, which is configured to gather logs from diverse sources.
Configuration for exporting logs to OpsRamp
Add the following configuration to your Fluentd configuration file to export logs to OpsRamp:
Note
- The service label can designate the origin of the logged data and can be substituted with a tag, such as
${tag}
. - FluentD logs can be exported in
msgpack
format instead ofjson
by applying the configuration shown below:
Example 1: Fluentd configuration for exporting logs to OpsRamp
Below is a complete configuration example for Fluentd to export logs to OpsRamp and specify the source of the logs using the service label:
Example 2: Kubernetes configuration
Below is a complete configuration example for Fluentd to export logs to OpsRamp within a Kubernetes cluster:
Before exporting the log events, ensure that the following attributes or fields are set using Fluentd configuration:
Resource attributes:
- source
- host
- level (If not set, it is considered as “Unknown”)
Parsed labels:
- message # Mandatory field to be set
- timestamp ( If not set, the time the record received at Opsramp is considered as log record time )
- level ( If not set, it’s considered as “Unknown” )
Note
You can make additional attributes filterable by prefixing the required keys withopsramp_filter_
. OpsRamp supports up to 10 filterable fields.Note
Ensure that the cardinality of these filters is not too high, as higher cardinality can impact the performance of data searches.See Fluentd configuration for more details.