vanessa's profilesensory overloadBlogListsNetwork Tools Help

Blog


    5/9/2008

    MOM 2005: Agent heartbeat failures

    Steve Rachui wrote a great blog about Agent heartbeat detection in MOM. While I have always understood the way MOM deals with heartbeat failures, explaining to someone who doesn't understand MOM hasn't been all that easy, and this article will help with that.

    And, if your organisation is anything like ours, you will have placed your servers into custom groups for notification purposes. John Hann shared a great script for dealing with these custom notification groups.

    The only change I have made to the script (other than to cater for my 40+ notifications groups), is to remove the Exit for clause.

    Original script:

    For Each Group In GetGroupsForComputer
    If Group.name = "Our - Server Ops" Then
    CreateEvent (33001)
    Exit For
    End If
    If Group.name = "Our - AD Ops" Then
    CreateEvent (33002)
    Exit For
    End If
    If Group.name = "Our - SMS Ops" Then
    CreateEvent (33003)
    Exit For
    End If
    If Group.name = "Our – SQL Ops" Then
    CreateEvent (33004)
    Exit For
    End If
    Next

    My version:

    For Each Group In GetGroupsForComputer
    If Group.name = "Our - Server Ops" Then
    CreateEvent (33001)
    End If
    If Group.name = "Our - AD Ops" Then
    CreateEvent (33002)
    End If
    If Group.name = "Our - SMS Ops" Then
    CreateEvent (33003)
    End If
    If Group.name = "Our – SQL Ops" Then
    CreateEvent (33004)
    End If
    Next

    The reason for this is simple:

    Certain servers may reside in multiple groups, with different people responsible for each group. With the Exit for clause in tact, the script will stop processing after the first group found, and will not generate the additional events.

    5/8/2008

    MOM 2005: Disk defrag analysis

    Use this script to analyse the defragmentation levels of disk drives on the servers.


    '*******************************************************************************
    ' Script Name - Analysis disk defragmentation
    '
    ' Version     - 0.1 (14-Mar-2008)
    '
    ' Purpose     - Analyses the defragmentation of a disk
    '               An event is generated if the disk requires fragmentation.
    '
    '
    ' Events    - 1301: Disk requires fragmentation (Warning)
    '             1302: Disk does not require fragmentation (Info)
    '
    '              
    '*************************************************************************

    ' Event types
    Const Event_Type_Success = 0
    Const Event_Type_Error = 1
    Const Event_Type_Warning = 2
    Const Event_Type_Info = 4
    Const Event_Type_Audit_Success = 8
    Const Event_Type_Audit_Failure = 16

    strComputer = "."
    wmiNS = "\root\cimv2"
    wmiQuery = "Select * from win32_Volume where DriveType ='3'"

    Set objWMIService = GetObject("winmgmts:\\" & strComputer & wmiNS)
    Set colItems = objWMIService.ExecQuery(wmiQuery)

    For Each objItem in colItems
        strDrive = objItem.DriveLetter

    objItem.DefragAnalysis defrag,objitem1
         SubEvalDefrag
    Next

    Sub SubEvalDefrag
    If defrag = 0 then

        strMessage = "Disk " & strDrive & ": This disk does not need defragmentation"
        CreateEvent 1302, 4, strMessage

    Else
        'WScript.echo defrag
        strMessage = "Disk " & strDrive & ": This disk needs defragmentation" & vbcr &_
                     "AverageFileSize: " & objitem1.AverageFileSize & vbcr &_
                     "FilePercentFragmentation: " & objitem1.FilePercentFragmentation & "%" & vbcr &_
                     "FragmentedFolders: " & objitem1.FragmentedFolders & vbcrlf &_
                     "TotalExcessFragments: " & objitem1.TotalExcessFragments & vbcrlf &_
                     "MFTPercentInUse: " & objitem1.MFTPercentInUse & "%" & vbcrlf &_
                     "TotalPageFileFragments: " & objitem1.TotalPageFileFragments
        CreateEvent 1301, 2, strMessage
    End if

    End Sub

    Sub CreateEvent (ByVal StrEventID, strEventType, strMessage)
        ' Create new event and submit event objects
        set objCE_NewEvent = ScriptContext.CreateEvent     ' Set event properties
        objCE_NewEvent.Message = strMessage
        objCE_NewEvent.EventNumber = StrEventID
        objCE_NewEvent.EventType = strEventType
        objCE_NewEvent.EventSource = "Custom Degrag Analysis"
        ' Submit the event
        ScriptContext.Submit(objCE_NewEvent)
        set objCE_NewEvent = Nothing
    End Sub

     


    I would not suggest running this on a daily basis, but rather on a weekly or even monthly basis in off-peak periods, as it can cause slight degradation in service.

    The script runs defrag analysis and will generate an Error event should the drive require defragmentation.

    To implement this script, create a timed event rule to run the script, and then the corresponding event response rules.

    To change the event id generated, these lines should be modified:

    CreateEvent 1302, 4, strMessage
    CreateEvent 1301, 2, strMessage

    You can also modify the message generated as it suits your environment.

    MOM 2005: Script errors

    I have been working through the script errors reported from the machines in our environment recently.

    Today's error tackled was this one:

    Event Type:     Error
    Event Source:   Microsoft Operations Manager
    Event Category: None
    Event ID:       9100
    An error occurred on line 116 while executing script 'Microsoft Windows
    Server Clusters State Monitoring'
    Source: Microsoft VBScript runtime error
    Description: Invalid procedure call or argument

    After much Googling, I found a link on the microsoft.public.mom group provided by the ever-knowledgeable Anders Bergtsson to this discussion on the microsoft.public.mom.managementpack.sql group, providing the solution.

    And the solution, in reality, is rather simple.

    As per Cluster MP Design, the Scripts are configured to run only on the
    Physical Nodes. But it looks like the rules are deployed even in the Cluster
    Virtual Server due to a incorrect Computer Group -- Rule Group association.
    Also note that this failure will have one of the physical node as the
    "Computer" in the Script Error and won't indicate the Virtual Server name.

    I was investigating this issue with one of our customer and observed the
    following.
    Observations:
    1. Microsoft Windows Server 2003 Server Clusters Virtual Servers Computer
    Group had following rules associated with it.
    -- Microsoft Windows Server Clusters [This is Invalid]
    -- Performance

    2. Microsoft Windows 2000 Server Clusters Virtual Servers Computer Group had
    following rules associated with it.
    -- Microsoft Windows Server Clusters [This is Invalid]
    -- Performance

    3. Microsoft Windows Server 2003 Server Clusters Computer Group had
    following rules associated with it.
    -- Microsoft Windows Server Clusters [This is Invalid]
    -- Extended Availability and Health
    -- State Monitoring and Service Discovery

    4. Microsoft Windows 2000 Server Clusters computer Group has had following
    rules associated with it.
    -- Microsoft Windows Server Clusters [This is Invalid]
    -- Extended Availability and Health
    -- State Monitoring and Service Discovery
    All above associations marked as "Invalid" are incorrect. Once we removed
    the rule group from the above computer groups the error disappeared.

    Please perform the following check.
    1. Launch Admin Console.
    2. Select the Cluster Virtual Server Machine and view properties
    3. Go to the Rules TAB
        o. If you find "Microsoft Windows Server Clusters" is listed, then that
    is what causing the issue.
    4. Go to the Computer Groups TAB
        o. For each of the Computer Groups listed, check which one of them has
    "Microsoft Windows Server Clusters" and remove them.

    SCOM 2007: Cross platform extensions

    Extending Cross-Platform Management for the Datacenter

    Microsoft today announced the availability of a public beta for System Center Operations Manager 2007 Cross Platform Extensions, which build on the existing Operations Manager 2007 technology and capabilities and are designed to help customers extend the value of their Microsoft System Center investments. Providing customers with a comprehensive management solution, this new end-to-end IT systems monitoring capability incorporates industry standards and proven open source technologies, including Web Services for Management (WS-Management) and OpenPegasus, extending the capabilities across both physical and virtualized Windows and non-Windows operating systems and applications. Microsoft delivers the core foundational cross-platform support out of the box for HP-UX, Red Hat Enterprise Linux, Sun Solaris and SUSE Linux Enterprise Server operating systems so that partners can focus on adding their deep domain expertise in the form of management packs. Companies such as Novell Inc., Quest Software Inc. and Xandros Inc. have demonstrated their support by working to deliver monitoring abilities for applications made by organizations such as The Apache Software Foundation, MySQL AB and Oracle.

    Further demonstrating support for its commitment to OpenPegasus, Microsoft also announced today that it will be joining the OpenPegasus Steering Committee and contribute code back to the open source community under the Microsoft Public License, an Open Source Initiative (OSI)-approved license.

    “The System Center Operations Manager 2007 Cross Platform Extensions have already delivered exciting results for Xandros,” said Andreas Typaldos, CEO of Xandros. “They enabled us to cut our expected development time in half as we created our management packs for Apache and MySQL running on Linux and Solaris, resulting in quicker time to market and delivery of betas to our customers today. This new foundation from Microsoft enabled us to focus on the development of high-level management functions for applications, with the knowledge that the Cross Platform Extensions were providing the necessary underlying interfaces to System Center Operations Manager, enabling heterogeneous management from a single location across customer environments.”

    Microsoft also delivered a beta of the updated System Center Operations Manager 2007 Connectors, based on many of the same extensible open source technology and industry standards as the Cross Platform Extensions, which provide an integrated administrative experience and the ability to interoperate and exchange System Center monitoring data with third-party management offerings such as HP OpenView and IBM Tivoli Enterprise Console.

    Read the full release here

     

    I think everyone will agree with me that this is simply fabulous news.

    I cannot help but wonder how the guys from eXc Software, who have been providing these extensions at a premium in the past, are feeling about it.

    Our SCOM project kicks off next month and we should be just about finished with the migration when the extensions are freely available. I am looking forward to being able to monitor the entire environment from one place.