MOM2005 Notification Command parameterlista

Har letat en bra stund efter alla parametrar för att skicka ut larm via “Notification Command” i MOM2005.

Hittade efter lite om och men en lista. Bra-att-veta, kör man managed code så finns det en bugg och då behöver man köra med det numeriska värdet istället.

Event parameters
Event Number = 01
Full Event Number = 02
Event Type = 03
Message Dll = 04
Source Name = 05
Provider Name = 06
Provider Type = 30
Description (Message) = 07
Message Dll File Version = 08
Logging Computer = 09
Category = 10
Event Time = 11
Source Computer = 12
User Name = 13
User Domain Name = 26
Logging Domain = 14
Source Domain = 15
Repeat Count = 17
First Time = 18
Last Time = 19
Start Time = 20

Alert parameters
Source (Culprit) = 50
Name = 62
Description = 63
Owner = 51
Severity = 52
ResolutionState = 53
AlertTime = 54
Computer = 55
Domain = 56
Alert Rule Group ID = 64
Custom Field1 = 57
Custom Field2 = 58
Custom Field3 = 59
Custom Field4 = 60
Custom Field5 = 61

Performance parameters
Object = 21
Counter = 22
Instance = 23
Time = 24
Value = 25

Varför letade jag då? Jo jag håller på att hacka lite på mitt EasyCall-script


MOM MP: Diskfragmentering

Klart ballt… och bra-att-ha på servrar.

En kille som heter Robert Smit har knåpat ihop ett MP för att hålla koll på fragmenteringen av diskar.

I made a New Management pack for diskdefragmentation. at first I had several Ideas for this. Talked with pete zerger about this. but I ended this idea and made a task for this. And I implemented the remote CMD console if you need this. So from your MOM operator console you can start a CMD on the agent server.
I used the “new” microsoft tool psexec. Get it here
http://www.microsoft.com/technet/sysinternals/utilities/psexec.mspx

let me know what you think or if there is a problem. It is not perfect it takes tuning. Get it here
http://www.aca-computers.nl/MOMMP/defragmentation/defragmentation.akm


Basic MOM-scripting

Scripting Guys på Microsoft har släppt en enkel artikel om hur man skapar en alert från ett event i MOM.
Ger en ganska enkel och bra bild över hur man kan börja… kan man sedan lite VBScript så är det enkelt att köra vidare från detta…

Microsoft Scriptcenter

‘#####================================================================================

‘## Title: MakeAlertFromEvent.vbs
‘## Author: Eric Payne
‘## Client\Company: xxxx
‘## Date: 10/16/2006
‘##                          
‘## Purpose:
‘##        1. Response script for MOM. When generating a Windows Application Event on a remote computer,
‘##        the "Computer" field in the header of the event is actually the name of the comptuer that
‘##        sent the event (Logging computer), not the actual sever it was found on (Source Computer).
‘##        When creating a MOM event rule to monitor for this event and generating an alert based on it,
‘##        the source field appears as if it was from the Logging Computer and not the Source Computer.
‘##        This script changes that Source Computer field to be that of the Source computer
‘##        Example:
‘##        Server A writes an event to Server B that the "alerter service is down"
‘##        On Server B the "Computer" field in the header of the event says "Server A"
‘##        When configuring a standard MOM event rule to watch for this event and when generating an alert based on this event
‘##        the alert will show "Source Computer" as Server A. This is misleading and is not accurate, but technically correct.
‘##        Server B has the problem with the alerter service, not Server A
‘##        This script corrects that problem by inserting the correct "Source Computer" into the Source
‘##        computer field. So now when an event happens, instead of the rule generating an event, it responds with
‘##        this script and generates a custom alert with the source computer showing "Server B"
‘##                                                                          
‘## Requirements:
‘##                          1. Mom Script Parameter – Alert Type: Type of alert to raise (ALERT_ERROR, ALERT_INFORMATION, ‘##                             ALERT_WARNING)
‘##                          2. Mom Script Parameter – Alert Name: Name of the Rule this is run from
‘##
‘## Basic Logic:
‘##                          1. Read in Alert Name and Alert Type
‘##                          2. Parse Alert Type
‘##                          3. Generate alert with correct source computer
‘#####================================================================================

