Hi,
I am trying to capture the following PerformanceCounters on the Azure WebRole:
private string[] perfCounters = { @"\Processor(_Total)\% Processor Time",
@"\ASP.NET Applications(__Total__)\Requests/Sec",
@"\Memory\Available Bytes",
@"\ASP.NET\Request Execution Time",
@"\ASP.NET\Requests Queued"};
I have in my WebRole.cs the following code to enable capturing of these perf counters as this:
DiagnosticMonitorConfiguration config = DiagnosticMonitor.GetDefaultInitialConfiguration();
int loggingInterval = Int32.Parse(RoleEnvironment.GetConfigurationSettingValue("loggingInterval"));
config.Logs.ScheduledTransferPeriod = System.TimeSpan.FromMinutes(loggingInterval);
foreach (String s in perCounters)
{
PerformanceCounterConfiguration procTimeConfig = new PerformanceCounterConfiguration();
procTimeConfig.CounterSpecifier = s;
procTimeConfig.SampleRate = System.TimeSpan.FromMinutes(1.0);
config.PerformanceCounters.DataSources.Add(procTimeConfig);
}
config.PerformanceCounters.ScheduledTransferPeriod = System.TimeSpan.FromMinutes(1.0);
DiagnosticMonitor.Start("DiagnosticsConnectionString", config);
As you see, I am setting the scheduled xfer period of perf counters to 1 min.
Now, I am able to get these counters in the WADPerformanceCounters table on my dev fabric, but I am not able to get them on the azure cloud? Can anyone point out what could I be doing wrong here?
Kapil