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!
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?
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.
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"
Related
I've installed AI, included in project (VS2013 Update4), but some of the metrics (app heath & diagnostics) are not working.
If i click "Learn how to", the help is always the same... I folowed all the steps, that must be done, but it doesn't work.
What else do I need to do, to get all of the metrics work?
see attached image:
http://i57.tinypic.com/nv75sz.png
thx
peter
confirmed that if you deployed your app to an azure website that you will miss seeing some data in the Application Insights blade. the 2 data flows that won't work specifically include 1) the runtime instrumentation agent - this acts like a profiler and automatically discovers your code dependencies like calls to SQL, another HTTP endpoint, Azure storage account or azure blob and 2) Windows systems performance counters.
1) is something that is very close to being released as an Azure website extension http://www.siteextensions.net/ and will depend on the .12 Application Insight SDK (not released yet)
2) is something that we are still working on an ETA for
Other data visible in the application insights blade should already be working on an azure website. If you don't see your data make sure you are looking at the right application insights resource and double check the instrumentation key. Also make sure you have manually added the client side instrumentation script which isn't added by default when we add application insights to an existing project (ie. not a new project).
Currently I'm working on a piece of code that involves using the Crystal Reports Viewer to export .RPT files to PDF. My problem is that the code works on literally everything except the website I'm planning to eventually put it on.
When placed on the website it throws back the error "Failed to open the connection." which I believe is connected to the SQL Server connection that's formed in order to read data for the report itself.
The code itself is solid and works when used in a separate console application I built to test it whether said code is run on my local machine or on the server itself. It even runs when I test the website in Visual Studio's virtual host.
I've narrowed it down to being some sort of permissions issue, but I am not knowledgeable enough in the various permissions settings to figure out which ones specifically apply to this situation. It's worth mentioning that other pages on the website are directly connecting to the same database, but they are doing so directly through Linq instead of going through the Crystal Report Viewer.
So does anybody know which settings I need to modify in order to fix the connection error.
An added note: One of the other suggestions is to make sure there's an ODBC DNS in place that matches the one being used by the code. I have created such a DNS already.
Application Pool dictates how your application runs in many ways. You can probably configure the web.config to run under the credentials, or access level of your choice.
Solution for people who didn't read the comments:
Change the identity under the advanced setting's of your application pool to the desired level of access.
Glad I could help.- J
I have the following scenario:
I publish a page which contains multiple binaries which is then received by an HTTP Receiver and Deployed using an in-process Deployer all hosted in IIS in a dedicated application pool running as the Local Service user.
The Page is stored in the Broker Database, and the binaries are published to the local file system using a path like "D:\Binaries\Preview".
The preview folder is shared to a domain user as a read only share at something like \machinename\PreviewBinaries so that the binaries can be displayed using the web application.
Nine time out of ten everything works fine, but occasionally publishing fails, and it seems to be because the binaries can not be overwritten due to them being locked by another process. I have used ProcessMon and other tools to try and establish what might be locking these files (to no avail). Sometimes I can manually delete the images, and then publishing works again. If I restart IIS on the server I can always delete the files and publish.
Does anyone have any suggestions on what processes could be locking these images? Has anyone seen this issue before? Could there be any issues that I am publishing to a share? Or could SiteEdit 2009 possibly be locking these files as it only seems to occur on our preview server and live (no SiteEdit) seems fine.
Thanks in advance
If you're on Windows 2008, you can try and delete the file from disk. It will then tell you what process has locked the file. But given that restarting IIS unlocks the file, it seems quite likely that it is IIS that keeps a lock on them.
I don't see how SiteEdit 2009 could cause a lock on these files. Given that you can have your preview server on another box, SiteEdit only talks to that server through HTTP. It never accesses the files on the preview server directly and not even through a CD API. Just regular requests to your web server, just like a visitor would.
Again, not a direct answer but I wanted to share this anyway:
I've seen a similar situation where I published Pages to the Broker Database and Binaries to the file system. When I changed the Identity of the Application Pool to Network Service this problem disappeared, and I haven't looked into it further.
OK, well it seems the offending code was in the Presentation Framework we are using. The framework used Response.TransmitFile(binaryPath) to asynchronously transmit the binaries to the clients. It seems that this puts a temporary lock handle on the binaries (even when they are on a read only share).
We have removed this line of code, and modified the application to server binaries in another way (we now rewrite the path so that IIS can transmit the files directly). This seems to have solved the issue, and improved site performance.
Thanks for all your suggestions, it helped me rule out all the things that were not causing the issue, so I was able to find the root cause.
Are there any Anti-virus or indexing services running. These tend to take very short-lived locks at just the moment you don't want them to. Particularly with Anti-virus, this is typically just as one process relinquishes its lock and just before your other process tries to take one. If this is the issue, then setting up some exclusion directories should help.
I see you have used Process Monitor, but have you tried Sysinternals Process Explorer? "Find->Find Handle or Dll" is pretty useful for this kind of thing. Or if you prefer a command line tool, Sysinternals aslo make handle.exe, which dumps everything out for you.
I have recently deployed my web role to Windows Azure. In the properties of my WebRole I have set Enable Diagnostics.
I can also see that it correctly maps to a storage account once deployed by viewing the configuration file of the hosted service.
I have not setup anything else for diagnostics, I am unaware that I need to do anything else.
I am now setting up AzureWatch (by paraleap) to monitor my instances however it reports that WADPerformanceCountersTable does not exist.
I am very new to Azure, don't have a clue how the diganostics work and can't find anything on Google that shows me how. Could someone please show me the way.
Ok I figured it out and will leave this here for others to follow.
Step 1
If you follow http://dunnry.com/blog/2012/02/27/SettingUpDiagnosticsMonitoringInWindowsAzure.aspx Windows Azure Diagnostics will start saving data into your attached Blob storage, full of diagnostic information.
Special Note: These count towards your storage transaction, which is why you will see them go up.
Step 2
However I needed the WADPerformanceCounterTable, which should have been located in the tables section of the storage account but it never was created. I needed this to use services like AzureWatch to monitor and spin up or down instances.
Special Note: This is performance counters, a specific subset of diagnostic information and this isn't stored in the blob section by default.
Step 3
In your project you need to add which performance counters to monitor in the WebRole.cs.
Special Note: You won't have this if you just added an existing project to an Azure deployment project. Unless you specifically started the project from scratch and chose the Azure templates, you will need to create this manually. You would also need to add: Microsoft.WindowsAzure.Diagnostics, Microsoft.WindowsAzure.ServiceRuntime and Microsoft.WindowsAzure.StorageClient as References. Best way to see how it all works is to create a blank project from an Azure template and copy over the necessary items.
Step 4
Next you need to define which performance counters to monitor. As such here is a great sample: http://code.msdn.microsoft.com/windowsazure/Windows-Azure-PerformanceCo-7d80ebf9
Extra Reference
Microsoft also has a few steps you can follow here that might help out if things still aren't working: http://msdn.microsoft.com/en-us/library/windowsazure/hh411521.aspx
Take a look at:
http://dunnry.com/blog/2012/02/27/SettingUpDiagnosticsMonitoringInWindowsAzure.aspx
There is also a lot of information on:
http://msdn.microsoft.com/en-us/library/windowsazure/gg433048.aspx
Is there a way to profile IIS7? (freeware?)
Number of connections
Bandwidth usage
Errors (Event Viewer?)
-...
thx, Lieven Cardoen
ps: Something similar to mssqlserver profiling
There's nothing quite like MSSQL's profiler, but a set of tools:
Perfmon will show you the # of current connections per website. Perfmon.msc, web service, current connections, select website, click add. Don't like the interactive nature of perfmon? No problem, use logman.exe, a nice CLI for perfmon.
Bandwidth usage you can get from your log files if you enable bytes sent & bytes received in your iis log files. This is also available via performance counters - web service, bytes sent/received/sec. I think the two complement each other fairly well.
IIS7 has a new feature called Failed Request Tracing. You can tell it to log on all 500's,or any .aspx page that takes 15 seconds to run, or based on event severity. It saves all of this information in an XML file for you under \inetpub so it's easily parseable, and also gives you a nice XSLT to view it in your browser and drill down if you like.
http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis7/
Try out the Administration Pack for IIS 7.0. It has:
Configuration Editor:
The configuration editor module will help you manage your configuration files. This tool is available for server administrators only. It allows you to edit any section, attribute, element or collection in your configuration file. In addition to editing these values you are also able to lock and unlock them. The configuration editor also allows you to generate scripts based on the actions you take as well as search the file to see where values are being used.
IIS Reports:
The IIS Reports module enables you to view key statistics about your website. You can also generate your own module reports to gather information relevant to you and your business. Currently you can view the output of these reports as charts and/or tables.
Database Manager:
This module is no longer part of the Administration Pack and instead is offered as a separate download in the IIS Download Center.
UI Extensions:
UI Extension modules allow you to manage existing features through IIS Manager.
The FastCGI module allows you to manage your FastCGI settings.
The two ASP.NET modules allow you to manage your authorization and custom errors settings.
Finally the HTTP Request Filtering allows you to setup rules for http request filtering.