Home » 2007 (Page 12)
Yearly Archives: 2007
Active Directory MP update for Operations Manager RC2
A new version of the Active Directory management pack is available for download at Microsoft Connect webpage. This updated version of the AD MP addresses several issues in the original AD MP that shipped with RC2. Specifically it fixes:
-
AD Topology Discovery
-
Discovery of DCs with non-US locales
-
Discovery of Windows Server 2000 DCs
-
Fixed problem: Defect: AD MP for Windows Server 2000/2003 – local discovery of the Domain Controller fails if targeted DC is using a non-US date/time/number formatÂ
-
Fixed problem: Defect: AD MP for Windows Server 2000 (all locales – under certain conditions) Â
Check two or more performance counters
I have done a script that will check two performance counters and generate an alert if both are over threshold values. It simple to add more performance counters and change the threshold values. I have test it on Windows Server 2003 and Window XP 32bit. Its fairly basic, but it will show you a way to generate an alert based on two or more performance counters.
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”)
set objRefresher = CreateObject(“WbemScripting.SWbemRefresher”)
Set colItems = objRefresher.AddEnum _
(objWMIService, “Win32_PerfFormattedData_PerfOS_System”).objectSet
objRefresher.Refresh
For i = 1 to 2
For Each objItem in colItemsstrProc = objItem.Processes
strCPUQL = objItem.ProcessorQueueLengthIf strProc > 40 AND strCPUQL > 0 Then
Const EVENT_WARNING = 2
Set objShell = CreateObject(“Wscript.Shell”)
objShell.LogEvent 2, “Number of processer: ” & strProc & “. Processor Queue Lenght: ” & strCPUQL
End If
objRefresher.Refresh
Next
Next
1. Create a new script and paste the script source
2. Create a new event rule to run the script every X minute as respond
3. Create a new event rule to collect event ID 2 and event type of Warning
4. Commit configuration change
Monitor if a share is accessible
This script will check if a file in a share is accessible, if not, it will generate a local event.
strFile = "\\ntlcs\share\file_check.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strFile) Then
Else
  Const EVENT_WARNING = 2
   Set objShell = CreateObject("Wscript.Shell")
   objShell.LogEvent 2, strFile & " is not accessible."
End If
- Create a new script and paste the script
- Create a new event rule to run the script every X minute as respond
- Create a new event rule to collect event ID 2 and event type of Warning
- Commit configuration change
Monitor file and directory size
This script will monitor file and directory size. It will generate performance data back to the management server. You can view this information under performance view in Operators Console or/and in reports. This first example will monitor the size C:\pagefile.sys
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("c:\pagefile.sys")
CreatePerfData "File","File Size",objFile.Path,objFile.SizeSub CreatePerfData(strObjectName,strCounterName,strInstanceName,numValue)
   Set objPerfData = ScriptContext.CreatePerfData
   objPerfData.ObjectName = strObjectName
   objPerfData.CounterName =strCounterName
   objPerfData.InstanceName = strInstanceName
   objPerfData.Value = numValue
   ScriptContext.Submit objPerfData
End Sub
This example will monitor the size of all subfolders under C:\Â
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\")
Set colSubfolders = objFolder.Subfolders
For Each objSubfolder in colSubfolders
CreatePerfData "File","File Size",objSubfolder.Path,objSubfolder.Size
Next
Sub CreatePerfData(strObjectName,strCounterName,strInstanceName,numValue)
                  Set objPerfData = ScriptContext.CreatePerfData
                  objPerfData.ObjectName = strObjectName
                  objPerfData.CounterName =strCounterName
                  objPerfData.InstanceName = strInstanceName
                  objPerfData.Value = numValue
                  ScriptContext.Submit objPerfData
End Sub
- Insert the script as a new script in Administrator Console
- Create a event rule that run the script every X minute
- Commit configuration change and wait until the script has run
- Open Operator Console, click performance, click you server and choose your new FILE performance objects, click draw graph
There is a guide about how to create performance data reports at momresources.org
Monitor recovery mode
This script will check recovery mode of a MS SQL database. Its pretty simple to modify to check other databases or all databases. This example will check if the Onepoint database is running with SIMPLE recovery mode. If it does, a local event will be generated. You can then create a event rule to collect that event and generate an alert in MOM.
set cn = Nothing
set rs = nothingstrSQLServer = "localhost"
Set cn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=master;Data Source=" & strSQLServer & ""
strSQLQuery = "select name, databasepropertyex(name, 'recovery') as RECOVERY from sysdatabases WHERE NAME = 'OnePoint'"
Set rs = cn.execute(strSQLQuery)
strDBName = rs("Name")
strMode = rs("Recovery")
If strMode = "SIMPLE" then
 Const EVENT_WARNING = 2
 Set objShell = CreateObject("Wscript.Shell")
 objShell.LogEvent 2, "The " & strDBName & " database is running in simple recovery mode"
End If
- Create a new script and paste this source
- Create a rule that run the script every X minute
- Create a rule that collects and generate alerts on event ID 2 from WSH in the application log.
Updated OpsMgr 2007 Documentation and Active Directory MP
- Defect: AD MP for Windows Server 2000/2003 – local discovery of the Domain Controller fails if targeted DC is using a non-US date/time/number format
- Defect: AD MP for Windows Server 2000 (all locales – under certain conditions)
Documentation
- How to cluster the root management server – The following procedures show how to install Operations Manager 2007 Root Management Servers on a Windows cluster
- Operations Manager 2007 Quick Start Guide – The Quick Start Guide is designed to help you quickly deploy Operations Manager 2007 for evaluation purposes in a test environment.
http://connect.microsoft.com/systemcenterÂ
Â
Â
Â
Microsoft System Center “Service Deskâ€
I run into the Microsoft System Center “Service Desk†timeframe on a wepage
- Beta1: December 2006 (TAP is running)
- Beta 2: end of April 2007
- RC: beginning of July 2007
- RTM: December 2007
There will be a public beta around March 2007 (according to the rumor) Â
There are a couple of screenshots at this and this page. You can find more information about “Automating IT Service Management with System Center” here
FAQ
I have notice a couple of common questions in newsgroups and forums this week.
Rule that will alert you if process X use more that Y % Processor Time
In this example I will montor if iexplorer (Internet Explorer) takes more that 1 % processor time. Maybe not a very common scenario, but it will work to show you how to setup this for other processes and thresholds.
First we need to create a new provider to collect the performance counter, and then an alert that will compare performance data and generates an alert.Â
- Create a new provider in MOM 2005 Administrator Console
Computer: or
Object: Process (use “advanced” to enable this dropdown menu)
Counter %Processor Time
Instance: iexplorer (you might need to start that process before it shows up in the list) - Create a new performance rule to compare performance data (threshold
Provider:
Schedule: Always process data
Criteria: Leave default values
Threshold: “Match when the threshold meet the following condition:” “greater than the following value: 1”
Alert: Generate alert
Alert suppression: Leave default settings
Response: None
Knowledge Base: Optional
General: Input a name and verify that the rule is enabledÂ
That should do it. Note that it can take a couple of minutes before the new rule is active.
Â
How do I see all members of a computer group?
- Start Operator Console
- Click public views
- Click computer groups
- Right-click a computer group and choose view -> computers
Â
Â
Â
Runbook servers in different time zones
Scaling Azure VM with Azure Automation, with help of Azure SQL
Recent Comments