New Relic offers a Fluentd output plugin to connect your Fluentd monitored log data to New Relic. Read on to learn how to enable this feature.
Compatibility and requirements
To forward logs to New Relic using Fluentd, ensure your configuration meets the following requirements:
- Insert API key (recommended) or New Relic license key
- Fluentd 1.0 or higher
Enable Fluentd for New Relic log management
To enable log management with Fluentd:
- Install the Fluentd plugin.
- Configure the Fluentd plugin.
- Test the Fluentd plugin.
- Optional: Configure additional plugin attributes.
- Generate some traffic and wait a few minutes, then check your account for data.
Install the Fluentd plugin
To install the Fluentd plugin:
Configure the Fluentd plugin
NOTE: If you're configuring Fluentd for the first time, you may find it helpful to review our collection of pre-built configuration files addressing common use cases.
To configure your Fluentd plugin:
In your
fluent.conf
file, ortd-agent.conf
if using the td-agent, add the following block of data, replacing the placeholder text with your Insert API key (recommended) or New Relic license key.Restart the Fluentd service to ensure your changes are applied.
Test the Fluentd plugin
To test if your Fluentd 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 UI for
test message
.
Optional configuration
Once you have installed and configured the Fluentd plugin, you can use the following attributes to configure how the plugin sends data to New Relic:
Property | Description | Default value |
---|---|---|
base_uri | The New Relic ingestion endpoint. | US endpoint: |
For more information and examples, see Example Configurations for Fluentd.
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 tools for running NRQL queries. For example, you can execute a query like this:
SELECT * FROM Log
What's next?
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 or alerts.
If no data appears after you enable New Relic Logs, follow the troubleshooting procedures.
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.