If (ScriptContext.IsEvent()) Then
    Dim objParams: Set objParams = ScriptContext.Parameters
    Dim strName: strName = objParams.Get("Name")
    Set objParams = Nothing
    Dim strAlertType: strAlertType = objParams.Get("AlertType")
                Dim intAlertID
                Select Case strAlertType
                                Case "ALERT_SUCCESS"
                                                intAlertID = 10
                                Case "ALERT_INFORMATION"
                                                intAlertID = 20
                                Case "ALERT_WARNING"
                                                intAlertID =  30
                                Case "ALERT_ERROR"
                                                intAlertID = 40
                                Case "ALERT_CRITICAL_ERROR"
                                                intAlertID = 50
                                Case "ALERT_SECURITY_BREACH"
                                                intAlertID = 60
                                Case "ALERT_SERVICE_UNAVAILABLE"
                                                intAlertID =  70
                End Select
    Dim objEvent: Set objEvent = ScriptContext.Event
    Dim objAlert: Set objAlert = ScriptContext.CreateAlert()
    objAlert.Name = strName
    objAlert.AlertLevel = intAlertID
    objAlert.Computer = objEvent.SourceComputer
    objAlert.AlertSource = objEvent.SourceComputer
    objAlert.ComputerDomain = objEvent.SourceDomain
    objAlert.Description = objEvent.EventParameter(1)
    ScriptContext.Submit objAlert
                Set objAlert = Nothing
                Set objEvent = Nothing
End If
 


BackupExec 11 MP för MOM

Nyligen släppt… ett MP för Symantec Backup Exec 11

The VERITAS Backup Exec for Windows Servers Management Pack module monitors for events placed in the Windows event logs and WMI. With extensive embedded expertise, such as detecting and automatically responding to critical conditions, this Management Pack allows you to proactively manage VERITAS Backup Exec and avoid costly service outages. This Management Pack alerts you in the following critical conditions:
  • Detect Backup Exec Service paused, stopped, and failed states
  • Backup and Job failures and errors
  • Device and Media failures and errors
  • Backup Exec Remote Agent failures and errors
  • Server and Service failures and errors

Ladda hem här: http://seer.support.veritas.com/docs/285823.htm


RSS-ström för MOM MP’s

Justin Incarnato skrev nyss en blog-post om RSS-strömmen som dom funderar på att släppa.

RSS-Strömmens 5 senaste:


Ominstallation av WMI

En kolega hade problem med ett gäng servrar som sprutade ut WMI-felmeddelanden… han hittade ett inlägg som Ivan Brugiolo skrev i newsgroup’en microsoft.public.win32.programmer.wmi:

—————8<---------------
From a very old post of mine in this same forum, how to check why WinMmgt became un-usable and how to repair it.

Try to remove, if they are there

HKLM\Software\Microsoft\OLE
"EnableRemoteConnect"="Y"
"LegacyAuthenticationLevel"=dword:00000001
"LegacyImpersonationLevel"=dword:00000001
 

Some legacy application from the Win9x era are known to create those key that impair many DCOM functionality on the machine.

check the following registry key HKLM\System\Software\Microsoft\WBEM\CIMOM\AutoRecover MOFs it is supposed to have a list of *.MOF and *.MFL files, and it MUST begin with cimwin32.mof
There are ISP connection kits and .NET Framework setups known to corrupt this key.
Please delete it content if it appears to have few files or if it appears corrupt.

check if in %windir%\system32\wbem there are about 40 MOF files.
There are certain applications known to delete them.
If you don’t have them, please recover them from the CD of WinXP.
The complete list is found in %windir%\IFM\wbemoc.inf

Please check the following:
-1- that you system path has still %windir%\system32\wbem in it.
-2- that there are no wmiutils.dll and wbemcomn.dll in the system path that comes before the one in system32\wbem.

c:\>for %i in ("wbemcomn.dll") do (echo %~$PATH:i)
c:\>for %i in ("wmiutils.dll") do (echo %~$PATH:i)
 

check if the wbemutils.dll registered as a COM component comes from the OS or from Visual Studio and/or other development tools. Make sure the OS Supplied one is used.

