SCOM 2012 – List of supported network devices

Operations Manager 2012 provides the ability to discover and monitor network routers and switches, including the network interfaces and ports on those devices and the virtual LAN (VLAN) that they participate in. Operations Manager may provide more detailed processor or memory monitoring for some network devices.

This Microsoft Excel spreadsheet lists the devices, vendors, model names, and versions of network devices that have extended monitoring capability. The Devices worksheet includes processor and memory columns for each device to indicate whether Operations Manager can provide extended monitoring for either or both aspects for each device.”

Download the spreadsheet here: http://www.microsoft.com/en-us/download/details.aspx?id=26831

 

SCOM 2012 – Console how to clear the cache

If you are experiencing errors in the console when trying to retrieve data, typical this is “ObjectNotFoundExceptions”, or when the cache file grows too large.

Open the Operations console with the /clearcache parameter.

“C:\Program Files\System Center Operations Manager 2012\Console\Microsoft.EnterpriseManagement.Monitoring.Console.exe” /clearcache

more information: http://technet.microsoft.com/en-us/library/hh212884.aspx

 

SCOM 2012 R2 – Powershell Export Unsealed Management Packs

This Script exports all unsealed management pack. Great to use for backup. run it with: powershell.exe “D:\Backup\export.ps1 -ServerName:SCOMSERVER”

param ($ServerName)
add-pssnapin “Microsoft.EnterpriseManagement.OperationsManager.Client”;
set-location “OperationsManagerMonitoring::”;
new-managementGroupConnection -ConnectionString:$ServerName;
 set-location $ServerName;
 $Date = Get-Date -Format “yyyy-MM-dd”
 $TodaysFolder = “D:\Backup\” + $Date
 New-Item $TodaysFolder -type directory -force
 $mps = get-SCOMmanagementpack | where-object {$_.Sealed -eq $false}
 foreach ($mp in $mps)
 {
 export-SCOMManagementpack -managementpack $mp -path $TodaysFolder
 }

SCOM 2012 – Script run SQL Query

Here is a script to run a SQL Query and set monitor in bad/good state based on result, implement the script as a timed two state monitor.

Dim objCN, strConnection Set objCN = CreateObject(“ADODB.Connection”)
Dim objAPI, oBag Set objAPI = CreateObject(“MOM.ScriptAPI”) Set oBag = objAPI.CreateTypedPropertyBag(StateDataType)
strConnection = “Driver={SQL Server};Server=SPECIFYSERVERNAMEHERE;Database=SPECIFYDATABASEHERE;Trusted_Connection=TRUE” objCN.Open strConnection
Dim strSQLQuery strSQLQuery = “SPECIFY SQL QUERY”
Dim objRS Set objRS=CreateObject(“ADODB.Recordset”)
Set objRS = objCN.Execute(strSQLQuery)
Do Until objRS.EOF ‘WScript.Echo objRS.Fields(“Expr1”)
if objRS.Fields(“Expr1”) = “SPECIFY TRIGGER FROM RESULT TO SET MONITOR in BAD State” then
Call oBag.AddValue(“State”,”BAD”) Call oBag.AddValue(“Custom1”,objRS.Fields(“Expr1”)) Call objAPI.Return(oBag)
else
Call oBag.AddValue(“State”,”GOOD”) Call objAPI.Return(oBag)
end if
objRS.MoveNext Loop
objRS.Close objCN.Close

use this blogpost as an example on how to create the monitor:

http://www.muscetta.com/2007/05/10/create-a-script-based-unit-monitor-in-opsmgr2007-via-the-gui/

 

SCOM 2012 – Generate Alert from Log file

If you want SCOM to read a log file and generate an Alert when a spesific event is recorded, please look at this example (this is one way to do it).

Navigate to:

  • 1. Authoring -> Management Pack Objects -> Monitors -> Change Scope
  • 2. Windows Computer -> Entity Health -> Availability -> “Right Click” -> Create a monitor -> Unit Monitor.

  • 3. Log Files -> Text Log -> Simple Event Detection -> Event Reset

If you want a monitor with only one expression for simple event detection in a logfile without Auto resolve, please select the “Manual Reset” monitor type.

