• /
  • Log in

Logstash plugin for log forwarding

Use our Logstash output plugin to connect your Logstash monitored log data to New Relic. Read on to learn how to enable this feature.

Compatibility and requirements

To forward your logs to New Relic using Logstash, you'll need:

Enable Logstash for log management

To enable log management using Logstash:

  1. Install the Logstash plugin.
  2. Configure the Logstash plugin.
  3. Optional: Configure additional plugin attributes.
  4. Test the Logstash plugin.
  5. Generate some traffic and wait a few minutes, then check your account for data.

Install the Logstash plugin

To install the Logstash plugin, enter the following command into your terminal or command line interface:

logstash-plugin install logstash-output-newrelic

Configure the Logstash plugin

To configure your Logstash plugin:

  1. In your logstash.conf file, add the following block of data. Be sure to replace the placeholder text with your New Relic license key.

    Configure with the New Relic license key:

    output {
      newrelic {
        license_key => "LICENSE_KEY"
  2. Restart your Logstash instance.

Optional configuration

Once you have installed and configured the Logstash plugin, you can use the following attributes to configure how the plugin sends data to New Relic:



Default value


The number of threads to make requests from.



The New Relic ingestion endpoint.

US endpoint: https://log-api.newrelic.com/log/v1
EU endpoint: https://log-api.eu.newrelic.com/log/v1


Maximum number attempts to retry to send a message. If set to 0, no re-attempts will be made.


For more information on adding or configuring attributes, see Example Configurations for Logstash.

Test the Logstash plugin

To test if your Logstash plugin is receiving input from a log file:

  1. Add the following to your logstash.conf file:

    input {
        file {
          path => "/PATH/TO/YOUR/LOG/FILE"
  2. Restart your Logstash instance.

  3. Run the following command to append a test log message to your log file:

    echo "test message" >> /PATH/TO/YOUR/LOG/FILE
  4. Search New Relic Logs UI for test message.

View log data

If everything is configured correctly and your data is being collected, you should see data logs in both of these places:

What's next?

Now that you've enabled Logs, here are some potential next steps:

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:

Create issueEdit page
Copyright © 2021 New Relic Inc.