Search This Blog

Wednesday, July 11, 2012

Setup a Disk Report in SCOM 2012 - (Part 1)

This will start a series of posts related to finally extracting that disk report you've always wanted from SCOM but just couldn't find anywhere, at least not for free. We're going to start with the basics of getting the logical disk size into the datawarehouse so that you can query it later for a SQL report view, or you can use it in the generic report library->performance report or even a workspace performance view. The cool thing with doing it this way is that you can then trend on disk size over time. In a virtual environment, where it is relatively easy to grow a disk, you will be able to go back in time and see when that growth occurred and by how much. That can be a handy report sometimes.
  1. Start by opening your Microsoft System Center Management Console and navigating to the "Authoring Screen"
  2. Start the new collection rule by navigating to the System Center Management Console Authoring Screen
  3. In the "Authoring Screen", right-click on "Rules" and select the "Create a new rule" option
  4. In the authoring screen, right-click on "Rules" and select "create a new rule"
  5. In the "Create Rule Wizard", expand the "Collection Rules" folder, then the "Performance Based" folder and select "WMI Performance"
  6. When the rule screen comes up, you'll need to provide a name for the rule and select the target for the rule. Leave the "Rule Category" alone.
  7. In the "Rule Target" selection screen, change the scope to "View all Targets" and look for "Logical Disk (Server)". Select that and hit "OK" to finish the selection.

  8. Create Rule Wizard Target Screen
  9. Before proceding, your screen should look something like this.
  10. Create Rule Wizard General Screen
  11. In the next screen, you'll have to insert your WMI query. For the purposes of this monitor, we really only care about two values, the DeviceID (drive letter) and the Size. That keeps the data returned relatively small to have minimal impact on performance. If you left it as SELECT * and then run the rule, it will bog down SCOM significantly, trust me on that one. Enter how often you want to collect the information. Since total disk size does not change often, you can have a large value here, 14400 would be once every four hours if I have my math right.

  12. For the WMI Namespace, enter: root\cimv2

    For the Query, enter: SELECT DeviceID,Size FROM Win32_LogicalDisk
    WMI Namespace: root\cimv2 | Query: SELECT DeviceID, Size FROM Win32_Logicalisk

  13. On the following screen, you'll need to select the values to collect and how the labels should show up when looking for them in the performance monitors. You want the "Object" to be LogicalDisk, this way you can search the datawarehouse for logicaldisk counters and it will show up in the same grouping. This will also allow the value to show up in the same group as your other Logical Disk performance counters elsewhere in the system. You want to give the "Counter" value a name, such as "Total Disk Space" or "Total Disk Size" something to identify this counter as representing the size of the partition in question.

  14. Performance Mapper Screen

  15. For the "Instance" Value, let's use the picker, select the "..." on the side and then "Target"


  16. In the target picker screen, let's pick the "Device Identifier"

  17. Performance Mapper Instance Picker - Device Identifier

  18. Now let's repeat the process for the "Value" field


  19. Select the "..." on the side and then "Target"


  20. In the target picker screen, let's pick the "Size (MBytes) (Numeric)"

  21. Performance Mapper Instance Picker - Value

  22. Your Rule Wizard should now look something like this and you are ready to finish the rule. It will initially gather data pretty quickly so you shouldn't have to wait too long before you can go searching for it. This will pick up the space for all logical instances on the Windows servers in your environment.


  23. In Part 2 of this series, I will outline a SQL query to dump the information in a basic table and a tabular report format, along with other ways to access this information in SCOM. In Part-3, I hope to put together a fancy, graphical report of all the data (we'll see on that one).

9 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Excellent Post Dave,
    Do we have an alternative option to generate Notification For this rule apart from Part 2 SQL bit Please

    ReplyDelete
  3. Your disk space alerts in general would be done through standard mechanisms. This post really only helps if you want to deliver a report to your manager or customer. For example, I have my system setup to send out a disk space report to the server teams every Friday, so that we don't get into disk space issues over the weekend, which nobody likes. Here is a link to a great post on setting up the disk monitors: http://blogs.technet.com/b/jonathanalmquist/archive/2009/04/04/logical-disk-free-space-monitor.aspx
    Once you have your thresholds configured the way you want, there is a utility called Philip (http://www.softpedia.com/get/System/File-Management/Philip.shtml) which you can use to fill your drive up to generate an alert, from there, you would subscribe to the alert for email or IM.

    ReplyDelete
  4. Hi
    At step 3 you select a "Custom Performance Collection Rules" in the Management pack, how did you create that. And what did you create in it.
    Without this information you article is unusable
    Otherwise it looks to be a great article something Microsoft show do out of the pack
    Jim Prendergast

    ReplyDelete
    Replies
    1. Select "New" and give the new management pack the name that you like. I called mine "Customer Performance Collection Rules" but you could realistically give it any name you wanted to.

      Delete
  5. Hello,

    Is there a report for the disk size used and what is left?

    ReplyDelete
  6. Hi,

    can we modify the query to include volume label as well
    I modified the script

    SELECT DeviceID,Size,VolumeName FROM Win32_LogicalDisk
    now i want to include it in the performance mapper

    ReplyDelete
  7. Hi,
    I changed the query so that it does not show empty ones (A:) and only Device Type 3 (ok, does not show A: as well; however):

    SELECT DeviceID,Size FROM Win32_LogicalDisk WHERE Size > 0 AND DriveType = 3

    Thanks for the posting.

    ReplyDelete
    Replies
    1. OK, I thought drives with no value were the problem for convertion issues - they were not. Created an override to disable it for WS 2003 Logical Disk.

      Delete