enable versbose logging

HKLM\Software\Microsoft\WBEM\CIMOM:Logging(REG_SZ) = "2"
HKLM\Software\Microsoft\WBEM\CIMOM:Logging File Max Size (REG_SZ) = "4000000"
 

find the PID of the svchost.exe process running WinMgmt

HKLM\Software\Microsoft\WBEM\CIMOM:ProcessID (REG_DWORD) = XXX

crosss check the pid

c:\>tlist -s | findstr /i winmgmt

it must be the same as above, if not, trust tlist.exe more than the registry for the steps below.

you can get “tlist .exe” and “kill.exe” (needed later) from http://www.microsoft.com/ddk/debugging/installx86.asp

c:\>sc config winmgmt start= disabled
c:\>kill -f XXX    — pid obtained before
c:\>cd /D %windir%\system32\wbem
c:\WIN\system32\wbem>rmdir /s /q repository
c:\WIN\system32\wbem>rmdir /s /q Logs
c:\WIN\system32\wbem>mkdir Logs
c:\WIN\system32\wbem>for /R %i in (*.dll) do (regsvr32 /s %i)
c:\WIN\system32\wbem>regsvr32 /s fastprox.dll
c:\WIN\system32\wbem>for /R %i in (*.exe) do (%i -regserver)    — this will open wbemtest and/or wmic.exe. Just close it
c:\WIN\system32\wbem>sc config winmgmt start= auto
c:\WIN\system32\wbem>regsvr32 wbemupgd.dll    — this can take 30 seconds to 2 minutes
c:\WIN\system32\wbem>net start server && net start workstation && net start AudioSrv && net start termservice
 

after this, please start %windir%\system32\wbem\wbemtest.exe, and connect to the root\cimv2 namespace.

If something goes wrong, please read the logs under %windir%\system32\wbem\Logs, just to see if there is something obviousely wrong there.

After all of this is done, there might be misconfiguration problems that have changed access permission to registry key and files for the NetworkService account.
The NetworkService account is the one running one of the Provider Host.
To test if this can be the problem, you ca add NetworkService to the administrators group

c:\>net localgroup administrators NetworkService /ADD

Please remember to remove it as soon as the misconfiguration problem have been identified
—————8<—————


Uppdatera GroomDays i SCDW

För att minska ner storleken på SystemCenterReporting-databasen kan man dra ner på antalet dagar man sparar data.

Genom att köra det här SQL-scriptet så drar man ner till 7 dagar.

USE SystemCenterReporting

Declare @Groomdays int
SELECT @Groomdays=7

exec p_updateGroomDays ‘SC_SampledNumericDataFact_Table’, @Groomdays
exec p_updateGroomDays ‘SC_AlertFact_Table’, @Groomdays
exec p_updateGroomDays ‘SC_EventParameterFact_Table’, @Groomdays
exec p_updateGroomDays ‘SC_AlertToEventFact_Table’, @Groomdays
exec p_updateGroomDays ‘SC_EventFact_Table’, @Groomdays
exec p_updateGroomDays ‘SC_AlertHistoryFact_Table’, @Groomdays
 


MOM-Script: ServiceMonitor

Ett script som kontrollerar om en service har hängt sig under uppstart/nersängning.

Parametrar

  • ServiceName = wuauserv (Service att övervaka)
  • RecheckSeconds = 20 (Sekunder mellan kontroller)
  • RecheckCount = 3 (Antal kontroller att göra)
  • DebugMode = False (Skapa event oavsett status? Vid felsökning)

Script: ServiceMonitor.vbs


MOM-Script: MOM-larm till EasyCall

Ett script för att skicka lagomt med info till EasySoft’s programvara EasyCall

Script: MOM_to_EasyCall.vbs


MOM-Script: ShareTest

Ett script som testar att ansluta mot ett nätverkshare.

Parametrar

  • strDriveLetter = H: (Enhet att testa mappa med)
  • strNetworkPath = \\SERVER\Share (Sökvg att testa)
  • scriptEcho = False (Debug-läge)

Script: ShareTest.vbs


« Previous PageNext Page »