The Configuration Manager 2007 Management Pack contains Operations Manager 2007 scripts that run automatically on the agent and scripts that need to be run by an administrator. Additional information about some of these scripts follows in this section.

The following scripts are run by the Operations Manager 2007 agent automatically:

ConfigMgr 2007 Monitor SMS Status Messages

Many problems with Configuration Manager 2007 are detected and reported internally through the SMS Status System. Status messages are raised by Configuration Manager 2007 components pertaining to conditions of interest to a Configuration Manager 2007 administrator.

The status messages flow into the database for a Configuration Manager 2007 site and also up the site hierarchy into the parent site’s database. It is possible to monitor the Configuration Manager 2007 status system on a per-site basis, simply by querying the Configuration Manager 2007 status message table of a specified site’s database.

A set of status messages have been chosen for monitoring that reflect the most critical events to Configuration Manager 2007 administrators. When one of these messages is found in the database, an alert is generated.

This script does the following:

  • Checks whether it is running under agentless-managed mode. If so, the script will exit without taking any further action.

  • Initializes global variables.

  • Opens and reads the RecordID of the last status message processed for each Configuration Manager site database being monitored from the ConfigMgr 2007 Monitor SMS Status Messages.VarSet file.

  • Processes status messages found in each Configuration Manager 2007 site database on the local computer.

  • Writes the RecordID of the last status message processed, for the Configuration Manager 2007 Site Database being monitored, to the ConfigMgr 2007 Monitor SMS Status Messages.SCOM2007.VarSet file and closes the file.

The ConfigMgr 2007 Monitor SMS Status Messages script raises events with an Event ID set to the SMS Status Message ID being reported on. The following table describes the format of the raised event.

Format of Events Raised by ConfigMgr 2007 Monitor SMS Status Messages Script

Parameter

Description

EventType

Success, Error, Warning, or Information, depending on the SMS status message severity

EventNumber

SMS Status Message ID

Category

ConfigMgr site code

LoggingDomain

Resource domain of computer

LoggingComputer

NetBIOS name of computer

Parameter1

NetBIOS name of computer

Parameter2

ConfigMgr module name—for example, ConfigMgr Server

Parameter3

ConfigMgr component name

Parameter4

SMS Message ID

Parameter5

Win32 error code

Parameter6

Parent or top-level site code

Parameter7

RecordID of status message in the SMS Status Message Table

Description

"A new monitored SMS status message on machine <NetBIOS Name> from component <Component Name> with message ID <Message ID> was found in the site <Site Code> database.”

The ConfigMgr 2007 Monitor SMS Status Messages script also reports script errors through Status Message ID number 1102:

EventType= Warning

EventNumber= 1102

Description = The script ConfigMgr 2007 Monitor SMS Status Messages running under processing rule <ScriptProcessingRuleName> encountered a runtime error. The error message will contain the text “Failed to <ErrorDescription>.”

All ConfigMgr 2007 status message monitoring event rules begin with the phrase “ConfigMgr 2007 Status:” and are associated with the ConfigMgr Site Database Servers class.

  • ConfigMgr 2007 Status: Message Monitoring

ConfigMgr 2007 Status: Message Monitoring launches the script every 30 minutes synchronize at 00:02. Summary information is provided on the Knowledge property page of the rule.

Note
ConfigMgr 2007 Status: Message Monitoring will take a long time to run if a lot of historical data resides in the monitored tables. Best practices for this query is to keep status messages pruned to ensure it does not run too long.
  • ConfigMgr 2007 Status: Script error

ConfigMgr 2007 Status: Script error monitors for and alerts on any script error events that might be raised. There is only one script error event, number 1102, which reports all script errors. Information about resolution of the alert is provided on the Knowledge property page of the rule.

  • ConfigMgr 2007 Status: <status message name>

ConfigMgr 2007 Status: <status message name> monitors for and alerts on specific status message events. Information about resolution of the alert is provided on the Knowledge property page of the rule.

All alerts have a description of the event in the following format, where $Description$ is the event description:

