Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Insights - No data for 'process cpu'

I'm in the process of setting up app insights for a WCF project. The problem I'm having is I can't seem to get it to report on the process cpu, available memory etc. The charts just say no data.

I've got

<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector">

Included in my applicationinsights.config file as I saw in another post that this is required, but this doesn't seem to sorted it.

Does anyone know if I need to add anything else to my project to get this too work? I assumed that this information would be collected by default.

like image 461
Martin Avatar asked Nov 16 '15 11:11

Martin


2 Answers

I came across with very similar issue. Getting all other data on application insights, but no servers data such as average process CPU, available memory, process IO rate etc.

I found out that on the servers, my application running under application pool does not have sufficient permission to collect performance data.(You can check about this in Application Insights Status Monitor Preview, usually if you have permission issues, there will be a warning message about it)

Make these two steps:

  1. In IIS Manager, select your application pool, open Advanced Settings, and under Process Model note the identity.
  2. In Computer management control panel, add this identity to the Performance Monitor Users group.

Once the application pool have sufficient permission to collect performance data. All the data of servers are showing on insights.

https://azure.microsoft.com/en-us/documentation/articles/app-insights-monitor-performance-live-website-now/

like image 150
AmyG Avatar answered Oct 02 '22 16:10

AmyG


Because you say that you added performance counters module manually to configuration file I assume that you did not use Web SDK nuget package that is supposed to add this module there automatically. If so you need to configure it in code rather than creating a configuration file. You need to create this module in code and also set instrumentation key.

TelemetryConfiguration.Active.InstrumentationKey = "Foo";
this.perfCounterCollectorModule = new PerformanceCollectorModule();

More here.

like image 38
Anastasia Black Avatar answered Oct 02 '22 14:10

Anastasia Black