I'm not able to view the Logs

Hello Everyone,

I need your help for setting up the Logs for my application , I have guided installed the New Relic for the Application performance monitoring and I have successfully configured the Java agent and New Relic Infrastructure agent. The application is running fine also it has been added as a service in the New Relic for the monitoring, all other functionalities are working fine but when i try to switch to see the Logs everytime it asks me to install the infrastructure agent again and again while i have installed that already.
So I don’t know what i have been missing during the whole installation.
It would be very much appreciated if you please help me out in this.

Thanks!

Hey Ayush,

There are multiple reasons that you might not be seeing the logs. here is a few prominent ones:
https://docs.newrelic.com/docs/logs/troubleshooting/no-log-data-appears-ui

Let me know if you are hitting any of the errors given the doc

Kind regards,
Suman

Hey Suman,

I’ve tried every hit an trail method I could have but everytime there is only one thing that appears on the screen and that is “Install Infrastructure Agent” .
I’ve already installed it couple of times and all I can see there, is nothing.
I also want to add this thing here that I am the Full Plateform User and all the appropriate roles has already been assigned and the APM Log settings is also enabled.

Looking forward for a help.

Thanks!


Hey @ayush.deol ,
Since you are using infra agent: Can you please confirm if you are using the following doc for log forwarding? : Forward your logs using the infrastructure agent | New Relic Documentation

Can you please confirm if fluent bit is running on your system.
Can you share the logging.d folder? Here is an example of logging.d folder for linux: infrastructure-agent/assets/examples/logging/linux at master · newrelic/infrastructure-agent · GitHub

Thanks,
Suman

Hey @sjyoti ,

The newrelic- infra and fluent-bit services are running fine.

Please have a look at the screenshots and assist me further.

Thanks!


Hi @ayush.deol ,

Thank you for the screenshot.

Is the java available in /var/log?

Can you please add the file that you need in logging in file.yml.

There is an example file for file.yml.example

Let me know if you are able to see the logs after adding them to file.yml

Reference:

Hi,

Can you please run the following query on “Query your data”:
Select * from Log
Do you receive any results?

Thanks,
Suman

Hi Suman ,

After executing the above mentioned query it only returns the logs of the infrastructure agent only.

Please go through the screenshot for the details.

Still needs to figure out what should I do to get the logs of my application.

Thanks!

Hi @ayush.deol

I will need to loop in the engineering team here to have a deeper look as this is out of my usual scope.

Please note they will reach out via this post with any findings, as always please reach out if you have any additional questions.

1 Like

Hi @dcody

Thanks for showing the concern towards the problem.

I will be actively waiting for the solutions. Hoping that the engineering team will come out with something that might help me with the issue.

Hi ayush.deol, thanks for writing in.
For this case you’ll need to implement logs in context with the APM agent that corresponds to your application language. Please see doc here:
https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/get-started-logs-context
If you’re not concerned with the infra agent logs you can shut those down as the APM agent will automatically by default forward application logs.

Hi @ayush.deol ,

Can you please check if java logs available in /var/log?
Can you please add the file that you need in logging in file.yml.

There is an example file for file.yml.example

github.com

newrelic/infrastructure-agent/blob/master/assets/examples/logging/windows/file.yml.example

###############################################################################
# Log forwarder configuration file example                                    #
# Source: file                                                                #
# Available customization parameters: attributes, max_line_kb, pattern        #
###############################################################################
logs:
  # Basic tailing of a single file
  - name: basic-file
    file: C:\logs\logFile.log

  # File with spaces in its path. No need to use quotes.
  - name: file-with-spaces-in-path
    file: C:\ProgramData\Vendor Name With Spaces\Application Name\logFile.log

  # Specify a list of custom attributes, as key-value pairs, to be included
  # in each log record
  - name: file-with-attributes
    file: C:\logs\logFile.log
    attributes:
      application: tomcat

This file has been truncated. show original

Let me know if you are able to see the logs after adding them to file.yml

Reference:

Use Guided Install To Add Logs to New Relic One
[/quote]

I hope it helps.

Thanks,
Suman