You are browsing the archive for scorch.

Avatar of kurtvh

by kurtvh

“Invoke runbook” isn’t working – called runbook is running, but activity doesn’t start.

9:49 am in Service Manager by kurtvh

Hello,

We had the following scenario: The Orchestrator install is properly installed on dedicated servers and the database is hosted on a “shared” SQL infrastructure. The company where I was working had his own policies for SQL installations, no idea that this could impact the runbook runtime (correct SQL collation was specified ).

Issue description:

A runbook is monitoring Service Manager Service Requests and based on the information in the request other runbooks are called. The issue we experienced was that the called runbooks are getting in a running state, but never start executing the activities. The proper configuration was made in order to “invoke runbooks”, the properties needed for the called runbook initiation are specified. Every runbook was running when we execute them individually. Non of the runbooks that are called via the “Invoke runbook” activity starts executing the activities.

In the console we could see that the runbook was in a running state, but it simply hangs in a running state. Information found in the Orchestrator log files

PolicyModule.exe log files we saw the following errors: (little summary of the interesting parts of it)

<MsgCode>WorkflowContextComProxy::onPolicyInstanceCreated failed</MsgCode>
<Type>Opalis::Exception</Type>
<MsgCode>_com_error</MsgCode>
<Param>Unspecified error</Param>
Param>-2147467259</Param>

image

 

RunbookService.exe log file errors:

A lot of different state messages, but one state message that helped us finding a solution for this issue.

Error 524 – Procedure InsertRunbookInstanceInputParameters – Message:A trigger returned a resultset and the server option “disallow results from triggers” is true. (-2147217900)

image

 

Issue information and solution:

The error message from the runbookservice.exe log file is indicating a setting on the SQL. Information about this SQL setting can be found here.

In order to check this setting you can run the following query on the SQL instance that is hosting the Orchestrator database.

select value
FROM sys.configurations
WHERE name = ‘disallow results from triggers’

In the environment where we experienced the runbook issue the return value was 1. Like indicated in the log file, this configuration is set on true. The required value returned must be 0 in order fix the runbook issue.

To reset the configuration

exec sp_configure ‘disallow results from triggers’,0
RECONFIGURE

After this re-configuration the runbooks can be called from other runbooks and start executing the activities. Problem fixed!

Honors are for my college – runbook ninja – Stijn Callebaut!

 

Have fun in the further progress of automating your environment!

Kurt Van Hoecke

Avatar of kurtvh

by kurtvh

From Visio drawing to automated provisioning

10:47 am in Uncategorized by kurtvh

 

Hello,

This blog post will describe a solution that is posted on the AuthoringFriday System Center blog site. The solution detailed in this blog post is explaining how you can build your own Integration Pack, how to read information out-of a Microsoft Visio file and start building and post this information back as output of the activity. This output of the custom activity in Orchestrator (example server OS deployment) can be further used to actually deploy the infrastructure.

Overview of the overall Process flow of the example used in the build blog post:

VisioProcess

The idea of the blog post on AuthoringFriday site was to explain how to read the Visio file and create the Integration Pack, but look at the possibilities you have with this kind of solution. Now these days a project starts and the architect creates a blueprint of the infra for the project in a Visio file. This file is evaluated and updated during the process where it “lands” with the guys that really have to install and configure the infrastructure. There this a manual activity here where people have to look rights and type that information on the left (or the other way around).

The process starts with your Visio template. In the MS Visio template you define what information needs to be specified for a successful provisioning. The example is using a *.vsd file, but this can be changed to any kind of provisioning you want to do. SharePoint sites, POC environment, and so on …. as long as your back-end can do the actual provisioning. The custom activity reads the information and based on this information, other activities can run and create the virtual machine or starts creating sites in your SharePoint environment.

Take this a bit further where you integrate System Center Service Manager in the whole Process. The Service Request is created via the self-service portal. Via the defined approval process, an Automated Runbook Activity is triggered where the file gets picked-up by Orchestrator. The Orchestrator runbook reads the Visio file information and starts building the requested infrastructure in a very automated way.

VisioProcess2

As you can read, the possibilities in automation with Orchestrator are end-less. If you need another input, it is just a matter of creating the code to read the file…follow a bit the creation if the IP as explained in the build blog post and you have your own input system to build further automation on.

If you like to “play” with the Visio OS deployment solution, I will post a download link of the Integration pack that is created at writing the AuthoringFriday blog post. 

Download link: (available soon)

Have fun and think about how you can automate your environment!

Kurt Van Hoecke

Avatar of kurtvh

by kurtvh

Create SCSM Blackberry connector with Orchestrator

9:36 pm in Service Manager by kurtvh

