• /
  • Log in
  • Free account

Logstash plugin for log forwarding

If your log data is already being monitored by Logstash, you can use our Logstash plugin to forward and enrich your log data in New Relic.

Forwarding your Logstash logs to New Relic will give you enhanced log management capabilities to collect, process, explore, query, and alert on your log data.

Enable Logstash for log management

To forward your logs from Logstash to New Relic:

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

Install and configure the Logstash plugin

To forward your logs to New Relic with our Logstash plugin:

  1. Enter the following command into your terminal or command line interface:
    logstash-plugin install logstash-output-newrelic
  2. In your logstash.conf file, add the following block of data. Be sure to replace the placeholder text with your New Relic license key.
    output {
      newrelic {
      license_key => "LICENSE_KEY"
  3. Restart your Logstash instance.

Optional configuration

After you install and configure the Logstash plugin, you can use the following attributes to configure how the plugin sends data to New Relic. For more information on adding or configuring attributes, see our Logstash configuration examples in GitHub.




The number of threads to make requests from. Default: 1


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. Default: 3

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 the 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:


If no data appears after you enable our log management capabilities, follow our standard log troubleshooting procedures.

What's next?

Explore logging data across your platform with the New Relic One UI.

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.