Huntland Services Ltd

Tel: +44 (0)1392-490518
Fax: +44 (0)1392-428003
Enquiries@huntland.co.uk

Alert Statistics Portfolio

Back Download The Scripts

 

Introduction

Of all the Alerts being generated in my Mom environment, what proportion are coming from my Exchange box?  Which is the Processing Rule that seems to be responsible for generating the most alerts?   For my IIS box, how long is the delay before an alert condition is detected and that alert being written into the database and therefore being visible to the Admin Console?

The following are a collection of scripts that provide information variously on the sources of Alerts in your organisation.  The output will be displayed on screen and also written to a TXT file or CSV file suitable for use with Excel.  The result include latency details indicating how many seconds it took (Max, Min and Average) from the condition first being detected to the point where it was committed to the Database.  This reflects how well Mom is keeping up.   If the Agent has been in constant contact with the CAM then these figures will be low, but if contact has been interrupted for any reason the latency figures will rise dramatically.

Because of the size of the output these scripts should only be run from a Command Prompt using CSCRIPT.  You will need to specify the following paramaters:

  1. myMomSqlServer - The name of the server hosting the MOM Onepoint Database
  2. outputFile - the full path and name of the file to be used for output.  Specifying a CSV extension will produce a comma separated output suitable for use with Excel.  All other extensions will produce a Text output suitable for other reporting tools.
  3. myServer - the name of the computer to which you want to limit the results.  For example specify 'Server1' if you are only interested in alerts/events for that machine.   SQL wild cards are valid so that Server% or just % widen the scope of eligible machines to be included.

In all cases your account must have access to the MOM SQL Server and at least read access to the Onepoint database.  Windows Security ('Integrated') is assumed.

If your database is many gigabytes in size then you can expect a delay while the query runs.  Each script has two commented timeout values controlling the maximum connection time and the maximum time to run a command.  By default these are set low and may have to be increased for larger databases.

 

1. AlertCulprit.vbs

Purpose:   To list which Mom culprits have been generating alerts per machine

Syntax:    cscript  alertCulprit .vbs   myMomSqlServer     C:\temp\alertCulprit.txt     myServer

Result:

Computer Culprit Total # Max Min Avg
myServer OnePoint Operations 132142 234 0 523
myServer W3SVC 2345 12 0 25
myServer DNS 561 24 0 12

 

 

 

 

2. AlertCulprit_Summary.vbs

Purpose:  To list which Mom culprits have been generating alerts in all cases

Syntax:   cscript   alertCulprit_Summary.vbs   myMomSqlServer     C:\temp\alertCulprit.txt 

Result:

Culprit Total # Max Min Avg
OnePoint Operations 23456 456 0 345
W3SVC 5647 34 0 12
DNS 3456 45 0 18

 

 

 

 

3. AlertProcessingRule.vbs

Purpose: To list which Mom processing rules have been generating alerts per machine

Syntax:  cscript   alertProcessingRule.vbs   myMomSqlServer     C:\temp\alertProcessingRule.txt     myServer

Result:

Computer Processing Rule Total # Max Min Avg
myServer Confirm is up and running 34 5 0 3
myServer Event Log "wrapped" 27 12 0 8
myServer Script error 12 234 0 56

 

 

 

 

4. AlertProcessingRule_Summary.vbs

Purpose:  To list which Mom processing rules have been generating alerts in all cases

Syntax:  cscript   alertProcessingRule_Summary.vbs   myMomSqlServer     C:\temp\alertPR_Summary.txt 

Result:

Processing Rule Total # Max Min Avg
Disk is at or near capacity! 345 456 0 345
Unknown token name encountered 281 34 0 12
An ASP error was returned to a client 57 45 0 18

 

 

 

 

5. AlertProvider.vbs

Purpose:   To list which Mom providers have been generating alerts per machine

Syntax:  cscript   alertProvider.vbs   myMomSqlServer     C:\temp\alertProvider.txt     myServer

Result:

Computer Provider Total # Max Min Avg
myServer Application 32678 5 0 3
myServer System 15345 12 0 8
myServer IIS Application Log - Web Server 2435 234 0 56

 

 

 

 

6. AlertProvider_Summary.vbs

Purpose:  To list which Mom providers have been generating alerts in all cases

Syntax:  cscript   alertProvider_Summary.vbs   myMomSqlServer     C:\temp\alertProv_Summary.txt 

Result:

Provider Total # Max Min Avg
DNS Server 34567 456 0 345
Script-generated data 23452 34 0 12
Memory - Page Faults/sec - 15-minutes 2435 45 0 18

 

 

 

 

7. AlertSummary.vbs

Purpose:  To summarise all Mom Alerts

Syntax:  cscript   alertSummary.vbs   myMomSqlServer     C:\temp\alerts.txt 

Result:

Computer Total # Max Min Avg
Server1 53467 645 0 35
Server23 45367 143 0 56
Server4 34256 4567 0 2341

 

 

 

 

 

Please accept these scripts as is.  Any feedback will be gratefully received at Debug@Huntland.co.uk