gpt4 book ai didi

c# - 如何将磁盘可用空间性能计数器添加到 Azure Application Insights?

转载 作者:行者123 更新时间:2023-12-02 08:02:39 25 4
gpt4 key购买 nike

我知道 Azure Application Insights 可以在 ApplicationInsights.config 中使用以下语法收集其他性能计数器:

  <Counters>
<Add PerformanceCounter="\Process(??APP_WIN32_PROC??)\Handle Count" ReportAs="Process handle count" />
...
</Counters>

PerformanceCounter must be either \CategoryName(InstanceName)\CounterName or \CategoryName\CounterName

-->
</Add>

如何实际将“可用磁盘空间”和“可用磁盘空间 %”性能计数器添加到此文件?

另外,旁注,我希望 Application Insights 已经收集了这个,有点令人惊讶的是我们必须花这么长时间来添加它。

非常感谢任何有关此问题的帮助!

最佳答案

请尝试在 ApplicationInsights.config 中进行以下设置:

 <Counters>
<Add PerformanceCounter="\LogicalDisk(_total)\% Free Space" ReportAs="the space perc"/>
<Add PerformanceCounter="\LogicalDisk(_total)\Free Megabytes" ReportAs="the space left"/>
</Counters>

关于c# - 如何将磁盘可用空间性能计数器添加到 Azure Application Insights?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52460892/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com