Hello,

Mobile devices get automatically synchronized once you have SCCM 2012 configured to manage the mobile device (you have an Exchange server connection for gathering the mobile device info) and configured the Service Manager configMgr connector.

If that functionality is not available yet and you need to have a solution to get this information in your CMDB of Service Manager maybe this is a solution for you. In this blog I describe a solution to get Blackberry mobile device information from the Blackberry database and import this information in Service Manager CMDB. Orchestrator runbook approach is used to get and import the information.

Overview of the runbook in Orchestrator:

image

(simplified runbook to make it working. Additional steps/checks/manipulations can be integrated to accomplish your goals)

Integration packs used in this example:

  • SC 2012 Service Manager IP
  • Data Manipulation IP
  • Monitoring – default IP
  • Utilities – default IP

Note: In this example the Mobile device (SCCM) is used to import the Blackberry mobile devices. You can also create your own class that is based on the Mobile device class in Service Manager and import the information to that class.

Query for Blackberry information

Different possibilities are there to accomplish this task. One approach is more or less explained in this blog. Via PowerShell, csv file and import of the file. This blog explains the Orchestrator approach, simplified…flexible…and controllable.

First you can use the Schedule Date/Time activity to regularly run the runbook.

The Query database activity is used to query the Blackberry database. Configure this activity with the SQL connection to you Blackberry database.

image

On the details tab of this activity configuration the SQL query can be specified. The following SQL query is an example query to gather the information from the Blackberry database. Note: The Runbook action account will need to have the right to query the database, make sure you have configured this.

use BESMgmt
select
displayname as "Display Name", phonenumber as "Phone Number", PIN,IMEI as IMEI, modelname as BBModel, PlatformVer as "Platform", BootromVersion , ITPolicyName, AppsVer as "AppsVer", HomeNetwork as "Home Network"
 
from syncdevicemgmtsummary a
inner join
userconfig b
on a.userconfigid=b.id

Additional fields can be selected to your needs. Check the Blackberry database, the tables included in this query include a rich set of information that can be selected in your query.

image

The information gathered in this query is returned in a single line of information per discovered device.

Displayname;phonenumber;PIN;IMEI;modelname,PlatformVer;BootromVersion;ITPolicyName;AppsVer;HomeNetwork

Before we can use this information it must be split in single string values. For this task we can use the Data Manipulation Integration pack from Codeplex (URL). This IP includes an activity to split fields based on a character that you can specify. We have “;” separated file as output, so all information is there to configure this activity.

Input string for the split is the output of the query Blackberry database activity:

image

Full configuration of the split fields activity:

image

Result of this manipulation is that you can create a little overview of the mapping of information towards Service Manager. An example of a property mapping:

image

(default Mobile Device (SCCM) class properties)

Working with the Blackberry information

The information is gathered from the database and manipulated in a formation so we can use it to import that information in Service Manager. We have to make sure that new devices get created and existing devices get updated. The “Get Mobile device Object” activity is looking in Service Manager and based on the results of this query we can see if the mobile device needs to be updated or created.

image

The selection to see if I need an update or a create is in the link filter. We can check on the returned objects from the “Get”. No objects returned, this must be a new mobile device…normally one object returned if the device already exists and we can do an update.

image

image

Update the mobile device object in Service Manager

There are different option on this level. You can do several checks with the Compare activity from Orchestrator or simply update a predefined set of properties. In this example we update a set of properties during each runtime of the runbook. I recommend that you have made the mapping what information is stored in what field before starting to configure the update object activity.

Use the “Update Object” activity from the Service Manager IP:

Class: Mobile device (SCCM)

Object Guid: SC Object Guid  –> output of the Get Mobile device Object activity.

Fields: Select the fields that you want to update…

image

Overview activity configuration

image

Create new Mobile device (SCCM)

In the runbook there is an additional check included to verify the IMEI information. This because it is used as input for the ID of the Mobile device object to create.

Once the IMEI number is verified (the information is filled by the query) the Mobile device object can be created. In the explanation of the split activity an example overview of the property mapping is provided. This is used as input for the configuration of this activity.

Use the Update Object from the Service Manager IP:

Class: Mobile device (SCCM)

Fields: Select the fields that you want to update…

image

and map these fields to the output of the split activity…

image 

That’s’ about it…CI’s get created and updated on the schedule you have provided on the runbook.

Many variants of configurations are possible, all depending on what information that you want to have in your CMDB. Simply replace the Query to a datasource of your needs, get the information and import the data in your CMDB. All manipulations or check can be done by your runbook before actually importing or updating the CI in Service Manager.

Have fun,

Kurt Van Hoecke