$Logging Computer$ - "Rule Name". $Description$

The ConfigMgr 2007 Monitor SMS Status Messages VarSet file is used to persist the RecordID of the last status message processed for a site. The VarSet file is located in the folder specified by the TMP environment variable. It is a tab-delimited file with the following format:

  Copy Code
LastRecordID_DBNameRecordID#

For example, LastRecordID_SMS_FLA, with a RecordID of 477860 would indicate that the last RecordID processed from the site database named SMS_FLA was number 477860.

When upgrading the Management Pack from a previous version, the following might be found in the ConfigMgr 2007 Monitor SMS Status Messages VarSet file:

  Copy Code
LastRecordID476743
LastRecordID_SMS_FLA477860

The first line, which does not contain a database name, indicates the original version of status message monitoring that did not support multiple database monitoring. The second line, which does contain a database name, SMS_FLA, indicates that the current version of status message monitoring does support multiple database monitoring.

No action will be taken to utilize the first line of data, because in the multiple site database case it is difficult to determine to which database it would correspond. The first line of data is not removed from the VarSet file, because it can be of value in evaluating the new changes and insuring that status message monitoring begins with the correct RecordID after the upgrade. In Configuration Manager 2007, all scripts that access the site database will run from the site server in order to support SQL clusters. This is a change from SMS 2003 where the scripts would always run local to the SQL Server. Instances of the Configuration Manager 2007 Site Database Servers will therefore be the same as discovered instances of Microsoft Configuration Manager Site Servers.

ConfigMgr 2007 Monitor Site System Summarizer

Site System Summarizer

The Site System Status Summarizer is a component thread of the SMS Executive service that maintains status on all defined Configuration Manager 2007 site systems. By default, it polls once every hour, on the hour, for current status. This polling interval is defined in the Configuration Manager 2007 Site Control File. It is recommended that the polling interval not be changed. Status is maintained in a table in the Configuration Manager 2007 site database.

Site System DownSince Status

The Site System Status Summarizer assumes that a site system is down when it cannot contact the site system during one of its polling intervals. This can be due to one of the following factors:

  • The site system is not turned on, not connected to the network, or not functioning properly.

  • The ConfigMgr 2007 Site System Status Summarizer does not have a connection because no connections are available.

  • The ConfigMgr 2007 Site System Status Summarizer does not have sufficient access rights to connect to the site system.

  • Network problems are preventing the ConfigMgr 2007 Site System Status Summarizer from connecting to the site system.

  • The site system has been permanently taken out of service.

The DownSince value is a column in the Summarizer_SiteSystem site database table.

The following constraints exist:

  • The Site System Summarizer polling interval is 1 hour. This interval allows sufficient time for the Site System Status Summarizer to poll all the site systems. For performance reasons, the interval cannot be changed. The summarizer’s time-out interval is controlled by the Startup Schedule property in the Site Control File, not by the Wakeup Interval property. This means that changing the Wakeup Interval property from its default value of 60 has no effect. In addition, changing the Startup Schedule has no effect. By default, it is set for every 60 minutes, and the Site System Status Summarizer polls site systems once per hour, on the hour, regardless of how the Startup Schedule is set.

  • An alert will be raised only if two successive ConfigMgr 2007 Site System Summarizer: Site System is possibly down events occur over a period of 2 hours. This is designed to account for temporary network outages.

  • Configuration Manager 2007 can be unavailable in many ways that the Site System Status Summarizer does not monitor. For example, the Site System Status Summarizer does not consider Configuration Manager unavailable if SMS services are not running or the Configuration Manager 2007 site database is unavailable, as when the SQL Server service is stopped.

  • The Site System Status Summarizer writes the current "DownSince" status for each site object and site system role hosted on a computer to the database, in the Site System Status Summarizer table.

The Site System Status Summarizer monitoring script examines each site system role in the Site System Status Summarizer table. If a site system is marked as down, it raises an event. An alert is subsequently generated based on that event. Multiple roles can generate multiple alerts.

