Showing posts with label Service Manager 2012. Show all posts
Showing posts with label Service Manager 2012. Show all posts

Monday, March 3, 2014

Extending Service Request Form - Part 1 (Extending SR Class)

Throughout my experiences in implementing Service Manager 2012 (SCSM) for enterprise organisation, one of the challenge that repeat itself in each project is Service Request Fulfilment (SR).

For those who has come across the SR module of SCSM 2012, SCSM 2012 SP1 and SCSM 2012 R2, I am sure you will find that the SR Form out-of-box is nothing to fancy about. Instead you may find it very constraint and you barely can make anything out of it. Say for scenario below that you achieve which I am quite sure you could not achieve these

Scenario 1: Request Offering to Create AD Account
IT People always as how can I delegate this to HR Department (maybe) and there can request AD account through SSP. The challenge is how do you ask and map information such as First Name, Last Name, Middle Name, Proposed Username and etc. Well, asking the HR to use the "Description" box maybe a solution, but often they find it not practical.

Scenario 2: Request Offering to Request VM
Again, how could the IT Department allow the Business Unit to request for a virtual server. While the IT infrastructure is operating on a Private Cloud Concept, there is no practical way for user to request a VM with specific specification such as Processor, Memory, Operating System require.

Most of the people I come across they find it SR module of SM is not user friendly as why "M" does not consider all of this.

Well, it time to look from another angle. Service request is a very subjective module of all. You can have... ALL SORT OF REQUESTS...literally. To think about this, how could we expect "M" to make all sort of forms that could suit all of us. Of course "M" don't do that. That's where we come into picture, to understand user requirement and EXTEND the existing SR form.

Extending the SR form simply means to introduce more "field" to the form to capture the require information. This field is then use in Request Offering and publish through SSP as and interface to end user.

The rest of this topic explain how to extend the SR form to make request such as "Request VM" through SR possible and more practical.

Requirement
1. Service Manager 2012 - Management Server (of course)
2. Service Manager 2012 - Development Management Server (Good to have)
3. Service Manager console
4. Service Manager Authoring Tool
5. Basic understanding of SCSM Projection, Class and Management Pack Components
6. Knowledge in Visual Studio and programming is added advantage (no kidding)

Extending Service Request Form Series
Extending Service Request Form - Part 1 (Extending SR Class)
Extending Service Request Form - Part 2 (Extending SR Form)
Extending Service Request Form - Part 3 (Customizing the MP)

Extending Service Request Class

1. Install the SM Authoring Tool either on the Management Server or on your desktop.

2. Launch the SM Authoring Tool. Click on "New" to create a new Management pack for SM.


3. I created the MP with name "CMY_SRF_Extension_RequestVM"


4. Review the new MP created


5. At the Class Browser pane, select System Work Item Service Request Library and search for Service Request class. Right-click the class and select View.


6. Back to the Management Pack Explorer, you will see Service Request class listed under the sealed MP of System Work Item Service Request Library. Right-click Service Request class and select Extend class.


7. Review the changes will be saved in the MP that we have created earlier, click OK.


8. Lets name the extended class.


9. In the result pane, click Create property. We name the propoerty as CMY_SRF_Req_VM_Proc. This is the property we create to capture information of VM Processor Count in request.


10. Right-click the property create and select Edit data type.


11. Select List.


 12. Select the List that will be use by this property.


13. Repeat step 11 to 12 for all the items.


We are now done with the SR Class extension. Next we will focus on extending SR Form.

Sunday, March 2, 2014

Importing Change Record (with Activity) to Service Manager 2012 using CSV

A recent project that I actively involve, require us to import their existing Change Record (CR) into SCSM 2012 SP1. Like some the organisation out there, the IT department has to retain these information for reference and auditing purposes. Instead of keeping this information (in Excel spreadsheet), it is always good to have this to put into once place. So how do we achieve that ?

If you come across my previous blog on Importing Data (Incident Record) to Service Manager 2012 using CSV - Part 1, then you should have have an idea on
1. SCSM Projection
2. SCSM Type of Class
3. Apendix A (file)

The complication with a typical CR is that you have Activity (or sometime nested Activity) to deal with. I am going to show how can we import a CR with single Activity from CSV.
<CSVImportFormat>
    <Projection Type="System.WorkItem.ChangeRequestProjection">
        <Seed>
            <Class Type="System.WorkItem.ChangeRequest">
     <Property ID="Id" />
     <Property ID="Reason" />
              <Property ID="Notes" />
              <Property ID="Status" />
              <Property ID="Category" />
              <Property ID="Priority" />
              <Property ID="Impact" />
              <Property ID="Title" />
              <Property ID="Description" />
              <Property ID="CreatedDate" />
              <Property ID="ScheduledStartDate" />
              <Property ID="ScheduledEndDate" />
              <Property ID="ImplementationPlan" />
              <Property ID="RiskAssessmentPlan" />
              <Property ID="BackoutPlan" />
              <Property ID="TestPlan" />
              <Property ID="PostImplementationReview" />
              <Property ID="RequiredByDate" />
              <Property ID="Risk" />
