MOM uses default scheduled tasks that trim and check the OnePoint
database. The administrator configures these through the Admin
Console\Configuration\Global Settings\Database Grooming. MOM
implements these tasks as SQL Server Agent jobs. These can be
inspected through SQL Enterprise Manager\Management\SQL Server Agent\Jobs
where they all have the name suffix 'OnePoint - '. By right clicking
any of these jobs you are able to select 'View History' and see detailed
information on how the job has performed over all its previous schedules.
However
the grooming tasks have a complicated picture as they all use individual
start times, timings and intervals for deciding what is old data and what
isn't. To clarify this the following table lists in chronological
order what task is performed when, what SQL procedures it invokes and what
parameters it uses to carry out the job. There are three basic types
of action:
|
Time
|
Frequency
|
Scheduled
Task
|
Command
|
|
00:00
|
Every 60 minutes
|
Groom Alerts
Deletes first
4,000 alerts
whose ResolutionState is set to 255 (resolved) and age is > than
admin specified interval default 1 day.
[NB the events,
alerts and numeric data grooming tasks are performed using the
GroomDatabase stored procedure.
This takes as its only parm the name of the job which is used
as a lookup into the GroomJob table to fetch the name of the correct
T-SQL script to run and the admin specified interval before a record
is considered old.]
|
GroomDatabase
'Resolved alerts' calls stored procedure AlertsResolvedGrooming
which deletes entries in tables:
AlertHistory
AlertToEvent
AlertEventSuppression
Alert
And updates
table
GroomHistory
|
|
00:00
|
Every 60 minutes
|
Groom Events
Uses three sub
tasks to delete the first 4,000 events whose age is > than admin specified
interval.
- From
Directory Service, DNS Server, File Replication Service,
Application and System Logs if older than 7 days.
- From
Security log if older than 1 day.
- From
Script Generated Data, Internally Generated Data, 3rd
Party Application log, WMI Events, WMI numeric data, Timed
Events, Generic Provider if older than 7 days
|
All procedures
delete entries in tables:
EventParam
AlertToEvent
EventConsolidated
Event
And update
table:
GroomHistory
-
GroomDatabase
'Windows NT Event Logs not including security' calls stored
procedure WinntEventLogGrooming.
-
GroomDatabase
'Windows NT Security Event Log' calls stored procedure WinntSecurityEventLogGrooming.
- GroomDatabase 'Other Events'
calls stored procedure OtherEventsGrooming.
|
|
00:00
|
Every 60 minutes
|
Groom Sampled
Numeric Data
Deletes first
4,000 sampled numeric data older than 1 day.
|
GroomDatabase
'All sampled numeric data' calls stored procedure
sampledNumericDataGrooming which deletes entries in table:
SampledNumericData
And updates
table:
GroomHistory
|
|
0:00
|
Every
M,T,W,Th,F,S
|
Reindex Event
Table
Uses DBCC
Reindex command.
|
DBCC DBREINDEX
(Event, CI_Event_EventSource, 95)
DBCC DBREINDEX (EventParam, CUI_EventParam, 95)
Update tables:
Event
EventParam
|
|
00:00
|
Every 5 minutes
|
TodayStatisticsUpdateComputersAndAlerts
Runs 2 sub tasks
to update the computers and alert
sections of the MOM root details pane.
- Update
Computers
- Update
Alerts
[NB the
ComputersWithSecurityUnavailableView* is a misnomer as this view
actually contains service unavailable]
|
- TodayStatisticsUpdateComputers
Counts MonitoredComputers from Computer, Counts CriticalErrors
from ComputersWithCriticalErrorsView,
Counts Errors from ComputersWithErrorsView, Counts Warnings
ComputersWithWarningsView, Counts SecurityBreach from
ComputersWithSecurityBreachView, Counts
SecurityUnavailable* from ComputersWithSecurityUnavailableView*
and updates table TodayStatistics
- TodayStatisticsUpdateAlerts
Summarizes ServiceLevelExceptions from Alert JOIN
ResolutionState, Counts UnresolvedAlerts from Alert , Counts
NewAlertsToday from Alert and updates TodayStatistics.
|
|
00:00
|
Every 30 minutes
|
TodayStatisticsUpdateEvents
updates the Events section
of the MOM root details pane
|
TodayStatisticsUpdateEvents
counts TimeGenerated from Event and updates table TodayStatistics
|
|
00:00
|
Every 60 minutes
|
TodayStatisticsUpdatePerfmonRulesKB
performs 3 sub tasks:
- Update
Performance
- Update
Rules
- Update
KnowledgeBase
|
- TodayStatisticsUpdatePerformance
counts TimeAdded from ProcessRule and updates table
TodayStatistics.
- TodayStatisticsUpdateRules
counts ProcessingRuleGroups from ProcessRule, counts
MCSProcessingRules from ProcessRule, counts
CustomProcessingRules from ProcessRule, counts ComputerGroups
from ComputerRule, counts NotificationGroups from NotifyGroup,
counts Scripts from Script and updates TodayStatistics.
- TodayStatisticsUpdateKnowledgeBase
counts TimeAdded from ProcessRuleComment and updates
TodayStatistics
|
|
00:30
|
Every 60 minutes
|
Update
Database performs 4 sub
tasks but only on alerts that are ‘New’ and are older than admin
specified interval:
- Auto
resolve success Alerts (4 hrs)
- Auto
resolve information Alerts (4 hrs)
- Auto
resolve warning Alerts (24 hrs)
- Auto
resolve error Alerts (48 hrs)
[NB If Alert is
set to resolved it is groomed from the DB at the top of each hour
e.g. 30 mins later]
|
- UpdateDatabase
'Auto resolve success Alerts' calls stored procedure
AlertUpdateNewToResolved which sets resolution state to
‘255’ for all new alerts of type ‘success’ older than
240 minutes in the alert table.
- UpdateDatabase
'Auto resolve information Alerts' calls stored procedure
AlertUpdateNewToResolved which sets resolution state to
‘255’ for all new alerts of type ‘information’ older
than 240 minutes in the alert table.
- UpdateDatabase
'Auto resolve warning Alerts' calls stored procedure
AlertUpdateNewToResolved which sets resolution state to
‘255’ for all new alerts of type ‘warning’ older than
1440 minutes in the alert table.
- UpdateDatabase
'Auto resolve error Alerts' calls stored procedure
AlertUpdateNewToResolved which sets resolution state to
‘255’ for all new alerts of type ‘error’ older than 2880
minutes in the alert table.
|
|
00:45
|
Every 2 hours
|
Check Free
Data Space
Returns the size
and freespace for the Db and Log.
|
EXEC
sp_OnePointFreeSpace calls OLE Automation stored procedures
sp_OACreate, sp_OASetProperty, sp_OAMethod, sp_OAGetProperty,
sp_OADestroy to return DBSpaceinMB, LogSpaceinMB, DBFreeSpaceinMB,
LogFreeSpaceinMB.
|
|
01:00
|
Every 24 hrs
|
Update
Statistics runs the task
‘Update statistics on all tables’ |
EXEC sp_updatestats from the master db Runs
UPDATE STATISTICS against all user-defined tables in the OnePoint
database
|
|
22:00
|
Every Saturday
|
Check
OnePoint Integrity |
EXEC
master.dbo.xp_sqlmaint '-PlanName OnePointCheckIntegrity -CkDB -CkAl
-WriteHistory'
|
|
22:00
|
Every Sunday
|
Re-index |
EXECUTE
master.dbo.xp_sqlmaint '-PlanName OnePointReindex -RebldIdx 100
-WriteHistory'
|