Home > OpsMgr > SCOM2007 Performance monitor data and alert description

SCOM2007 Performance monitor data and alert description

 

Yesterday I got a question about adding a specific data to an alert description. the problem was with a custom performance counter rule for  “% Processor Time”. Every time the total CPU is above 95% in the last 2 samples an alert is generated. the problem with this monitor is that the sampled value in not part of the automatic generated alert.

If we take a closer look, we will see that the alert description have a value filed, but this filed indicate the number of samples taken and not the last value that was monitored.

image

image

every alert have additional information, to view this info we will need to open the alert.
under the alert description there is a link named “view additional knowledge” , clicking on it and choosing the “Alert context” tab will show us more information.

image

and here it is, the “last sampled value” parameter.

The question now is: “How can we take the “Last sample Value” from the alert context and use it in the alert description?”

when clicking the image button the last sampled value is not part of the populated data.

image

?!?!?!?….did we worked for nothing ? if the data available in alert context, how can we get it? which parameter can we use to show it in the description.

Solution:

the easy way I found is to check the alert data using get-alert cmdlet.

get-alert | where{$_.Name –eq ‘my alert name‘}

and here it is:

image

changing the alert description and adding $Data/Context/SampledValue$ solved the problem

Instance $Data/Context/InstanceName$
Object $Data/Context/ObjectName$
Counter $Data/Context/CounterName$
Has a value $Data/Context/SampleValue$
At time $Data/Context/TimeSampled$

Advertisements
Categories: OpsMgr Tags:
  1. No comments yet.
  1. No trackbacks yet.

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: