Question

We need to enable 25+ performance counters in windows azure web roles. I'm thinking of RDP'ing and enable them one by one. But this could take long time and also not guranteed for if we scale up.

Could someone please help me whether it's possible to automate this process? Preferably Powershell but other solutions are ok as well.

Was it helpful?

Solution

There is no way to enable performance counters by RDP'ing into Windows Azure machines, because performance counters are published by Windows regardless.

However, what I think you're asking for is to capture the 25+ performance counters into Azure Diagnostics store?

If that is the case, you will need to:

1) Enable Azure Diagnostics on your Web Roles. This must be done before deployment. It is a best practice and mostly everyone does it (I sure wish Microsoft would have just done it for every Role w/o explicit configuration setting, but

2) There are multiple ways to instrument capture of performance counters into diagnostics store:

a) using diagnostics.wadcfg file http://msdn.microsoft.com/en-us/library/gg604918.aspx (you will need to redeploy your app with that file)

b) using powershell (although I've never done it myself) http://michaelwasham.com/2011/09/19/windows-azure-diagnostics-and-powershell-performance-counters/ or http://www.davidaiken.com/2011/10/18/how-to-easily-enable-windows-azure-diagnostics-remotely/

c) using in-code instrumentation (you'll need to re-upload your app everytime you change which counters you want enabled) http://www.codeproject.com/Articles/303686/Windows-Azure-Diagnostics-Performance-Counters-In (I dont recommend in-code configuration, because it is too brittle)

d) using 3rd party tools like Cerebrata Diagnostics Manager or AzureWatch

e) using Azure Service Management API in conjunction with Azure Diagnostics API to get at the individual instance configuration and update it (this is how the third party tools & powershell do it)

In cases of using powershell, management API directly, or a tool like Cerebrata, you configuration will "stick" for the life of the deployment. Once you re-upload a new version of the app, the configuration will be lost.

Using diagnostics.wadcfg, in-code instrumentation, or AzureWatch, your configuration will persist throughout the re-uploads of the app

HTH

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top