Compatibility and requirements
To use New Relic Logs with Fluent Bit, ensure your configuration meets the following requirements:
Logs requires an active trial or paid subscription for any New Relic product.
- New Relic license key (recommended) or Insights Insert key
- Fluent Bit 0.12 or higher is supported; however, version 1.0 or higher is recommended
Enable Fluent Bit for New Relic Logs
To enable New Relic Logs with Fluent Bit:
- Install the Fluent Bit plugin.
- Configure the Fluent Bit plugin.
- Test the Fluent Bit plugin.
- Generate some traffic and wait a few minutes, then check your account for data.
We have published a container with the plugin installed. It serves as a base image to be used by our Kubernetes integration. We recommend you use this base image and layer your own custom configuration files.
Install the Fluent Bit plugin
To install the Fluent Bit plugin:
- Navigate to New Relic's Fluent Bit plugin repository on GitHub.
- From the repository page, clone or download the repository.
Run the following command to build your plugin:
cd newrelic-fluent-bit-output && make all
Configure the Fluent Bit plugin
Pay attention to white space when editing your config files. Be sure to use four spaces to indent and one space between keys and values.
- Locate or create a
plugins.conffile in your plugins directory.
plugins.conffile, add a reference to
out_newrelic.so, adjacent to your
[PLUGINS] Path /PATH/TO/newrelic-fluent-bit-output/out_newrelic.so
fluent-bit.conffile, add the following line under the
[SERVICE] # This is the main configuration block for fluent bit. # Ensure the follow line exists somewhere in the SERVICE block Plugins_File plugins.conf
[INPUT] Name tail Path /PATH/TO/YOUR/LOG/FILE [OUTPUT] Name newrelic Match * licenseKey YOUR_LICENSE_KEY # Optional maxBufferSize 256000 maxRecords 1024
Restart your Fluent Bit instance with the following command:
fluent-bit -c /PATH/TO/fluent-bit.conf
Test the Fluent Bit plugin
To test if your Fluent Bit plugin is receiving input from a log file:
Run the following command to append a test log message to your log file:
echo "test message" >> /PATH/TO/YOUR/LOG/FILE
- Search New Relic Logs for
Optional: Configure plugin attributes
The New Relic license key. Use either
The maximum size the payloads sent, in bytes.
The maximum number of records to send at a time.
||New Relic Insights Insert key. Use either
View log data
If everything is configured correctly and your data is being collected, you should see data logs in both of these places:
- New Relic Logs UI
- New Relic tools for running NRQL queries. For example, you can execute a query like this:
SELECT * FROM Log
Now that you've enabled Logs, here are some potential next steps:
- Explore your data using the Logs UI.
- Configure your agent to see contextual log data, such as distributed tracing, stack traces, application logs, and more.
- Query your data and create custom dashboards, charts, or alerts.
If no data appears after you enable New Relic Logs, follow the troubleshooting procedures.