Chargeback with System Center 2012 SP1 Tutorial Part 3 of 3

In the two previous blog posts (here and here), I discussed how Chargeback works, and how to correctly configure the components around Service Manager.

In this post, I will focus on service manager and take a deeper look at what needs to be configured to make chargeback work.

As noted in the previous posts, there are a few elements that need to be in place before you begin:

 

  • Confirm that the steps outlined in the previous posts have been followed and cloud objects are appearing in Operations Manager State View.
  • Confirm that Service Manager has been installed.
  • Check that Service Manager Data Warehouse has been configured and registered with the Service Manager instance so that Data Warehouse and Reporting is showing in the Service Manager Console.

image

  • Make sure that Excel 2010 or Excel 2013 is installed on the same computer as the Service Manager console.

Configuring Service Manager (SCSM) for Chargeback

Here are the primary steps I’ll cover in this post:

  • Import the Chargeback Management Pack
  • Configure the SCOM connector in Service Manager
  • Create a view to see Clouds objects under Configuration Items
  • Configure Price sheet for Chargeback
  • Verify data has moved to data warehouse
  • Use Microsoft tools to analyse data for chargeback

 

Import the Chargeback Management Pack

The Service Manager Chargeback Management Pack is not installed by default in Service Manager 2012 SP1, so this management pack (MP) needs to be imported for chargeback to work correctly.

To do this, follow these steps:

 

  • Log on to the server that is running the Service Manager 2012 SP1 Server as a Service Manager Administrator.
  • On Windows 2008 Server: Click Start > All Programs > Microsoft System Center 2012 > Service Manager > Service Manager Shell..
  • On Windows 2012 Server: Click low left corner to go to “Start,” the type “Service Manager Shell,” then right click on “Service Manager Shell,” and select “Run as Administrator” in the bottom of the screen.image

TIP: Remember to enable PowerShell to execute scripts:  Set-ExecutionPolicy –force RemoteSigned

  • The path in the PowerShell window should show <Path>\Service Manager\, type cd chargeback
  • Type .\ImportToSM.ps1

image

  • Verify that the script runs without errors (You might get a message that the Management Packs are already imported, and this is Ok).
  • Type “Exit” to leave the PowerShell window

 

Configure the SCOM connector in Service Manager

In the previous blog post we configured the integration between Virtual Machine Manager and Operations Manager. To get the Cloud objects we were seeing in Operations Manager into the CMDB in Service Manager, the Operations Manager connector in Service Manager needs to be configured.

To do this, follow these steps:

 

  • Open the Service Manager console as an Administrator.
  • Select “Administration” in the Wunderbar and expand “Administration and Connectors.”
  • In the action menu, select: Create Connector > Operations Manager CI Connector

TIP: If you have already configured the Operations Manager CI Connector, then select the connector in the central view, select “Properties,” select “Refresh” under Management Packs, and verify that all VMM MP are selected.

  • Click “Next” to move to the “Before you begin” page.
  • Give the connector a name, e.g. SCOM OM01 CI Connector, then click “Next.”
  • Type the FQDN server name of the Operations Manager server
  • Under credentials click “New.”
  • In “Display Name” write a name for the account e.g. Operations Manager Run as Account.
  • Under Accounts select “Windows Account.”
  • Give a User Account and Password for an account in AD that has Operations Manager Admins Access.
  • Select the domain for the user.
  • Click “OK.”
  • Click “Test Connection.”
  • Give the Password for the user and click “OK.”
  • A list of Management Packs will show, select all Management Packs, and verify that none are gray.
  • Pay special attention to the Management Packs listed below and ensure they are selected and are not grey.

image

Tip: If any of the MP’s are gray and can’t be selected, make sure to check that the Management Packs in Operations Manager and Service Manager is the same version. In some cases the Operations Manager MP might be newer than the MP loaded into Service Manager. If this is the case, download the latest MP from the Operations Manager Catalog (located in OM Console > Under Administration > Management Packs > Management Packs) and select “Download to disk.” Then import MP into OM if it is newer than the one currently loaded. Next, copy this file to the Service Manager Server and import the Management pack (Administration > Management Pack > Import Management Pack) form the Service Manager Console.

image

  • Click “Next.”
  • Select a schedule for when the Connector should run and click “Next.”
  • Verify the information in the Summery view and click “Create.”
  • Select the Connector in the Connectors view and select “Synchronize Now” in the Action Menu.
  • Wait 5 minutes and then select “Refresh” in the action menu and verify that the Status says “Finished Success” for the connector.
  • Select “Data Warehouse” in the Wunderbar, and then select “Data Warehouse Jobs.”
  • In the jobs view, select MPSyncJob and select “Resume” in the action view.
  • Wait for the job to finish, and then verify that all MPs are associated in the MPSyncJob Detailed view. In particular, make sure the MP below is associated. This will ensure the right data can be moved to the Data Warehouse from Service Manager in order to enable reporting for chargeback.

image

 

Create view to see Clouds objects under Configuration Items

Just like we did in Operations Manager (where we successfully created a view to see all Private Clouds), we want to create a similar view under Configuration Management to see all Private Clouds in the CMDB.

