Accessing performance counters through a cluster

745 Views Asked by At

I am trying to find how to make performance monitoring available over a cluster, and I can't find seem to find anything while searching other than how to access performance counters for a cluster.

The situation is this: Up until now, we've had MSMQ set up on single servers, and we've accessed queue counts (for health check purposes) like this:

ManagementScope scope = new ManagementScope(@"\\MachineName\root\CIMv2");
scope.Connect();

ObjectQuery query = new ObjectQuery("SELECT * FROM Win32_PerfFormattedData_msmq_MSMQQueue WHERE Name = 'MachineName\private$\QueueName'");
ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);

ulong? count = (from ManagementObject queue in searcher.Get()
                select (ulong?)queue.GetPropertyValue("MessagesInQueue")).FirstOrDefault();

However, when I try to do the same through the Client Access Point name for an MSMQ cluster (in place of the MachineName), I get System.Management.ManagementException: Invalid Class, which, from what I can tell, indicates that the performance counters are unavailable. Which makes sense, since we haven't done anything special to make them available over the cluster, since we don't know how.

So, any direction would be greatly appreciated. I've been banging my head over this for weeks.

EDIT: Okay, we've poked around a bit more, and the table/class exists if we go directly to the cluster, but there are no rows in the table whatsoever.

Did find the NetNameForPerfCounters registry key, but it doesn't look to fit our situation, since we only have one MSMQ instance running on the active node, and all of the servers involved are Windows Server 2008 (R2 I think).

I'd be willing to have them put in the NetNameForPerfCounters reg key, but I can't find a resource to tell me where it goes. Does it go into the registry for the client access point (since you can connect regedit to the client access point)? Does it go on the cluster? On the individual machines? On the client machine? (Guess we could just put it everywhere just to test it.)

EDIT2: We tried the NetNameForPerfCounters, and it did not work. We've actually had a team at Microsoft replicate our issue, so we've opened a premier support case, and it should be going to the product team as a bug. Will post results when I hear back.

0

There are 0 best solutions below