System Center Orchestrator Query: Execution Count Per Activity

Good Day - I am currently traveling from Texas to Florida with my family, a half froze turkey, and the makings of a Thanksgiving dinner that will not be beat. I’m coming to you now from rainy New Orleans were we have stopped for some Beignets, Chicory Coffee and a Central Market Muffaletta for lunch. I make this trip yearly and love it each time.

So quick Tuesday post here: Often times when examining an Orchestrator System I find that it is helpful to pull data on actual activity execution as opposed to just Runbook execution. This allows me to identify specific Runbooks that may be generating lots of multi value data ‘mid-stream’. I can use this for troubleshooting, establishing of Runbook execution patters, or just to identify the top ‘heavy hitter’ Runbooks.

The Query:

Select

OBJ.Name As 'Activity Name:',

Count (OBI.ObjectId) As 'Executions:',

POl.Name AS 'Name:',

Path AS 'Path:'

From OBJECTINSTANCES OBI Join OBJECTS OBJ on OBI.ObjectId = OBJ.UniqueID

JOIN [Microsoft.SystemCenter.Orchestrator].[Runbooks] POL on POL.Id = OBJ.ParentID

Group by OBJ.Name, POL.Name, POL.Path

Order By [Executions:] desc

The Results:

This query will return the name of the specific activity, a count of executions, and the name and path of the runbook which contains the specific activity. One item to note here is that because this data is coming from the OBJECTINSTANCES table, it will only be as current as your last log purge (configuration dependent).

Happy Holidays All - neilp