To do this, follow these steps:

 

  • Open the Service Manager Console as Administrator.
  • In the Service Manager Console select “Configuration Items” in the wunderbar
  • Right click on Configuration Items in the tree structure view, and select “Create folder.”
  • In Folder Name type “Private Clouds.”
  • Next to Management Pack click “New.”
  • Type Chargeback and click “Ok.”
  • Click “Ok” to create the folder
  • Right click on the newly created folder and select “Create view.”
  • Name the view “Private Cloud.”
  • Under Advanced Search select the “Browse” button.
  • In the drop down on the left select “All basic classes”
  • In the filter type “Private cloud.”
  • Select the class that has a cloud as an icon and click “Ok.”
  • Under Display select the following values:
  • Display Name
  • Maximum Memory
  • Maximum Storage
  • Maximum vCPU Count
  • Maximum VM Count
  • Description
  • Click “Ok” to create the view.
  • Now select the new view under the Private Cloud folder.
  • Verify that the same information shows as in Operations Manager State view.

image

 

Configure Price sheets for Chargeback

In the first chargeback blog post we talked about how cost models were a way to break down cost as a method for chargeback. In Service Manager, this can be defined as price sheets.

A price sheet can be applied to one or more clouds as a model for how a cost for a VM is calculated based on a defined cost model.

The Cost model for VM price sheet is divided into the following areas:

  • VM Base Price per day
  • Cloud Membership Price per day
  • VM CPU Price per core/day
  • VM Memory Price per GB/day
  • Highly Available VM Price per day
  • Static IP Price per day
  • Expanding VHD Price per day

Based on these values, a cost for a VM can be calculated. With this established, let’s make a price sheet!

In this example, we will only create one price sheet for all the VMs in the Finance and Marketing Clouds. If it is required, a price sheet could be created for each cloud, and you can then apply different prices for VM’s in different clouds:

  • Select “Administration” in the Wunderbar.
  • Under “Administration” expand Chargeback > Infrastructure > Price Sheets > All Price Sheets.
  • Select “Create Price Sheet” in the Action Menu.
  • Give the Price sheet a name, e.g. Contoso Price Sheet.
  • Select “Price” in the ribbon bar.
  • Assign prices for the areas that has been defined on the cost model. An example model is shown below.
    • Cloud VM per day: 5
    • VM CPU per Day: 1
    • VM Mem per Day: 1
    • VM Storage per Day: 1

image

  • Select “Publish” in the action menu.
  • Select “Assigned Clouds” in the ribbon bar.
  • Under “Assigned Clouds” click the Add button.
  • Select one or more clouds (in this example we will select Finance and Marketing) and click “Add” to add them to selected objects. Then click “Ok.”

imageimage

  • Click “Ok” to create the price sheet.

 

Verify data has moved to the Data warehouse

For the Data Warehouse to enable reporting, it needs to get data from the Service Manager server at given intervals. The Service Manager Server has a list of jobs that will run automatically at a defined interval (Min, Hour or Daily). To speed up this process, the jobs can be run manually in a given order so that data will be transferred faster to the Data Warehouse.

To do this, follow these steps:

  • In Service Manger console, select Data Warehouse > Select Data Warehouse jobs
  • Resume the jobs in the following order (don’t start a job before the previous is ended)
  • Extract:
    • Extract_SM
    • Extract_DW
  • Transform:
    • Transform.common
  • Load:
    • Load.Common
  • Cube Processing:
    • Process.SystemCenterServiceManagerChargeBackCube
  • Once the data has been processed by the cube, reporting data is not ready to be analysed.

 

Use Microsoft tools to analyze Data for Chargeback

Service Manager Data Warehouse gives several way to analyze data for Chargeback. Among the options are:

  • Excel Power pivot
  • Sharepoint Perfromance Point
  • SQL Reporting Services

These Microsoft features (Excel, SharePoint & SQL) provide different ways to present the Chargeback data to the users.

Now I’ll overview an example with Power Pivot, and identify how this can be exposed to users in the Service Manager console using built in features.

To do this, follow these steps:

  • Open Service Manager Console.
  • Select Data Warehouse > Cubes
  • Select the Service Manager Chargeback Cube and click on “Analyze Cube in Excel.”
  • Excel will open with a data connection to the Chargeback cube.
  • Select the following fields to the left in the power pivot:
  • Group: ServiceManagerInfraChargeback
    • Fiscal Year Hierarchy
  • Group: Service Manager Infra Daily
    • Cloud Cost
    • VM Cost
    • VM Total Cost
  • The Power Pivot should now look similar to this:

image

Note: The data shown may be limited because the chargeback configuration has only run for a limited time. Over time this report will have richer data to analyze.

  • Save this file in a folder on the Service Manager Server. (e.g. c:\temp\Chargeback) and close Excel.
  • Share this folder (c:\temp\Chargeback) that users of the Service Manager console has read access:
    • Right click on the folder in File explorer “Share with > Specific People”
    • Add a Domain Group that represents SM Console users
    • Select Read Access and click “Ok”
  • In the Service Manager Console, select Data Warehouse > Data Warehouse > Analysis Libraries
  • Select “Add Library Folder”
  • Name: Chargeback
  • UNC Path: Type UNC Path to the share just created, e.g. \\SM01\Chargeback
  • Click “Ok.”
  • Go to Reporting > Analysis Library > Chargeback
  • Select “Contoso Chargeback” file and click “Open in Excel” in the Action Menu

image

  • The Excel file now opens in Excel

 

Hopefully this series of posts has provided a helpful overview for how chargeback for virtual machines can be done with the use of System Center components. Another goal of these posts has been to demonstrate how well the System Center products are integrated, and how nicely data flows between these components.

Please let us know if you have any feedback to this series of blog posts.

Stay tuned for more IT Service Management blog posts from the TED team!