Why I cannot get a log-file into Azure Log Analytics?

怎甘沉沦 提交于 2021-01-07 02:53:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!