Jean-Sébastien DUCHENE Blog's

Actualité, Tips, Articles sur l'ensemble des Technologies Microsoft (SCCM/SMS, EMS, Microsoft Intune, Microsoft Azure, Windows 10, SCOM, MDOP...)

Les rapports fournis avec System Center Operations Manager (SCOM) peuvent paraître parfois pauvre notamment en matière d’administration quotidienne du produit. Aujourd’hui, je vous propose un rapport permettant de lister les changements opérés sur les découvertes, moniteurs, et règles dans un intervalle donné.

Vous pourrez ainsi retrouver des informations comme le Management Pack, le type, le nom, la description du moniteur/découverte/règle.

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 Information - Rules-Monitors-Discoveries Changes

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 the changes operated on Discoveries, Monitors, and Rules in a given interval. You can then retrieve information such as the Management Pack, the type (rule, monitor…), the name, or the description ...

 

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.DisplayName As 'Management Pack', 'Rule' As 'Type', RuleView.DisplayName, RuleView.Description,

(CASE RuleView.Enabled WHEN '0' THEN 'False' WHEN '2' THEN 'True' WHEN '3' THEN 'True' WHEN '4' THEN 'True' END) As 'Enabled'

, RuleView.TimeAdded, RuleView.LastModified

FROM ManagementPackView MP

INNER JOIN RuleView WITH(NOLOCK) ON MP.Id = RuleView.ManagementPackId

WHERE MP.DisplayName IS NOT NULL

AND (RuleView.LastModified BETWEEN @StartDate AND @EndDate OR RuleView.TimeAdded BETWEEN @StartDate AND @EndDate)

UNION

 SELECT  Distinct MP.DisplayName As 'Management Pack', 'Monitor' As 'Type', MonitorView.DisplayName, MonitorView.Description,

(CASE MonitorView.Enabled WHEN '0' THEN 'False' WHEN '2' THEN 'True' WHEN '3' THEN 'True' WHEN '4' THEN 'True' END) As 'Enabled',

 MonitorView.TimeAdded, MonitorView.LastModified

FROM ManagementPackView MP

INNER JOIN MonitorView WITH(NOLOCK) ON MP.Id = MonitorView.ManagementPackId

WHERE MP.DisplayName IS NOT NULL

AND (MonitorView.LastModified BETWEEN @StartDate AND @EndDate OR MonitorView.TimeAdded BETWEEN @StartDate AND @EndDate)

UNION

SELECT  Distinct MP.DisplayName As 'Management Pack', 'Discovery' As 'Type', DiscoveryView.DisplayName, DiscoveryView.Description,

(CASE DiscoveryView.Enabled WHEN '0' THEN 'False' WHEN '2' THEN 'True' WHEN '3' THEN 'True' WHEN '4' THEN 'True' END) As 'Enabled',

 DiscoveryView.TimeAdded, DiscoveryView.LastModified

FROM ManagementPackView MP

INNER JOIN DiscoveryView WITH(NOLOCK) ON MP.Id = DiscoveryView.ManagementPackId

WHERE MP.DisplayName IS NOT NULL

AND (DiscoveryView.LastModified BETWEEN @StartDate AND @EndDate OR DiscoveryView.TimeAdded BETWEEN @StartDate AND @EndDate)

ORDER BY LastModified DESC

 

Download Information - Rules-Monitors-Discoveries Changes report

This report is provided "AS IS" without express or implied warranty of any kind.

Facebook Like
Anonymous