<Property ID="ImplementationResults" />
              <Property ID="Area" />
              <Property ID="ContactMethod" />
              <Property ID="ActualStartDate" />
              <Property ID="ActualEndDate" />
              <Property ID="TemplateId" />
              <Property ID="DisplayName" />
            </Class>
          </Seed>
     

<Component Alias="AssignedTo" Count="1">
        <Seed>
          <Class Type="System.Domain.User">
            <Property ID="UserName" />
            <Property ID="Domain" />
          </Class>
        </Seed>
</Component>

<Component Alias="Activity" Count="1">
        <Seed>
<Class Type="System.WorkItem.Activity.ManualActivity">
<Property ID="Id" />
<Property ID="Status" />
<Property ID="Title" />
</Class>
        </Seed>
</Component>

    </Projection>
</CSVImportFormat>


2. Prepare the CSV using excel
I always colored code the SCSM Projection for easy identifying of what information needed.

Take note the Activity that to be imported (YELLOW section), it must match the structure in the coding as be in the coding stated above:
<Component Alias="Activity" Count="1">
<Seed>
<Class Type="System.WorkItem.Activity.ManualActivity">
<Property ID="Id" />
<Property ID="Status" />
<Property ID="Title" />
</Class>
</Seed>
</Component>

3. Ready to import
Both the XML and CSV file are ready to be imported



4. Here you go, this is how does it looks like

Friday, June 7, 2013

Importing Data (Incident Record) to Service Manager 2012 using CSV - Part 1

Over the weekend I got my chance (FINALLY !) to test out the method of importing data into Service Manager 2012. Why would I spent my time to look into this ? Well there are a few reason I can tell:

  1. Customer wants to migrate to Service Manager from existing IT SM tool
    • Not all organisation wants to let go their old data.
    • Comply with audit policy which at least 7 years. Can't expect to keep the current IT SM tool for 7 years to come.
    • Reporting, analysis and KPI trending. CIO, Director and Manager wants to see continuous trend of their service. How can they accept the fact to start from SCRATCH ? you might well just kill them - just kidding.
  2. Engineer like us wants to pump in data for testing
    • For Demo purpose. We don't want to talk only about the tool, we must be able to show it, right ?
    • Huge amount of data. We must be able to bulk create a huge amount of data before we can see the trend. Especially when we want to show the reporting part of the tool.
Lets See some of the things that should be prepared:
  1. A running Service Manager 2012 Management Server.
  2. Microsoft Excel - On your desktop for CSV file creation
  3. XML Editor - Properly you may need a good XML editor to create XML file for SM. You can survive with Notepad if you don't have one :-P.
  4. A copy of CSVImport.docx.
  5. A copy of ApendixA.html
  6. Someone (you) who knows Service Manager fundamental :-P
Useful Resources:
Using a CSV File to Import Data into Service Manager - A useful Technet article that talks about importing data to Service Manager using CSV.

XML Notepad - A XML editor by Codeplex. It safed my life before in Editing SM Management pack. It could safe yours :-P

Let's get started. In this blog, I will be importing Incident Record (IR) to Service Manager. Importing data into SM require 2 files. These are the XML and CSV. The XML file will be the the "header" (in that sense) for all the data in CSV that you going to pump in SM.

Overview of ApendixA.html
In order to get the correct syntax and sequent that the SM could understand, you must refer to ApendixA.html.

Since my objective is to import incidents, my interest in ApendixA will be on System.WorkItem.Incident.
Those field in RED indicates mandatory field. From here, it gives you an idea of the nature of the variable.
When you scroll a little down, you will now see the format. This is what you will be using to create the XML file of you own choice.
Preparing XML File
As for my first testing, I will just go with minimum data and item. Below is my XML file for first try.


Preparing CSV File
Now I got the XML file, the next task is to create a CSV file that reflects the XML structure with the data that you want to import. Microsoft Excel will be you best friend here.

The line contains below:
Id IR2
Urgency System.WorkItem.TroubleTicket.UrgencyEnum.High
Impact System.WorkItem.TroubleTicket.ImpactEnum.High
Source IncidentSourceEnum.Phone
Status IncidentStatusEnum.Active
TierQueue IncidentTierQueuesEnum.Tier1
Classification IncidentClassificationEnum.Email
Title Unable to send email
Description Email stuck in Microsoft Outlook client
ContactMethod E-Mail
CreatedDate
1/5/2013 6:00
Displayname Unable to send email
ResolvedDate

Importing the Information to Service Manager
Launch SM Console and select Administration from the Workspace on the right
Select Connector at the Explorer Pane, and at the Action Pane, select Import from CSV file.


Select the XML and CSV files you have created earlier.


Once you click Import, SM will process both files and proceed with the import.


Now, let take a look at the data that is imported.


Verifying the Imported IR
Take a look of all the information provided.


So now you can import data into Service Manager and this will be extremely helpful when you come across project requirement to migrate data from existing ITSM tool.

You may be wonder by now how about other field such as Affected User, Created by User, Assigned by User and Resolved by User ?

Please stay tune to Part 2 as I will be showing you larger data to be imported into Service Manager.



Tuesday, November 20, 2012

