Send logs to New Relic
Coolify's built-in New Relic log drain sends opted-in resource logs to the New Relic Log API.
Before you start
Create or copy a New Relic ingest license key. Coolify accepts letters, numbers, underscores, hyphens, and periods in License Key.
Choose the endpoint
Coolify requires Endpoint to be a valid URL.
Configure New Relic in Coolify
Enable a resource
Follow Enable log draining for a resource, then restart or redeploy the resource.
The built-in New Relic configuration flushes records every five seconds.
Identify logs
The built-in configuration adds fields that help you filter records.
For example, add this environment variable to the resource:
COOLIFY_APP_NAME=workerThe built-in filter excludes log records whose message contains 127.0.0.1. Local health-check requests may therefore be absent from New Relic.
Verify delivery
- Cause the resource to write a recognizable message to
stdoutorstderr. - Wait at least five seconds.
- Open New Relic Logs and search recent events for the message,
coolify.server_name, orcoolify.app_name.
Verification in New Relic is required because Coolify does not perform a provider connection test.
Update the endpoint or license key
- Turn off Enabled in the New Relic section.
- Update License Key or Endpoint.
- Select Save.
- Turn on Enabled again.
- Generate a new resource log and confirm that it arrives in New Relic.
Fix missing logs
- Confirm New Relic is the enabled server drain and the resource's Drain Logs setting is on.
- Confirm you restarted or redeployed the resource after enabling the setting.
- Confirm the key is an ingest license key for the same New Relic account and region as the endpoint.
- Confirm the server can reach the selected endpoint on port
443. - Inspect the Fluent Bit container on the resource server:
docker ps --filter name=coolify-log-drain
docker logs --tail 100 coolify-log-drainAuthentication, endpoint, and network errors appear in the Fluent Bit output.