(remember to store the monitor in a custom managementpack)

4.  General properties

  • – Assign the monitor a name
  • – Set monitor target in this case i’ve used the “Windows Computer” class.
  • – I unticked “Monitor is enabled” because I want to enable the monitor later with an override.

  • 5. Specify the log directory and logfile

  • 6. Build Event Expression
  1. Parameter Name: Params/Param[1] (this is the only option available)
  2. Operator: Contains
  3. Value: HTTP Error

  •  7. Application Log Data Source

  • 8. Second Expression

  • 9. Health

  • 10. Configure Alerts

  • 11. The monitor is created

  • 12. Create an override for a group. In this case I have selected a group “Demo Servers”. This Group contains a Server of the Windows Server class.

  • 14. Override “Enabled”

  • 15.We can the se Demo – Log file unitmonitor is created and healty.

  • 16. After updating the log file with an intance of “HTTP Error”. The Monitors state changes.

  • 17. After updating the log file with the “healthy” expression, the monitors state returned to healthy.

 

 

SCOM 2007 – Remove references from default management pack

Sometimes it is necessary to remove references in the default management pack in order to uninstall or upgrade.

I do not recommend storing overrides, groups, views, rules or monitors in the default management pack. Make sure you have cleaned up all objects possible from the SCOM Console, before you edit the XML code. Also check and remove any run as accounts related to the referenced management pack as they are stored in the Default MP.

Check out this guide on how to remove references from Default MP manually.

http://blogs.technet.com/b/momteam/archive/2007/05/03/removing-dependencies-on-the-default-management-pack.aspx

SCOM – Alert on breached FileAge in folder

I created a script to monitor a folder and generate an alert when a folder contains files older than specified.



‘Declare variables DIM objFSO,objParameters,Targetfolder,ThresholdAge,objAPI,oBag

‘Create objects Set objFSO = CreateObject(“Scripting.FileSystemObject”)

Set objParameters = WScript.Arguments
Set objAPI = CreateObject(“MOM.ScriptAPI”)
Set oBag = objAPI.CreateTypedPropertyBag(StateDataType)

‘Set Parameters Targetfolder = objParameters(0) ThresholdAge = int(objParameters(1))

‘***********************************************************************************
Set colFiles = objFSO.GetFolder(Targetfolder).Files
For Each objFile In colFiles
dtmStartTime = objFile.DateLastModified
strDiff = (DateDiff(“n”,dtmStartTime,Now()))
‘***********************************************************************************

If strDiff > int(ThresholdAge) Then
‘WScript.Echo objFile.Name & ” is ” & strDiff & ” minutes old.”
Call oBag.AddValue(“State”,”BAD”)
Call oBag.AddValue(“Custom1”,Targetfolder)
Call oBag.AddValue(“Custom2”,ThresholdAge)
Call objAPI.Return(oBag) WScript.Quit
Else End If
‘***********************************************************************************
Next
‘Wscript.echo “No file is older then ” & ThresholdAge & ” minutes(s)”
Call oBag.AddValue(“State”,”GOOD”)
Call objAPI.Return(oBag)
WScript.Quit

Use this blogpost as an example for creating the monitor.

http://www.muscetta.com/2007/05/10/create-a-script-based-unit-monitor-in-opsmgr2007-via-the-gui/

SCOM 2007 – Monitor reset on Alert close

A request in SCOM 2007 is automatic reset of monitors when closing an incident. A common scenario is that the Alerts are closed but the monitor is left in critical or warning state. Over time this will give a Inaccurate  perception of the actual system’s health in state views and distributed applications.

http://blogs.msdn.com/b/mariussutara/archive/2009/02/02/how-to-reset-monitor-when-closing-alert.aspx

 

SCOM 2007 – Bulk resetting monitors

Getting an idle SCOM installation up to speed again often involves hours resetting and recalculating monitors, getting an idea of the actual situation.

GreenMachine is an OpsMgr Utility that can be used to reset or recalculate all monitors for a single agent, or for all agents in your management group.

http://blogs.technet.com/b/timhe/archive/2009/01/15/announcing-the-greenmachine-utility-for-operationsmanager-rtm-sp1-and-r2.aspx