4

I have an ASP.Net MVC 4 application hosted on Windows Server 2008. I'm using Microsoft Application Insights, and it's working perfectly for client side metrics such as Client Processing Time, Custom Events, Users, Sessions, Page Views, etc. However, I cannot get any server-side metrics such as Processor Time or Available Memory. The areas are all covered by a banner that says something to the effect of "Learn how to collect server request data". When I click on the banner, it shows a blade with instructions, all of which I've already completed (the quick start).

In addition to installing the Application Insights SDK through VS 2013 (0.12.0-build17386), I've also installed and configured the Application Insights Status Monitor on the server. I've restarted IIS, and even restarted the server. Despite all this, I cannot get any server metrics. I've read the troubleshooting guide, and I've checked everything mentioned therein such as making sure the app pool identity is part of the "Performance Monitor Users" group.

I feel as though there is something I have to do to the ApplicationInsights.config file in order to either turn on and / or define the server metrics I want, but I simply cannot find any documentation on this.

Any help or suggestions would be greatly appreciated. Thanks!

3 Answers 3

6

No you shouldn't do anything additional with ApplicationInsights.config. Performance counters are the part of default monitoring package and almost all problems are related to that user is not the part of 'Performance Monitor Users' group, but it's not your case.

To be sure that config is correct you can check that the following module is defined in ApplicationInsights.config:

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

Also do you see any notifications in the StatusMonitor and/or traces/exceptions in the Diagnostic search at the application insights resource overview blade?

5
  • Thanks for taking the time to reply. I've checked the config file and the module you indicate is present. The only notification in the status monitor is the message about "Application Insights is already enabled for this application the application code...". I searched through the diagnostics and did not see anything that looked suspicious. Thanks again for your help. Do you perhaps have anything else I can look at? Commented Feb 10, 2015 at 13:56
  • 1
    Do you see such server events as basic requests and/or exceptions? I'm curious if the problem related only to the performance counters collection or it's wider and applied to all server-side data. Can you also try to run fiddler and check what's being sent to dc.services.visualstudio.com:443? Ensure that fiddler is running under the same credentials as your web app, or configure a proxy in web.config. In addition check please if you have AI.config in app bin folder and also inspect it for the right instrumentation key and perf collector tag. Commented Feb 10, 2015 at 20:30
  • 3
    Ok, we've got it! There was an ApplicationInsights.config in the root folder of the application, and that was the only one I've ever looked at. At your suggestion, I discovered another one inside the bin folder. This one did NOT have the module definition you specified. (It was basically empty). I copied all the contents of the one from the root into the one in the bin folder, and all the data started to flow. Thank you! I'm not sure - perhaps we can add that to your answer and I will accept and upvote it? Commented Feb 10, 2015 at 23:04
  • Is that it? Don't you have to add each counter you want to add? If you do, how do you figure out the exact format of the counter element? I've added the perfcounter telemetry module, but then I also added specific counters like: <Add PerformanceCounter="\Processor(_Total)\% Processor Time" ReportAs="Processor Time" /> Commented Sep 10, 2015 at 18:36
  • I had the bin folder config also. I think that should be promoted to the answer for this.
    – MvcCmsJon
    Commented Feb 15, 2016 at 21:55
1

Ok, we've got it. There was an ApplicationInsights.config in the root folder of the application, and that was the only one I've ever looked at. At Yulia Safarova's suggestion, I discovered another one inside the bin folder. This one did NOT have the module definition specified. (It was basically empty). I copied all the contents of the one from the root into the one in the bin folder, and all the data started to flow.

1
  • I think you have to remove that one in the root. For me that solved the problem
    – cpiock
    Commented Jul 25, 2017 at 12:07
1

If you are looking for the server data like CPU, Memory, Response rate to be displayed on the Azure Application Insight, then along with the addition of above module, also make sure that the web application Identity user is part of the administrator group on the server. and below flag is turned on in web.config

"EnableAppInsightUsageCollection" value="true"

Not the answer you're looking for? Browse other questions tagged or ask your own question.