Each Configuration Manager 2007 server role, except for a Configuration Manager 2007 distribution point, establishes two Configuration Manager 2007 server roles by default, one for the specific role and the other for the Configuration Manager 2007 component server. For example, in the case of a site system hosting both a server locator point and a reporting point, if the server was offline for more than 2 hours (two Site System Status Summarizer polling intervals), the Site System Status Summarizer would mark both of these roles, and their Configuration Manager component server roles, as down.

However, only three alerts, one for each server role and one for the physical component server hosting two server roles, would be raised per polling interval for the 2-hour period.

  • The 60-minute schedule, offset from the hour by 10 minutes, has been set as default so that the ConfigMgr 2007 Monitor Site System Summarizer script runs 10 minutes after the beginning of the Site System Status Summarizer polling interval of 1 hour. If the summarizer is taking longer than 10 minutes to complete its cycle, the timed event provider offset should be increased appropriately. Otherwise, the most current site system status messages will be missed.

ConfigMgr 2007 Monitor SMS Executive Crash Dumps Script

The following actions are taken by this script:

  • Determines whether the target computer is running in agentless mode. If so, the script exits without further action. This script uses a local VarSet file for persisting variables, so the Operations Manager 2007 agent must be installed on all target computers running the SMS Executive service.

  • Opens and reads the contents of the local ConfigMgr 2007 Monitor SMS Executive Crash Dumps.SCOM2007.VarSet file under the path specified by the TMP environment variable into a collection. If the file does not exist, no script error event is raised. If the file does exist but can’t be opened, a script error event is raised, with a message containing the following text:

Failed to load script variables.

  • Checks whether a new crash dump has occurred since the last time a check was performed. If so, the script raises an event to report the new crash dump. To raise the script error event, the script does the following:

    • Obtains the ConfigMgr Installation Directory from the registry under the SMS Identification key, registry value "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Identification\ Installation Directory". If the path cannot be obtained, the script raises a script error event message with the following text and exits:

Failed to read registry value.

  • Constructs the full path for the CrashDumps directory by appending "\Logs\CrashDumps" to the retrieved Configuration Manager Installation Directory.

  • Checks whether the CrashDumps directory exists. If it doesn’t, the script exits without further action.

  • If the CrashDump directory exists, it obtains the last crash dump folder creation date from the VarSet collection.

  • Checks whether new crash dumps were created and acts only on the most recent one. To determine which is most recent, the saved folder creation date of the last crash dump is used, if available. Date and time comparison is based on folder creation to a resolution of 1 second.

  • If a new crash dump occurred or if it is the first time that the script has run, the script logs and creates event 1710, specifying the new crash dump folder and path. The script saves the folder creation date of the crash dump in the VarSet collection.

  • Writes the contents of the VarSet collection to the local ConfigMgr 2007 Monitor SMS Executive Crash Dumps.SCOM2007.VarSet file and closes the file. If the file does not exist, it is created. If no VarSet variables were set, no entries for them appear in the file. If an error occurs writing the file, a script error event message with the following text is raised: Failed to save script variables.

ConfigMgr 2007 Monitoring SMS Executive Crash Dump Event

The ConfigMgr 2007 Monitor SMS Executive Crash Dumps script reports through event 1710 that a crash has occurred, as described below:

EventType = Error

EventNumber = 1710

Category = SMS Site Code

Description = SMS Executive in site “XXX” has crashed. For details, see crash dump information under <Drive> <ConfigMgrInstallationPath>\Logs\CrashDumps\NewFolder.

ConfigMgr 2007 Monitoring SMS Executive Crash Dumps Script Error Event

The “SMS 2003 Monitor SMS Executive Crash Dumps” script reports runtime script errors through event 1102.

EventType = Warning

EventNumber = 1102

Description = The script “SMS 2003 Monitor SMS Executive Crash Dumps” running under processing rule SMS 2003 Crash Dumps: Monitoring SMS Executive encountered a runtime error. CrLf “Failed to <Message>." ErrorString

See Also