I have an Azure Linux VM running a custom product. I want to upload the logs to Azure. At this point I just want to save the logs in Azure, but at a later date I will possibly scan the logs for errors, generate notifications, scan for metrics, or possibly automate some kind of recovery action. My log is not showing up and I am not sure what to check. Here is what I have done:
- Created a new Workspace.
- Installed version 1.9.0.0 of the Linux version of the OMS Agent from git.
- In the Azure console when I click on my workspace -> Advanced settings -> Linux Servers I see that my Linux server is connected.
- I clicked on Advanced settings -> Data -> Custom Logs and created a custom log for my application.
- I then went and generated some new logging statements.
I have waited for 4 hours because I know there can be some time to process and set this up. When I click on Logs and enter the name I gave my custom log, (e.g. MY_APP_CL) and click Run I am not getting any results. The log exists on the VM that is connected to my Workspace.
Can someone please tell me what to check? Here are my guesses as to what is wrong so maybe you can let me know if any seem likely and what the fix could be.
a. My log query is wrong. I just have the name I have given my custom log and this is what populated in the query line when I click on my log from the “Custom Logs” dropdown.
b. When I created the custom log it asked for a sample, which I had on my local Windows laptop. It is looking for the file from my laptop because that is where it got the sample from, or does Azure look for this log on every server connected to the Workspace with a file matching the path? I created the custom log as a Linux path and it does exist.
c. I am using the wrong agent, or technology to send custom application logs to Azure? I was somewhat confused by what appears to be multiple ways of doing this, and also some of this has been renamed recently so some of the documentation used both the old and new naming. Hopefully someone can confirm I am at least on the right track.
Thanks for any help!