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 listant les alertes par ordinateurs pour un groupe donné dans un intervalle défini.
N’oubliez pas de vous créer une data source pointant sur le data warehouse 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 Groups - Alerts per computers
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 which list alerts by computers for a selected group in given period.
Do not forget to create a datasource targeting to the data warehouse 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 count(Alert.vAlert.AlertName) As Count,Alert.vAlert.AlertName, Alert.vAlert.AlertDescription, vManagedEntity.Path, vManagedEntity.DisplayName from Alert.vALert
Inner Join vManagedEntity on Alert.vAlert.ManagedEntityRowID
= vManagedEntity.ManagedEntityRowID
WHERE (DATEADD(hh,DATEDIFF(hh,getutcdate(),getdate()),vAlert.RaisedDateTime)) between @startdate and @enddate
and (vManagedEntity.Path IN (
SELECT vManagedEntity.DisplayName
FROM vManagedEntity
INNER JOIN vRelationship ON vManagedEntity.ManagedEntityRowId = vRelationship.TargetManagedEntityRowId
INNER JOIN vManagedEntity AS ManagedEntity_1 ON vRelationship.SourceManagedEntityRowId = ManagedEntity_1.ManagedEntityRowId
WHERE (ManagedEntity_1.DisplayName = @computergroups)
) OR vManagedEntity.DisplayName IN (
SELECT vManagedEntity.DisplayName
FROM vManagedEntity
INNER JOIN vRelationship ON vManagedEntity.ManagedEntityRowId = vRelationship.TargetManagedEntityRowId
INNER JOIN vManagedEntity AS ManagedEntity_1 ON vRelationship.SourceManagedEntityRowId = ManagedEntity_1.ManagedEntityRowId
WHERE (ManagedEntity_1.DisplayName = @computergroups)
))
Group BY Alert.vAlert.AlertName, vManagedEntity.Path, Alert.vAlert.AlertDescription, vManagedEntity.DisplayName
Download Groups - Alerts per computers Report
This report is provided "AS IS" without express or implied warranty of any kind.