是否可以将Windows事件记录到应用程序洞察中? [英] Is it possible to log windows events to application insights?

查看:17
本文介绍了是否可以将Windows事件记录到应用程序洞察中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

我知道,其他日志发送者,如Elelect,也有可能从Windows事件日志中发送日志。是否可以通过应用程序洞察进行访问?

编辑2018年10月22日

在@cijothoma的评论之后,我尝试添加来自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" />

在应用程序洞察中,我现在从应用程序获取跟踪。

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中的"性能日志用户"组。是否需要添加其他设置才能允许从此提供程序传送日志?

推荐答案

您是指ETW活动吗?如果是,则Application Insights具有将ETW事件作为Application Insights跟踪发送的适配器。 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

这篇关于是否可以将Windows事件记录到应用程序洞察中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