2

我们在我们的一些站点上运行 Application Insights,我们希望从 Windows 事件日志中聚合日志。我们在 Windows Server 2016 上运行。

我知道像弹性这样的其他日志托运人有可能从 Windows 事件日志中发送日志。Application Insights 有可能吗?

编辑 22.10.2018

在@cijothomas 发表评论后,我尝试添加 Microsoft 的 EtwCollector nuget 包,并在配置中添加了一些提供程序。

<Add ProviderName="Microsoft-Windows-Crashdump" Level="Warning"/>
<Add ProviderName=".NET Common Language Runtime" Level="Warning" />
<Add ProviderName="ASP.NET Events" Level="Warning" />
<Add ProviderName="Microsoft-Windows-IIS-IISReset" Level="Warning" />
<Add ProviderName="Microsoft-Windows-HttpLog" Level="Warning" />

在 Application Insights 中,我现在可以从应用程序中获取跟踪信息。

AI: Failed to enable provider for the EtwTelemetryModule. Access Denied.

例如对于 Microsoft-Windows-IIS-IISReset 提供程序。

AI: Failed to enable provider Microsoft-Windows-IIS-IISReset for the EtwTelemetryModule.

我已将应用程序用户进程添加到 Windows 中的“性能日志用户”组。我需要添加任何其他设置以允许从该提供商发送日志吗?

4

1 回答 1

3

您是说 ETW 事件吗?如果是,则 Application Insights 有一个适配器以将 ETW 事件作为 Application Insights Traces 发送。 https://docs.microsoft.com/en-us/azure/application-insights/app-insights-asp-net-trace-logs#using-etw-events

或者,您始终可以手动执行 TrackTrace() 方法将任何跟踪发送到 Application Insights。 https://docs.microsoft.com/en-us/azure/application-insights/app-insights-api-custom-events-metrics#tracktrace

于 2018-03-21T15:02:21.823 回答