We’ve got quite a lot of 2008 and 2008 R2 VMs. I’m having problems with the CPU % processor time metric. For 2008 servers it’s ‘Processor – % Processor Time’, but for 2008 R2 servers it’s ‘Processor Information / % Processor Time’. This means on the Server 2008 perspective that I often have a blank CPU graph, depending on which metric is selected and whether it’s an R2 or non R2 server!
Is there a way I can pick one metric that will show % Processor Time regardless of whether it’s 2008 or 2008 R2? I tried to create a 2008 R2 perspective, but that resulted in all of the 2008 Non R2 computers having no CPU information 😕
I haven’t tested this, but give it a try – When you create the perspective, try creating the perspective “For Members Of”. you should have an option to target it to a class. From there, choose “Windows Server 2008 Computer” as your class. Then repeat for “Windows Server 2008 r2 Computer” (using correct metric of course) 🙂
That was only the required perspective will show for each OS.
Targeting metrics can be painful if you’re not experienced with SCOM. I’ll show you how to get the target for metrics using the SCOM console and PowerShell below.
In the SCOM console, you can get the rule target (class) by opening performance view (right click object > open > performance view) and opening the Rule properties:
Where the Rule target is the class you require.
In PowerShell you would expect this to be easy, think again 😉
First, we need to pull the correct rule for the object:
$rule = Get-SCOMRule -DisplayName ‘Percent Memory Used’ -ComputerName ‘server1.fqdn.net’
Which gives us:
$rule | select DisplayName,Target
Percent Memory Used ManagementPackElementUniqueIdentifier=ce8b3d0d-530c-d1dd-b9b7-1fe321b33a6d
Not particularly useful, so we need to translate the unique identifier into something useful:
$target = $rule.Target.ID
Which gives us:
This isn’t very useful again, so we need to get a display name for the class:
Windows Server 2012 Operating System
And there you have it. Not easy, but probably somewhat quicker than the SCOM console (ewww).