OK, so I did some more research and scripting last evning…
Here is a script that puts out some random perfomance data between the parameters to the script.
In the perfomance mapper, set Value to $Data/Property[@Name='Perfdata']$, and don’t forget the parameters.
'-------------------------------------------------------------------------------------
' Script to write random perf-data
'
' Rikard Rönnkvist / snowland.se / 2007-10-24
'-------------------------------------------------------------------------------------
' --- Set up variables and objects
Option Explicit
Dim iMinRnd, iMaxRnd, perfData
Dim oArgs, oAPI, oBag
' --- Get parameters
Set oArgs = WScript.Arguments
iMinRnd = Int(oArgs.Item(0))
iMaxRnd = Int(oArgs.Item(1))
Set oArgs = Nothing
' --- Generate random number
Randomize
perfData = Int((iMaxRnd - iMinRnd + 1) * Rnd + iMinRnd)
' --- Create properies in SCOM
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oBag = oAPI.CreatePropertyBag()
oBag.AddValue "minValue", iMinRnd
oBag.AddValue "maxValue", iMaxRnd
oBag.AddValue "Perfdata", perfData
oAPI.AddItem(oBag)
oAPI.ReturnItems
Set oAPI = Nothing
Set oBag = Nothing
I did use “500 1000″ as a paramreter and got this nice demo-view of performance:
Now, its time to play with alerts and baselining that data…