• /
  • Log in
  • Free account

Forward your logs to New Relic

Our log management capabilities help you to collect, process, explore, query, and alert on your log data. To get your logs into New Relic, you can:

  • Use your existing log forwarding solution to collect your logs and extend the metadata that is forwarded to New Relic.
  • Use our infrastructure agent as a lightweight data collector, without having to use additional software.
  • Use our Log API to forward your logs via HTTP.
  • Use syslog protocols to forward your logs via a TCP endpoint.

How it works

The following diagram shows the lifecycle of a log message for an app, from enrichment with APM agent metadata (contextual logging), to formatting and forwarding the log data to New Relic.

New Relic logs in context diagram

This diagram illustrates the flow of log messages through New Relic.

Standard log formatters transform log events into meaningful output (such as text files) that can be used by downstream people and processes. The NewRelicFormatter transforms log events into the JSON format expected by New Relic. These files contain log information and extended metadata.

When you configure your log forwarder (our infrastructure monitoring agent, Fluentd, Logstash, etc.), you can also extend and enrich your log data. By configuring logs in context, the log enricher links the formatted log data with additional transaction information from your application or host.

Now your log files are enriched with enhanced metadata and contextual logging data. Your log forwarder sends the files to our logging endpoint for processing. From there you can use our log management capabilities to view, query, set up alerts, and more in New Relic.

Get started with log forwarders

To forward your logs to New Relic with enriched metadata:

  1. If you don't have one already, create a New Relic account. It's free, forever.
  2. Have your New Relic account's license key.
  3. Install a compatible log forwarder.
  4. Ensure that outbound connectivity on TCP port 443 is allowed to the CIDR range that matches your region.
  5. Use the DNS name log-api.newrelic.com or log-api.eu.newrelic.com for configuration.
  6. For apps monitored by a New Relic APM agent, configure logs in context.

Log forwarding options

Use any of these solutions to forward your logs to New Relic.

Recommended:

Amazon:

Microsoft:

Other log forwarding plugins:

TCP endpoint

In some situations you may not have log forwarders; for example, with CDNs, hardware devices, or managed services. You can use syslog protocols such as rsyslog and syslog-ng, and forward your logs to New Relic via a TCP endpoint.

Log API

If you prefer to connect to New Relic without installing a plugin, we offer an HTTP input integration. This option sends your monitored log data directly to New Relic via the Log API.

What's next?

After you enable your log forwarder, make the most of your data in New Relic with our log management capabilities:

For more help

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

Create issueEdit page
Copyright © 2021 New Relic Inc.