Migrate from New Relic Logs
Move new logs from New Relic to your Logit.io Logs stack. Start with Hosted OpenTelemetry if you already send OTLP or are replacing collection from local files. You can also use standalone Fluent Bit or keep Fluentd and Logstash with new outputs.
What carries over
| New Relic Logs | Logit.io |
|---|---|
| OTLP from a Collector or SDK | Change the endpoint and credentials. |
| Infrastructure agent file paths and parsing rules | Move file collection to OpenTelemetry or standalone Fluent Bit. |
| Fluentd and Logstash inputs and filters | Keep them. Replace the New Relic output. |
| Metrics and traces | Send with OpenTelemetry. They are stored only if the stack has the Metrics or APM add-on. This guide moves logs. |
| NRQL queries, dashboards and alerts | Rebuild in OpenSearch Dashboards and Logit.io alerts. |
Option 1: repoint OTLP senders
Check that Hosted OpenTelemetry is switched on for your Logs stack. Copy the URL, username and API key from your Logs stack's Endpoints page. Use https://{stackId}-otel.logit.io with http/protobuf. Authenticate with Basic auth using {stackId}-otel and your stack's Hosted OpenTelemetry API key as the password.
OpenTelemetry Collector
Keep your receivers and processors. Add this extension and exporter to the existing configuration using otelcol-contrib or a build that includes both components. Replace {stackId} and <your-hosted-otel-api-key> with your stack's values.
extensions:
basicauth/logit:
client_auth:
username: "{stackId}-otel"
password: "<your-hosted-otel-api-key>"
exporters:
otlp_http/logit:
endpoint: https://{stackId}-otel.logit.io
auth:
authenticator: basicauth/logitAdd basicauth/logit to service.extensions. Replace the New Relic exporter in service.pipelines.logs.exporters with otlp_http/logit. You can keep both during a comparison. Once the comparison is complete, remove the New Relic endpoint and its license key from the exporter if no other pipeline uses it.
SDKs that send OTLP directly
Update the endpoint, protocol and headers for the logs exporter. Replace the New Relic api-key header with the Authorization header shown here. Clear any old logs-specific overrides if you use these shared settings.
export OTEL_EXPORTER_OTLP_ENDPOINT=https://{stackId}-otel.logit.io
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic%20<base64-username-colon-api-key>"The Hosted OpenTelemetry quickstart shows how to encode {stackId}-otel and the Hosted OpenTelemetry API key for this header. If the SDK still sends metrics or traces to New Relic, use logs-specific settings supported by the SDK so those destinations stay in place.
Option 2: replace infrastructure agent log forwarding
The infrastructure agent uses built-in Fluent Bit log forwarding. Inventory the paths, parsers, multiline rules and attributes in the agent's logging.d configuration. Use the OpenTelemetry Collector for file logs, or configure standalone Fluent Bit if you already have Fluent Bit inputs or parsers you want to keep.
-
Configure the log inputs in your standalone Fluent Bit instance. Use the same file paths and verify the service can read them.
-
Use the output below. Select a Logs stack to fill in the TCP SSL connection details. Set
Matchto the input tags you want to forward.fluent-bit.conf[OUTPUT] Name tcp Match * Host @logstash.host Port @logstash.sslPort tls On Format json_lines json_date_format iso8601 json_date_key @timestamp -
Test one host. Then remove the migrated log forwarding entries from
logging.dand restart the infrastructure agent. Keep the agent if you still use it for infrastructure monitoring.
Option 3: replace the Fluentd or Logstash output
Keep your inputs, filters and match patterns, and replace only the New Relic output. Sign in and select a Logs stack to fill in the connection details in the examples below.
Fluentd
Install fluent-plugin-logit as shown on the Fluentd integration, then replace the New Relic <match> block with the @type logit output. Set your.tag.pattern to the tags you want to forward.
<match your.tag.pattern>
@type logit
stack_id @logs_id
port @logstash.sslPort
buffer_type file
buffer_path /tmp/
flush_interval 2s
</match>Drain any buffered chunks for the old output before you remove it, then restart Fluentd.
Logstash
Replace the New Relic output in your pipeline with the tcp output from the Local Logstash integration. Keep any conditionals that wrap the old output.
output {
tcp {
codec => json_lines
host => "@logstash.host"
port => @logstash.sslPort
ssl_enable => true
}
}Restart Logstash. After a successful test, remove the New Relic ingest URL and license key from the migrated output.
Check the cutover
- In OpenSearch Dashboards, open Discover and find a new event from each shipper you changed.
- Compare counts over the same time window. Check timestamps, host and service fields and multiline messages. If you correlate logs with traces, verify the trace and span IDs on a sample log.
- Rebuild any New Relic parsing rules you rely on as Logstash filters. Rebuild the searches, dashboards and alerts your team uses.
- Watch for duplicate logs if your application already exports OTLP or if two agents read the same file. Remove old forwarding settings after the cutover.
Not covered
- Pointing the infrastructure agent's built-in log output or the New Relic output plugins directly at Logit.io.
- The New Relic Logs API and license-key authentication for Logit.io.
- Importing historical logs, NRQL queries or dashboards.
If you need help planning a migration, contact support via live chat.