问题
I am struggling to solve this task, to get a log-file in to Azure Log Analytics.
This is what I did: I created a workspace from Log Analytics workspaces then I made a custom log following these steps and set the path to where in my Linux-VM is the log-file. My log-file has the same criteria as mentioned.
Then, I installed an agent on my VM so that it connects to my workspace, running this in my VM:
wget https://raw.githubusercontent.com/Microsoft/OMS-Agent-for-Linux/master/installer/scripts/onboard_agent.sh && sh onboard_agent.sh -w <Workspace ID> -s <Primary key> -d opinsights.azure.com
Set an AllowOutBound and AllowInBound rules:
So I restart the VM, back to my workspace then Logs.
I run my custom log and I get No results:
I restart my machine, do it again and I got same result. Tried with another custom log and I get same result.
I know for sure that my log-file is in VM under: /home/azagent/_work/1/TestSuite/selenium/log.log
(this is the path I added to the custom log). It seems there is no connection between VM and Azure Log Analytics? But in Agents management, I can see that there is 1 Linux computers connected
Can anyone help me with this?
来源:https://stackoverflow.com/questions/65232541/why-i-cannot-get-a-log-file-into-azure-log-analytics