SCSM 2012 Data Warehouse Cube Processing Keep Failing


I personally find it very annoying when you imported a management pack (MP) in your SCSM and the next day all Cube Processing job failed without reason.

Have been seeking high and low for fix this and finally with combine article from Technet and forums by hundreds miserable user same as myself, the cube processing can be fixed using below method

Firstly lets Disable Data Warehouse Cube Processing jobs via Power Shell (make sure to change to correct Program Files install directory for SCSM):

Import-Module '%ProgramFiles% \Microsoft System Center 2012\ServiceManager\Microsoft.EnterpriseManagement.Warehouse.Cmdlets.psd1'
Disable-SCDWJob "Process.SystemCenterConfigItemCube"
Disable-SCDWJob "Process.SystemCenterWorkItemsCube"
Disable-SCDWJob "ProGetcess.SystemCenterChangeAndActivityManagementCube"
Disable-SCDWJob "Process.SystemCenterServiceCatalogCube"
Disable-SCDWJob "Process.SystemCenterPowerManagementCube"
Disable-SCDWJob "Process.SystemCenterSoftwareUpdateCube"

Login to the server hosting the Analysis service and run the powershell script, just remember to change the$Server.Connect and the $DWASDB with the correct server (being the name of the SQL Server) and database name. It usually runs for 5-15 minutes. In my case, it took me about 45 minutes, so not to worry if the Powershell hung. When complete, you can verify by looking at the properties at one of the dimensions


[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices")
$Server = New-Object Microsoft.AnalysisServices.Server
$Server.Connect("serverdw.blog.com")
$Databases = $Server.Databases
$DWASDB = $Databases["DWASDataBase"]
$Dimensions = New-Object Microsoft.AnalysisServices.Dimension
$Dimensions = $DWASDB.Dimensions
foreach ($Dimension in $Dimensions){$Dimension.Process("ProcessFull")}



Now you have to enable back all the cube processing job you have disabled earlier.

Enable-SCDWJob "Process.SystemCenterConfigItemCube"
Enable-SCDWJob "Process.SystemCenterWorkItemsCube"
Enable-SCDWJob "ProGetcess.SystemCenterChangeAndActivityManagementCube"
Enable-SCDWJob "Process.SystemCenterServiceCatalogCube"
Enable-SCDWJob "Process.SystemCenterPowerManagementCube"
Enable-SCDWJob "Process.SystemCenterSoftwareUpdateCube"

The final step to do is to process all the cubes


Notice that the cube processing finish without error.

hope this help out all other out there with SCSM 2012 Cube Processing issue.


Tuesday, October 23, 2012

SCSM 2012 : Work Item Running Number


One counter for all types of work items:
For instance:

  • New Incident = IR1
  • New Change Request = CR2
  • Change Request contains 2 activities = RA3 and MA4
  • New Incident = IR5

and so on

All work items are sharing the same counter for ID. Only the prefix is added to this ID based on the work item class (IR, CR, PR, SR, MA, RA).
For this reason the ID is not increment uniformly for each type of work item.
This behavior can't be changed. 

However, you can set the starting number by changing a value in the database.

Basically there is this table in the ServiceManager database called the AutoIncrementAvailableRange table.  This value stores the next available number for a particular class property.  If the last work item ID that was handed out was 1234 this table would show 1235 and then once 1235 was used it would say 1236.  You get the idea.  So, by changing this number we can change the base number that we start from.  Let’s say for example that we always want our incident IDs to be in the 10,000+ range.  We could change thus number to 10000 and start from there.  Definitely don’t set it lower than the current number though!  That will most likely be very bad.

Use the SQL command below to set the new number you want
update AutoIncrementAvailableRange
set FirstAvailableValue = 10000 
where ManagedTypeId = 'F59821E2-0364-ED2C-19E3-752EFBB1ECE9' and ManagedTypePropertyId = '28B1C58F-AEFA-A449-7496-4805186BD94F'
Use the command below to check if the value changed to the one you set using command above
select
MT.TypeName,
MT.ManagedTypeId,
MTP.ManagedTypePropertyName,
MTP.ManagedTypePropertyID,
AIAR.FirstAvailableValue
from ManagedType as MT, ManagedTypeProperty as MTP, AutoIncrementAvailableRange as AIAR 
where MT.ManagedTypeId = AIAR.ManagedTypeId and MTP.ManagedTypePropertyId = AIAR.ManagedTypePropertyId
Notice that at the end of the role "System.WorkItem", at the "FirstAvailableValue" column, the number is the number you have set.



Monday, April 30, 2012

Enable Schedule for SCSM 2012 ETL

By default, the schedules for the extract, transform, and load (ETL) jobs are not enabled. If ETL is now enabled, you will get no data from SCSM console when generating any report.

In this release of Service Manager (System Center 2012 – Service Manager), you can enable the schedules only by using Windows PowerShell.


Enable-SCDWJobSchedule –JobName Extract_<data warehouse management group name>
Enable-SCDWJobSchedule –JobName Extract_<Service Manager management group name>
Enable-SCDWJobSchedule –JobName Transform.Common
Enable-SCDWJobSchedule –JobName Load.Common