How to access event log from azure window

I would like to get window event logs from an Azure website instance. when I connect to the RDP of the instance and then to the event viewer, I can see the application and error logs of the event logs. Is there a way to directly access these logs using the API, or something else, or do I need to use Diagnostic so that this log data can be stored, and from there I can access?

+4
source share
2 answers

If you want to access Azure VM event logs directly, the best option is to use the Azure Diagnostics and Azure commands to access the event log data. In my understanding, this is very easy to configure, and as soon as you get access to the event logs, you can download them and save them to your local computer. The method is described below:

http://michaelwasham.com/2011/09/20/windows-event-logs-with-windows-azure-diagnostics-and-powershell/

There is another easy way: create an ASP page and use the event log API to simply access the event log directly in your web role and configure it the way you would like to see. You can find some examples on the Internet on how to do this, i.e. this one . This is a very easy way to get what you are looking for, and the only drawback of this approach is that the ASP page will be available on the website if you do not find ways to protect it.

Although you can use any of the above methods, it’s best to configure and configure Windows Azure Diagnostics to collect event logs from your computer and send them to Windows Azure Storage. The steps are described here if you do not know:

https://msdn.microsoft.com/en-us/library/windows/desktop/bb427443(v=vs.85).aspx

Any other way to collect these logs (using Azure Connect and Remoting, etc.) will be complicated and complex.

+4
source

It should be possible to use http://technet.microsoft.com/en-us/library/cc766438.aspx

Although the port will be blocked by default, you will need to change the firewall settings. See This Article for Port Numbers (Search Event Log) http://support.microsoft.com/kb/832017/en

0
source

Source: https://habr.com/ru/post/1413722/


All Articles