NewRelic get logs from database

468 Views Asked by At

I need to send my application's error logs to NewRelic.

I am already saving these logs in a database, I would like to know if there is a way for NewRelic to retrieve it from the database.

1

There are 1 best solutions below

0
On

If you are using MSSQL you can use this link below that shows you the installation for the On-Host Integration - there is a wonderful feature here that allows you to use a custom query and send that data up into New Relic.

https://docs.newrelic.com/docs/infrastructure/host-integrations/host-integrations-list/microsoft-sql/microsoft-sql-server-integration/

That will solve your current issue and allow you to get visibility into your logs.

I will ask however if your logs are coming from an application on your server. The updated 9.8+ Agent will automatically pull application logs in context and send them up. Depending on your DB size this may help achieve the same result with less storage waste.

https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/get-started-logs-context/