![Page 1: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/1.jpg)
![Page 2: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/2.jpg)
Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations ManagerMickey GoussetPrincipal ConsultantInfront Consulting Group
MGT306
![Page 3: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/3.jpg)
Mickey [email protected]
@mickey_gousset
http://teamsystemrocks.com
http://almrocks.com
http://radiotfs.com
![Page 4: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/4.jpg)
tinyurl.com/protfs
![Page 5: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/5.jpg)
Agenda
Intro to Management Pack StructureTools for Getting The Job DoneBasic Tips & TricksAdvanced Tips & TricksExpert Tips & Tricks
![Page 6: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/6.jpg)
Intro to Management Packs
Simply an XML fileUsed to add functionality into SCOMSealed vs. Unsealed
![Page 7: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/7.jpg)
Management Pack Structure
![Page 8: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/8.jpg)
Tools for Getting The Job Done
SCOM 2007 Authoring ToolSCOM 2012 Operations ConsoleVisio 2010 (via extension)Visual Studio 2010 (via extension)A Text Editor (I like Notepad++)
![Page 9: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/9.jpg)
Basic Tips & Tricks
TargetingManagement Pack Design – One vs. ManyMP Version ControlSealed Management PacksDiscovery Scripts
Debugging ScriptsCustomizing Rules and Monitors
Running a rule during business Hours
![Page 10: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/10.jpg)
TargetingYou want to monitor failed logon attempts on
Windows ComputersGOOD
Use Windows Operating System to target all Windows managed nodes (desktop and servers)Use Windows Server Operating System to target all Windows server managed nodes (all versions)Use Windows Server 2003 Operating System to target all Windows Server 2003 managed nodesUsed Windows Computer to target all windows computers (desktop and servers)
BADDon’t use Agent:
The monitor will not work for agent-less managed computers.The monitor will affect the health state of the Agent which is not what you want.
Don’t use Computer:Management packs for non windows management are likely to use computer as the base type for types such as Unix computer. The monitor that you just created will not work against non windows computers.The monitor will execute against all windows computers. Both clients and servers that are managed by OpsMgr.
![Page 11: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/11.jpg)
Targeting – Operating System Model
Operating System
Windows Operating System
Windows Server Operating System
Windows Client Operating System
Windows Server 2003
Operating System
Windows Server 2008
Operating System
Windows XP Operating
System
Windows Vista Operating
System
Other Operating System
Inheritance
![Page 12: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/12.jpg)
Management Pack Design – One vs. Many
MyCustomMP.xmlClassesDiscoveriesRulesMonitorsReports
MyCustomMP.Classes.xmlMyCustomMP.Discoveries.xmlMyCustomMP.Rules.xmlMyCustomMP.Monitors.xmlMyCustomMP.Reporting.xml
![Page 13: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/13.jpg)
Management Pack Design – One vs. Many
MyCustomMP.Classes.mp
MyCustomMp.Discoveries.xmlMyCustomMp.Monitors.xml
A MP must be sealed to reference itHave to reseal MyCustomMP.Classes after each change
![Page 14: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/14.jpg)
MP Version Control
MP Development is “development”Version Control allows you to track changesVersion Control Options
Microsoft Team Foundation ServerWorks well with new Visual Studio extensions
Other 3rd party VCS“Poor Man’s Version Control”
![Page 15: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/15.jpg)
Basic Discovery Script‘Setup the objectsSet oAPi = CreateObject (“MOM.ScriptAPI”)Set oDiscoveryData = oAPI.CreateDiscoveryData(0,SourceId, ManagedEntityId)
‘Create Discovery InstanceSet oInstance = oDiscoveryData.CreateClassInstance(
“$MPElement[Name=‘ClassName’]$”)oInstance.AddProperty “$MPElement[Name=‘ClassName’]/Property1$, Value1oDiscoveryData.AddInstance oInstance
‘Return discovery dataoAPI.Return oDiscoveryData
![Page 16: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/16.jpg)
SourceId and ManagedEntityId
SourceIdThe workflow ID$MPElement$
ManagedEntityIdThe base ID for the object the workflow is running against$Target/Id$
![Page 17: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/17.jpg)
Discovery Scripts – Best Practices
Always return discovery data – even if nothing is discovered
This is how SCOM knows to delete previously discovered object instances
Always target as specifically as possible
Use oAPI.LogScriptEvent to help debug scripts
![Page 18: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/18.jpg)
Running A Rule During Business Hours
![Page 19: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/19.jpg)
Advanced Tips & Tricks
Advanced Authoring ConceptsCreating a Custom Data SourceCreating a Custom Unit Monitor
![Page 20: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/20.jpg)
Advanced Authoring Concepts
Behind the scenes, everything is a workflowWorkflows are composed of four module types
Data Source
ProbeAction
Condition Detection
WriteAction
Does not take input, generates output based on external sources. Does not change object state.
One input and zero or one output streams. Changes object state. Always the last module in Rules and Recoveries.
One or more input streams, one output. No external sources and no state changes.
One input and one output; when triggered, generates output from external sources.
![Page 21: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/21.jpg)
Advanced Authoring Concepts – Rules
One or more data sourcesZero or one condition detectionOne or more write actions
Data Source
Condition Detection
WriteAction
![Page 22: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/22.jpg)
Creating a Custom Data Source
![Page 23: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/23.jpg)
Creating a Custom Unit Monitor
![Page 24: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/24.jpg)
Expert Tips & Tricks
CookdownOn Demand DetectionSupporting Agentless Monitoring
![Page 25: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/25.jpg)
Cookdown – An Example – Part 1 Monitor: MyMP.Monitor.MyCustomMonitor1
Date Source: Simple.Schedul
er
Probe: MyCustomProb
e
Condition Detection: My Results
Filter
Monitor: MyMP.Monitor.MyCustomMonitor2
Date Source: MyCustomDa
taSource
Condition Detection:
Schedule Filter
Monitor: MyMP.Monitor.MyCustomAlertRule
Date Source: MyCustomDa
taSource
Condition Detection:
Consolidator
Write Action: Generate Alert
DataSource: MyCustomDataSource
Date Source: Simple.Schedul
er
Probe: MyCustomProb
e
Condition Detection: My Results
Filter
MyCustomMonitor1 has been configured with a probe so it can use on-demand detection
MyCustomMonitor2 is using a custom data sourcethat makes use of our probe. It also has a schedule filter configured
MyCustomAlertRule is collecting events using our custom data source, and only alerting if certain events show up in order
MyCustomDatasource is collecting events on a timer from a text log, and ignoring informational events
![Page 26: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/26.jpg)
Cookdown – An Example – Part 2 Monitor: MyMP.Monitor.MyCustomMonitor1
Date Source: Simple.Schedul
er
Probe: MyCustomProb
e
Monitor: MyMP.Monitor.MyCustomMonitor2
Condition Detection:
Schedule Filter
Monitor: MyMP.Monitor.MyCustomAlertRule
Condition Detection:
Consolidator
Write Action: Generate Alert
Date Source: Simple.Schedul
er
Probe: MyCustomProb
e
Condition Detection: My Results
Filter
Date Source: Simple.Schedul
er
Probe: MyCustomProb
e
Condition Detection: My Results
Filter
Condition Detection: My Results
Filter
For each workflow, SCOM builds an execution chain. The first step is to resolve/expand all modules to their root definitions, and place them into the chain. So, all our instances of the custom data source are replaced with the modules that make up the data source. Each chain is analyzed, and each module’s input parameters submitted to a hash function. If module IDs and hash results are the same, that indicates duplicate modules that are candidates for cookdown.
![Page 27: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/27.jpg)
Cookdown Workflow
Cooked Down Workflow
Date Source: Simple.Schedul
er
Probe: MyCustomProb
e
Condition Detection: My Results
Filter
Monitor: MyMP.Monitor.MyCustomMonitor1
Monitor: MyMP.Monitor.MyCustomMonitor2
Monitor: MyMP.Monitor.MyCustomAlertRule
Condition Detection:
Schedule Filter
Condition Detection:
Consolidator
Write Action: Generate Alert
Since the first three modules were all configured identically, they are cooked down and run once, with the output replayed to each consuming workflow
![Page 28: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/28.jpg)
Cookdown Example
![Page 29: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/29.jpg)
On Demand Detection
Allows the “Recalculate Health” button to work in Health ExplorerAllows health calculation when exiting maintenance modeCan only trigger a probe module, not a data source moduleBe care if you have many instances of a target class on one host
![Page 30: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/30.jpg)
Agentless Monitoring
Module should have Remoting = True parameter setScripts should never use “localhost” or “.” for computer nameAttempt to use APIs in scripts that support remote execution
![Page 31: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/31.jpg)
Summary
Intro to Management Pack StructureTools for Getting The Job Done
SCOM 2007 Authoring ToolSCOM 2012 Operations ConsoleVisio 2010 (via extension)Visual Studio 2010 (via extension)A Text Editor (I like Notepad++)
![Page 32: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/32.jpg)
Summary – Cont.
Basic Tips & TricksTargetingManagement Pack Design – One vs. ManyMP Version ControlSealed Management PacksDiscovery Scripts
Debugging Scripts
Customizing Rules and Monitors
Running a rule during business Hours
Advanced Tips & TricksAdvanced Authoring ConceptsCreating a Custom Data SourceCreating a Custom Unit Monitor
Expert Tips & TricksCookdownOn Demand DetectionSupporting Agentless Monitoring
![Page 33: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/33.jpg)
More InformationMP Dev Kit - http://msdn.microsoft.com/en-us/library/ee533840.aspxSCOM SDK - http://msdn.microsoft.com/en-us/library/hh329086.aspxMP Dev Documentation - http://social.technet.microsoft.com/wiki/contents/articles/tags/management+packs/default.aspx
Matthew Long- http://matthewlong.wordpress.com/Pete Zerger- http://www.systemcentercentral.com/Blogs/Community/tabid/119/controlType/ViewProfile/UserID/7/Default.aspxBrian Wren - http://blogs.technet.com/b/mpauthor/
![Page 34: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/34.jpg)
Special Thanks To…
Matthew Long
![Page 35: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/35.jpg)
Mickey [email protected]
@mickey_gousset
http://teamsystemrocks.com
http://almrocks.com
http://radiotfs.com
![Page 36: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/36.jpg)
MGT Track Resources
DOWNLOAD System Center 2012 SP1 CTP
microsoft.com/systemcenter
#TEMGT306 DOWNLOAD System Center 2012 Evaluation
microsoft.com/systemcenterHands-On Labs
Talk to our Experts at the TLC
![Page 37: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/37.jpg)
Resources
Connect. Share. Discuss.
http://europe.msteched.com
Learning
Microsoft Certification & Training Resources
www.microsoft.com/learning
TechNet
Resources for IT Professionals
http://microsoft.com/technet
Resources for Developers
http://microsoft.com/msdn
![Page 38: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/38.jpg)
Evaluations
http://europe.msteched.com/sessions
Submit your evals online
![Page 39: Tips & Tricks for Creating Custom Management Packs for Microsoft System Center Operations Manager Mickey Gousset Principal Consultant Infront Consulting](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db35503460f94aa3b8c/html5/thumbnails/39.jpg)
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to
be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS
PRESENTATION.