Nginx data access_log and error_log

Hi, I would like to know how I can get data from my access_log and error_log from NGINX. I’m using the agent to send the data to New Relic, but so far I can’t see the access_log and error_log data

Hi, @ronald.silva: Have you configured log forwarding? Forward your logs to New Relic | New Relic Documentation.

@philweber Hello Thank you very much for the feedback, I already have the infrastructure agent configured on my server. I would like to know specifically a way to get the data from access_log and error_log? in the documentation you sent me does not address this issue. What is being addressed is the way you send it. But the submission is already configured, using infrastructure agent.

The instructions for configuring the Infrastructure agent to forward logs are here: Forward your logs using the infrastructure agent | New Relic Documentation.

@philweber Hello thank you very much, this documentation helped me to send the access_log data to New Relic

One more thing, there is an option to put in my .yml file a way to delete the line after reading the log, my question might be a point of impact because of disk space. In other words, after reading the log, it removes it from the file line, it would be interesting to clean this so as not to impact the server’s disk.

I am not aware of such an option, but there are utilities to rotate and delete logs: Rotate and archive logs with the Linux logrotate command |