Home » Microsoft Operations Manager 2005 (Page 6)

Category Archives: Microsoft Operations Manager 2005

Book of the day

Microsoft Operations Manager 2005 Field Guide (Expert’s Voice) (Paperback)
by Andy Dominey and Garry Meaburn

Andy Dominey is a well known name in MOM forums and news groups.

  • Paperback: 304 pages
  • Publisher: Apress (October 20, 2006)
  • Language: English
  • ISBN-10: 1590597095
  • ISBN-13: 978-1590597095

The book at Amazone.com

Discovery and installation of agenter with ManualMC.txt

MOM 2005 use the file ManualMC.txt as a alternative to add computers that will be monitored. MOM will install agent on all computers that are in the file, but it can be boring mission to keep that file updated all the time. I have done a script that will quest Active Directory for computers in a OU. The result will then be written to ManualMC.txt. You can also add some machines in the script, so all computers don’t need to be in the same OU.  Setup this script as a schedule task to run sometime every day.

Next time MOM run discovery a agent will be installed on all machines, or they will be placed under pending actions. That depends on your global settings. If you don’t want a machine to have a agent anymore, you can delete the name from ManualMC.txt and MOM will uninstall the agent at next discovery.

Machines in ManualMC.txt will be excluded if there is a exclude rule in the discovery settings.

You will find ManualMC.txt here %SYSTEM ROOT%\Program Files\Microsoft Operations Manager 2005\

This will be a default function in SCOM 2007. Before your start working with the script you will need to change

  • LDAP path
  • Path to the ManualMC.txt file
  • Computer name for computers that always will be included. If you want to add more than two you can add more Computer(X) lines, and also add the first Dom Computer (2) number.

'===========================================
'Machines that always will be included
'===========================================

Dim Computers(2)

Computers(0) = "APP03.DOMAIN.LOCAL"
Computers(1) = "APP02.DOMAIN.LOCAL"
Computers(2) = "APP01.DOMAIN.LOCAL"

'===========================================
'Add machines from list above
'===========================================

Dim i
Dim OutStr

Const ForAppending = 8
Const ForWriting = 2

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile _
("C:\manualmc.txt ", ForWriting)

For i = 0 to UBound(Computers)
objFile.WriteLine Computers(i)
Next

'===========================================
'Query Active Directory for computer objects
'===========================================

Const ADS_SCOPE_SUBTREE = 2

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"

Set objCOmmand.ActiveConnection = objConnection
objCommand.CommandText = _
"Select Name, Location from 'LDAP://OU=Fabrikam,DC=europe,DC=fabrikam,DC=net' " _
& "Where objectClass='computer'"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst

'===========================================
'Add machines from Active Directory result
'===========================================

Do Until objRecordSet.EOF
objFile.WriteLine objRecordSet.Fields("Name").Value
objRecordSet.MoveNext
Loop

'===========================================
'Close file
'===========================================

objFile.Close

Book of the day

Microsoft Operations Manager 2005 Unleashed: With a Preview of Operations Manager 2007
by Kerrie Meyler, Cameron Fuller, Chris Amaris, John Joyner and Alec Minty.

  • Paperback: 984 pages
  • Publisher: Sams; Bk&CD-Rom edition (November 29, 2006)
  • Language: English
  • ISBN-10: 067232928X
  • ISBN-13: 978-0672329289

The book at Amazon.com

MOM 2005 Database Fundamentals

I have written a article about operation and maintenance of the OnePoint database and MOM Reporting database, SystemCenterReporting.

I the article above I discuss how to backup management packs. I have written a how to guide about that script I mention.

TechNet Webcast

Some interesting webcast the in nearest future  

Longhorn in MOM 2005

What happens if you install a MOM 2005 agent on a longhorn server?

Well it works, but Longhorn is operating system version 6.0 so the machine will only end up in “Microsoft Operations Manager 2005 Agents” as default.

 

Agent Failover

What happens to agents when the management server becomes inaccessible?

