SCOM Events Dashboard

Dashboard visualization for Operations Manager does not include an Event Widget. But this does not mean that displaying events in a dashboard is off-limits.

My suggested usage example makes use of Powershell Grid Widget with Filter (https://gallery.technet.microsoft.com/Powershell-Grid-Widget-919dc3d6).

I would design the Events dashboard as a 2 cell grid layout: the above cell called Event Collection Rule and the one below just Events. Both cells will use the Powershell Grid Widget with Filter template.

And here are the scripts that I would use to configure them.

Event Collection Rule cell:

$rules = Get-SCOMRule | Where {$_.Category -eq "EventCollection"}
foreach ($rule in $rules)
{
    $dataObject = $ScriptContext.CreateInstance("xsd://rules")
    $dataObject["Id"]=$rule.Id.Guid.ToString()
    $dataObject["RuleName"]=$rule.Name
    $dataObject["RuleDisplayName"]=$rule.DisplayName
    $ScriptContext.ReturnCollection.Add($dataObject)
}

Events cell:

Param($globalSelectedItems)
foreach ($globalSelectedItem in $globalSelectedItems)
{
    $rule = Get-SCOMRule -Id $globalSelectedItem["Id"]
    $events = Get-SCOMEvent -rule $rule
    foreach ($event in $events) {
                $dataObject = $ScriptContext.CreateInstance("xsd://events")
                $dataObject["Id"]=[string]$event.Id.Guid
                $dataObject["TimeAdded"]=[string]$event.TimeAdded
                $dataObject["LoggingComputer"]=[string]$event.LoggingComputer
                $dataObject["Description"]=[string]$event.Description
                $ScriptContext.ReturnCollection.Add($dataObject)
     }
}

The end result is an easy searchable grid for rules that classify as EventCollection category, and the corresponding events collected by the selected rule. Note that even multiple rules selection will work.

Events can also be filtered, just make sure that you click on one of the columns of the grid first.

Advertisements

One response to “SCOM Events Dashboard

  1. Pingback: System Center Aralık 2016 Bülten – Sertac Topal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: