Use these steps to configure a Google Cloud Platform Pub/Sub topic to send logs to New Relic.
Generate a GCP Pub/Sub ingest URL
- Navigate to New Relic Logs
- Click Add more data sources
- Click Google Cloud Platform, then select the New Relic account you want to forward logs to and click Continue.
- Optionally, you can configure metadata. Here you can define attribute-value pairs that will be included in every log event sent to the ingest URL you will generate in the next step.
- Click Generate URL.
- Copy your newly generated ingest URL and keep it in a safe place, you will need it once you are ready to configure a Pub/Sub topic to send logs to New Relic.
Create a GCP Pub/Sub Topic
- Navigate to the GCP Pub/Sub Console
- Click Create Topic
- Enter a meaningful Topic ID, then configure other options as desired and click Create Topic.
Prepare a GCP Pub/Sub Topic to forward logs to New Relic
- Once you have created your Pub/Sub topic, return to the GCP Pub/Sub Console.
- Click on the Pub/Sub topic you created in the last section.
- Scroll down and select the Subscriptions tab, then click Create Subscription and select Create subscription.
- Enter a Subscription ID and select Push under Delivery Type.
- Paste the ingest URL you generated in the first section in the Endpoint URL field.
- Configure remaining settings as desired and click Create.
Forward logs from GCP Cloud Logging to New Relic
- Navigate to the GCP Logs Router Console.
- Click Create Sink.
- Provide a Sink name and Sink description, then click Next.
- Select Cloud Pub/Sub topic under Select sink service, and select the topic you created in the previous section under Select a Cloud Pub/Sub topic.
- Configure remaining filters as desired and click Create sink to complete setup.
What's next?
Explore logging data across your platform with the New Relic One UI.
- Get deeper visibility into both your application and your platform performance data by forwarding your logs with our logs in context capabilities.
- Set up alerts.
- Query your data and create dashboards.
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's and and documentation.