You can in MOM 2005 Administrator Console setup where every agent can failover. You do this under management server properties, under computers (pic5). You can setup that agents from MOMSRV1 will failover to MOMSRV2 and MOMSRV3. You can’t setup in which order, if first to MOMSRV2 or MOMSRV3. But you can do that in your agent registry. For every management server that scan a agent there is two registry changes, Consolidator X AD Name and Consolidator X Host (pic1). Here, in the agent registry, you can change failover order. You will find Consolidators here My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Mission Critical Software\OnePoint\Configurations\\Operations\Agent\Consolidators.

When the primary management server becomes inaccessible some events is generated on the agent, pic2 and pic3. If that management server also becomes inaccessible the agent do a failover to the next consolidator, in this case FAMOMSRV03 (pic7).

Note that there is no alerts in operator console when a agent do a failover. There is of course alerts when a management server becomes inaccessible, pic6.

If a agent have done failover first to MOMSRV02 and then failover to MOMSRV03 when MOMSRV2 gets back online will the agent don’t do a failover back to MOMSRV02. The agent will wait for the primary management server to get back online, then it will failover back to the primary management server.

eXc Software

eXc software have a lot of exciting management packs for MOM 2005. If you cant find any other way to monitor a service, device or  application there is most probable a management pack from eXc software to do it. They have for example management packs for Cisco, Vmware, MySQL, TrendMicro and McAfee Anti-Virus Server. I also want to say that eXc software customer support is great.

Many eXc software management packs contains two parts, a virtual agent running from the MOM management server and one part is receiving SMTP traps.

If you are working with a eXc management pack and thinks that its difficult to get a nice structure in eXc Software Configuration Tool, you can edit it in the file structure instead. If you look in the C:\Program Files\eXc Software\WMI Providers\Virtual Agents Library\MOM\Solaris\ all settings is stored in XML files. You can create new directories here that will show up in the configuration tool. You can also easy copy/paste files to “clone” settings to a new host. This could be a easier way since the configuration tool is a bit restricted.

In the Software Configuration tool there is a funny functions in the Tools menu, encryption. You will need to input both login and password into the configuration tool and to avoid have them visual you can save it in a text file and the encrypt the file with this function.

Remember to unmark “Disable” if you add new log files to monitor, else they will not be monitored, easy to forget.

eXc Software

TechNet Webcast on MOM

TechNet Webcast: Agility Now (Part 08 of 10): Managing the Environment from Microsoft Operations Manager (Level 200)

Having solved data management issues in the previous webcast, in part eight we illustrate how Contoso uses Microsoft Operations Manager (MOM) and the MOM management packs to achieve the firm’s management goals. With MOM, Contoso is able to monitor their IT environment and alert administrators about potential issues long before they became costly incidents.

 

Sign up here

More interesting webcast about MOM

Ping script

This script ping different machines. If a machine dont answer a local event will ge generated. If you set strLog to 1 a event will be generated for every successful ping.  You will need to create a parameter named Hosts that contains all hosts you want to ping.

'
' If strLog = "1" then a event will be generated for
' success ping.
'
' This script use one parameter called "Hosts".
' Value for this can be like this
' ping.sunet.se,10.1.1.0
'
' Version 2.0

aMAchines = Split(ScriptContext.Parameters.Get("Hosts"), ",")
strLog = "0"
For Each machine in aMachines
Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}")._
ExecQuery("select * from Win32_PingStatus where address = '"_
& machine & "'")
For Each objStatus in objPing
If IsNull(objStatus.StatusCode) or objStatus.StatusCode<>0 Then
Const EVENT_WARNING = 2
Set objShell = CreateObject("Wscript.Shell")
objShell.LogEvent EVENT_WARNING, _
"Computer " & machine & " is not reachable (" & strLog & ")"

ELSE
IF strLog = 1 Then
Const EVENT_SUCCESS = 0
Set objShell = CreateObject("Wscript.Shell")
objShell.LogEvent EVENT_SUCCESS, _
"Computer " & machine & " is reachable"

End If
End If
Next
Next

 

Â