If your log data is already being monitored by Fluent Bit, you can use our Fluent Bit output plugin to forward and enrich your log data in New Relic.
Forwarding your Fluent Bit logs to New Relic will give you enhanced log management capabilities to collect, process, explore, query, and alert on your log 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.
To forward your logs from Fluent Bit to New Relic:
- Make sure you have:
- 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.
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
out_newrelic_winXX.dllat a location that can be accessed by the
If you'd rather not compile the plugin yourself, you can download pre-compiled versions from our GitHub repository's releases page.
Fluent Bit needs to know the location of the New Relic plugin and the New Relic license key to output data to New Relic. To configure your 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
serviceblock:[SERVICE]# This is the main configuration block for fluent bit.# Ensure the follow line exists somewhere in the SERVICE blockPlugins_File plugins.conf
At the bottom of the
fluent-bit.conffile, add the following to set up the input and output filters. Replace the placeholder text with your New Relic license key:
[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
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's Logs UI for
To associate a log line with an entity, such as an infrastructure host, add a
[FILTER]Name modifyMatch * # Or specify a matchAdd entity.guids <Your Entity GUID ID> # OptionalAdd hostname <Your hostname> # Optional
The New Relic license key. Use either
The maximum size the payloads sent, in bytes. Default:
The maximum number of records to send at a time. Default:
Deprecated. Takes a New Relic Insights insert key, but using the
If everything is configured correctly and your data is being collected, you should see data logs in both of these places:
- New Relic's Logs UI
- New Relic tools for running NRQL queries. For example, you can execute a query like this:
SELECT * FROM Log
If no data appears after you enable our log management capabilities, follow our standard log troubleshooting procedures.
Explore logging data across your platform with our Logs UI.
- Get deeper visibility into both your application and your platform performance data by forwarding your logs with our logs in context capabilities.
- Set up alerts.
- Query your data and create dashboards.
To disable log forwarding capabilities, follow standard procedures in Fluent Bit documentation. You do not need to do anything else in New Relic.