Getting started with Application Insights gotchas: installing the monitoring agent on your server

By | 2013-11-25T12:29:09+00:00 November 25th, 2013|Application Lifecycle Management (ALM)|Comments Off on Getting started with Application Insights gotchas: installing the monitoring agent on your server

Over on there is a pretty good walkthrough on installing the AI agent on your server, however there is one small caveat that it neglects to mention.


After installing the agent my server is listed in Application Insights, but no data is flowing. You can tell really quickly that this is happening from the Application Insights portal on the Overview => Servers tab as in the below screenshot.


Notice that one server is green (reporting) while the other is grey (not-reporting)?



After a while of searching I figured out what went wrong. After running through the wizard to install the agent, I clicked the “Finish” button and thought I was done.


So when this screen popped up, I just closed it without really thinking about it (not the best idea I’ve ever had, but I was trying to set up a demo in a hurry).


Bad idea. Basically I didn’t wait for the agent to actually start reporting any data. It was installed, but not actually monitoring anything. The same thing can also happen if you unclick this checkbox in the wizard.



There are two options to start monitoring your applications.

To start monitoring all Sites

Go here: C:\Program Files\Microsoft Monitoring Agent\Agent\APMDOTNETAgent and run StartMonitoringAllApplications, wait for it to finish this time and you should be good to go.




To start monitoring a particular Site

Start => “monitor” run “Monitoring Agent PowerShell Prompt” as in the below screenshot.



Which will get you here.


Unfortunately the web site listed doesn’t, as of the time of writing this article, point to a page that has anything to do with this command line tool. So if you’re smart you’ll load the entire script into PowerShell and try and decipher what is going on. Or you can be like me and think that option #2 is what you’re looking for and brute force your way into realizing the command format is:

Start-WebApplicationMonitoring <sitename> <monitoringtype> cloud

Note that the “cloud” here is very important, as otherwise it will prompt you enter a local path. Doing so will set the reporting status to “local”. I’m not sure what exactly you can do with that, other than that it won’t report data externally if you have it set this way (I think…).

About the Author: