Les rapports fournis avec System Center Operations Manager (SCOM) peuvent paraître parfois pauvres notamment en matière d’administration quotidienne du produit. Aujourd’hui, je vous propose un rapport permettant de lister les overrides contenus dans un Management Pack non scellé. Ce rapport est très pratique dans les opérations de mise à niveau de Management Packs.
N’oubliez pas de vous créer une data source pointant sur la base de données opérationnelle avec les droits nécessaires pour que le rapport puisse être exécuté. Ce rapport marche pour System Center Operations Manager 2007 R2, System Center 2012 Operations Manager et SQL Server 2008 RTM/R2.
Télécharger le rapport Management Pack - Overrides in an Unsealed Management Pack
The reports provided with System Center Operations Manager (SCOM) may sometimes seem particularly poor in terms of daily operations on the product. Today, I offer a report to list overrides stored in an Unsealed Management Pack. This report is useful when you upgrade Management Packs.
Do not forget to create a datasource targeting to the operational database with security rights necessary to generate the report. This reports works with System Center Operations Manager 2007 R2, System Center 2012 Operations Manager and SQL Server 2008 RTM/R2.
Here is the query:
SELECT Distinct MP.MPName,
(CASE WHEN AOV.OverrideType = 'RuleProperty' THEN R.RuleName WHEN AOV.OverrideType = 'MonitorProperty' THEN M.MonitorName WHEN AOV.OverrideType
= 'DiscoveryProperty' THEN D .DiscoveryName WHEN AOV.OverrideType = 'RuleConfiguration' THEN R.RuleName WHEN AOV.OverrideType = 'MonitorConfiguration'
THEN M.MonitorName WHEN AOV.OverrideType = 'DiscoveryConfiguration' THEN D .DiscoveryName END) AS 'NameType', aov.ParentType,
(CASE WHEN mt.Name LIKE '%Group%' THEN 'Group' WHEN aov.ContextObjectId IS NOT NULL THEN 'Object' WHEN aov.ContextObjectId IS NULL THEN 'Class' END)
AS 'ContextType',(CASE WHEN aov.ContextObjectId IS NULL THEN mt.DisplayName WHEN aov.ContextObjectId IS NOT NULL THEN bmeo.DisplayName END)
AS 'ContextDisplayName',
aov.OverrideableParameterName, aov.Value, (CASE Enforced WHEN '0' THEN 'False' WHEN '1' THEN 'True' END) AS 'Enforced', aov.LastModified, aov.TimeAdded
FROM AllOverrideView AS aov LEFT OUTER JOIN
Rules AS R WITH (nolock) ON aov.TargetId = R.RuleId LEFT OUTER JOIN
Monitor AS M WITH (nolock) ON aov.TargetId = M.MonitorId LEFT OUTER JOIN
Discovery AS D WITH (nolock) ON aov.TargetId = D.DiscoveryId LEFT OUTER JOIN
ManagementPack AS MP WITH (nolock) ON
(CASE WHEN AOV.OverrideType = 'RuleProperty' THEN R.ManagementPackId WHEN AOV.OverrideType = 'RuleConfiguration' THEN R.ManagementPackId
WHEN AOV.OverrideType = 'MonitorProperty' THEN M.ManagementPackId WHEN AOV.OverrideType = 'MonitorConfiguration' THEN M.ManagementPackId
WHEN AOV.OverrideType = 'DiscoveryProperty' THEN D .ManagementPackId WHEN AOV.OverrideType = 'DiscoveryConfiguration' THEN D .ManagementPackId
END) = MP.ManagementPackId INNER JOIN
ManagementPack AS MPSTORE WITH (nolock) ON MPSTORE.ManagementPackId = aov.ManagementPackId LEFT OUTER JOIN
ManagedTypeView AS mt ON mt.Id = (CASE WHEN aov.ContextObjectId IS NOT NULL THEN aov.ContextObjectId ELSE aov.ContextId END) LEFT OUTER JOIN
BaseManagedEntity AS bmeo WITH (NOLOCK) ON bmeo.BaseManagedEntityId = aov.ContextObjectId
WHERE (MP.MPName IS NOT NULL) AND MPSTORE.MPFriendlyName = @MPName
ORDER BY 'ContextType', ContextDisplayName
Download Management Pack - Overrides in an Unsealed Management Pack Report
This report is provided "AS IS" without express or implied warranty of any kind.