Sample Management Pack Specification

Sample Management Pack Specification

Sample Management Pack Specification

Contoso POS

Version 1.0
March 21, 2011

This is a sample specification for a System Center Operations Manager 2007 R2 management pack supporting a line of business application. The application described in this document is completely fictional but does include aspects of different real world applications taken from different customers. A variety of requirements were collected in order to illustrate different common and challenging scenarios.

The purpose of this sample is to illustrate a process for designing a management pack. This basic process is as follows:

  1. Briefly document the application breaking it into distinct groupings.
  2. Design a service model comprised of the following:
  3. Application Roles and Components
  4. Health Rollups
  5. Relationships with existing objects
  6. Identify the functionality and potential problems for each class in the service model.
  7. Define monitors and rules to measure the health of each class and identify each potential problem.

1Application Overview

1.1High Level Architecture

There are two distinct environments to the Contoso automated sales environment. First is the POS environment which includes POS Terminals and the local resources on the Store Server. This is a fully contained environment located at each store. There are currently 53 stores for Contoso meaning that there are 53 store environments.

The Contoso eComm environment is the customer facing web based commerce application and also includes the back end databases and connection to the host and business partners. In addition to supporting online customer shopping, the back end consolidates data from the store servers and updates these local data stores with updated product and pricing information from the data on the host.

There is a nightly process that copies data between the central data store and each store database. The store is fully functional if this process is not operational, but its local pricing and product information may become stale. In addition, the back end services rely on inventory information from the local stores to make purchasing decisions with suppliers.

Figure 1 illustrates the high level architecture while the following sections provide a brief summary on the illustrated components.

--

Figure 1 - High Level Architecture

1.2Stores

1.2.1POS Terminals

The POS Terminal is a proprietary computer running Windows 7 and the ContosoPOS client application. Each terminal will have multiple peripheral devices such as card readers and touchscreens attached to it. Each store will typically have the following number of terminals depending on their size.

Small: Fewer than 10 terminals
Medium: 10-20 terminals
Large:20-30 terminals

1.2.1.1ContosoPOS Application

This is the interactive client application that runs on all POS Terminals. When the terminal is started, it will automatically logon and start the ContosoPOS application. The attendant logs into the application using credentials stored in the POCSConfig database.

1.2.1.2ContosoPOS Service

The POSDevices Windows service runs on each POS terminal and manages all connected devices. It reads from the POSConfig database on the Store server to determine the specific local devices that should be connected and then communicates with the devices reporting their status and any errors.

1.2.1.3Credit Connection

When a credit card transaction is performed on a POS terminal, the ContosoPOS application connects to the CreditConnection service for card validation. This is a secure connection across the Internet using a proprietary protocol.

1.2.2Store Server

Each store has an identically configured Store Server that supports the POS Terminals at that store. The terminals will access this server on startup and during every transaction. If the server is unavailable, the terminals will still be able to complete a transaction with limited information. The purchase data will cache locally and then write to the server when it comes available.

1.2.2.1POSExpress Admin Service

The Admin service supports the POS Express Admin application which installed on any client workstation. This application allows the store administrator to perform such actions as create and manage user accounts, view user activity, and manage terminals.

1.2.2.2POSExpress Client Connection Service

Terminals connect to the client connection service both for configuration and security information and for inventory and sales data. It provides the connection to the Store database and the POSConfig database for these functions.

1.2.2.3OrderProcessing Service

The OrderProcessing Service is responsible for processing orders as they are received and putting them into the Orders queue at the central data center. It typically runs on the Store Server but at large stores, it may be installed on a dedicated server.

1.2.2.4POSConfig Database

SQL Database that holds the user and terminal configuration information. The terminals connect to this database through the POSExpress Client Service to read configuration information and then cache it locally. The Admin Service provides services for updating this database.

1.2.2.5Store Database

Holds inventory and pricing information for the local store. This is replicated on a nightly basis from the central database. All purchases are also written to this database and are then replicated up to the central database.

1.3eComm Web Site

The eComm web site is available to customers at and allows product information and purchases. Users register with the site by providing their personal information and are then able to complete purchases. Anonymous users may browse the site and lookup product information.

1.3.1Web Servers

There are 5 front end web servers running Internet Information Services on Windows Server 2003 and load balanced using NLB. The servers are named WEBECMXX where XX is an incremental number – currently from 01-05.

1.3.1.1Web Site

Each web server has a single site called eComm which is configured for ASP.NET 2.0.50727. The site uses forms based authentication with user credentials stored in the Customer database.

1.3.2Application Servers

Three application servers hold web services that perform the business logic for the commerce site and that connect to the back end databases. The servers are named WEBAPPXX where XX is an incremental number – currently from 01-03.

1.3.2.1Web Services

The front end application on the eComm web site calls the web services for execution of business logic and connection to the backend databases.

Table 1 - Web Services

Name / Function
Login / Verifies user credentials and logs them in
Account Management / Create user and modify information
Product Lookup / Performs product searches and provides product detail and pricing information
Basket Management / Add, remove, modify items in basket
Order submit / Submits an order
Authorize Payment / Authorizes a credit card payment with Credit Connection

1.3.3Central Order Processing

The Central Order Processingservice picks up orders from the queues populated by the OrderProcessing service from the stores and processes them into the Orders database where they can be picked up for fulfillment. A separate queue is maintained for each store.

2Service Model

2.1Classes Overview

Figure 2 gives an overview of the application structure defined in this management pack. Details on each class are provided below.

Figure 2 - Service Model

2.2Class Details

The following tables provide the details of each class to be created in the management pack. This includes the properties of the class, what it represents, and its potential methods for discovery. It is expected that this information is sufficient to construct the actual classes and discoveries in the management pack.

2.2.1Terminals

Name / Represents / Properties / Discovery Method
POSTerminal / Point of Sale Terminal which is a proprietary device running Windows 7 and the POS client application. / Hardware Version
BIOS Version
Serial Number
Store Number
ExecutablePath
Version / The Manufacturer property from the WMI class Win32_ComputerSystem will contain the string “Contoso”.
Computer properties available in the WMI class.
Application properties available in Registry key HKLM\SOFTWARE\Contoso\POS
POSDevice Printer / Receipt printer connected to terminal / Serial Number
Model Number
Device Type
ConnectedTerminal
Firmware Version / Discovered on each terminal using a script against the POSDevice service. Sample shown below.
POSDevice Card Reader / Credit Card scanner connected to terminal
POSDevice Cash Drawer / Cash drawer connected to terminal
2.2.1.1POS Devices

The POS Device service communicates with the different hardware devices that are supported by the POS Terminal. It obtains this information from the Store POSConfig database. The service has a scriptable interface that can be used to collect the inventory of devices. The script will not communicate directly with the devices themselves but will use information that the service reads from the POSConfig database.

Set oPOS = CreateObject("POSExpress.POSDevice ")

Set cDevices = oPOS.Devices

For Each oDevice in cDevices

WScript.Echo oDevice.Model

WScript.Echo oDevice.SerialNumber

WScript.Echo oDevice.Firmware

Next

2.2.2Store Server

Name / Represents / Properties / Discovery Method
Store Server / Connection services on Store Server. / StoreCode / Option 1: Check for the existence of services named ContosoClient and ContosoAdmin services. Both will always be installed together.
Option 2: Check for the existence of the registry key HKLM\SOFTWARE\Contoso\POS.
Store Code can be retrieved from the StoreCode value under the Contoso\POS key.
Order Processing / Order Processing Service on Store Server. Separate class defined to track availability. / Check for the existence of services named ContosoOrderProc.

2.2.3Central Processing

Name / Represents / Properties / Discovery Method
Central Order Processing / Service that selects orders from the store queues and processes them into the Orders database. / QueueLocation
DatabaseServer
DatabaseName / Check for the existence of the registry key HKLM\SOFTWARE\Contoso\POS. Each property name is available in a registry value.
Store Queue / Queue for a single store. / StoreCode
QueuePath / A script against the file system is required to locate the queues.It should search in the folder specified in the QueueLocation property and create an instance for each subfolder. The name of the subfolder will be the StoreCode. The QueuePath property should contain the full path to the folder including the drive letter.

2.2.4Web Site

Name / Represents / Properties / Discovery Method
Contoso Application Server / Application server hosting back end web services. / - / Check for the existence of a web site called ContosoApp.

2.2.5Health Rollups

Name / Represents / Properties / Discovery Method
ContosoPOS / Application and all components / - / Contains the Central and Stores rollup classes.
Central / Central data center. Contains all components in the central data center. / - / Contains all instances of Central Order Processing and Contoso Application Server. Contains targets in Additional Relationships table below.
Stores / All stores. Used to track store availability compared to central. / - / Contains all instances of the Store class
Store / Single store. Contains all components within the store. / StoreCode
StoreLocation
StoreSize / The list of stores and their details are available in a table called Stores in the ContosoPOS database on COSQL03. A script should be used to access this table for discovery of the Store class.
The StoreCode is available on each Store Server and Terminal to determine the containment relationships.

2.2.6Additional Relationships

The following table lists the objects discovered by other management packs that should be included in the Contoso POS Application.

Name / Class / Parent / Discovery Method
Orders / Database / Central / SQL Database named Orders
Inventory / Database / Central / SQL Database named Inventory
Customer / Database / Central / SQL Database named Customer
Orders / Web Site / Central / IIS Web Site named Orders

3Health Model

3.1Health Measurements Worksheet

The following tables define the primary functions for each class defined in the Service Model. This information will be translated into the definitions for monitors and rules in the following section.

3.1.1POS Terminal

Function / Potential problems / Detection / Details
Logon to POS application / Application not running / Monitor validating that process is running. / Process name is pos.exe. A single instance should be running at all times.
Connection to ClientConnection service / TCP monitor from terminal to StoreServer / The service listens on port 5833.
Failed credentials / No test required. Does not indicate a failure. / Should log for tracking purposes. A record is written to the posacct.log file located in c:\pos with the a result code of 03. Log is comma delimited with following fields:
Date, Time, TerminalName, UserName, ResultCode
Allow operator to enter order / Application not running / Monitor validating that process is running. / Process name is pos.exe. A single instance should be running at all times.
Connection to Client Connection service / TCP monitor from terminal to StoreServer / The service listens on port 5833.
Client Connection service returns an error / No means of detection. / This can’t be detected without submitting an actual order. Will rely on the monitoring for the Store Server.
Read status of peripherals / ContosoDevice service not running / Monitoring validating service is running. / Service name is ContosoDevice.
Unable to access POSCOnfig database / Windows Event / The POS Device service will log an event each time it attempts a connection to the POS Config database. The source will be POSDevice. The event numbers will be as follows:
210: Successful connection
211: Server or database not found
212: Connection refused
213: Database not configured properly.
Accept credit card / Card reader inoperable / Dependency on card reader class / -
Print receipt / Printer inoperable / Dependency on printer class / -
Access cash drawer / Cash drawer inoperable / Dependency on cash drawer class / -

3.1.2POSDevices

The information for the device monitors can be obtained from a script against the POSDevice service. Sample code is shown below.

Set oPOS = CreateObject("Contoso.POSDevice")

For Each oDevice in oPOS.Devices

Wscript.Echo oDevice.SerialNumber

'Status = 0 if device is not available, 1 if on and no error

'If device is in error, then status will be error number which is > 1

WScript.Echo oDevice.Status

'MaintRequired = 0 if No and 1 if Yes

WScript.Echo oDevice.MaintRequired

'Lifetime will be number of days remaining in expected life

WScript.Echo oDevice.LifeLeft

Next

Code Sample 1 - POS Device Status

Class / Function / Potential problems / Detection / Details
All / Connected / Not plugged in / powered off / Value returned from the Status property of the Device object in the script / 0 – Device is either powered off or not present
>1 – Device is online with no errors
General operation / Maintenance Required / Value returned from the MaintRequired property of the Device object in the script / 0 – Maintenance not required
1 – Maintenance required
End of life / Value returned from the LifeLeft property of the Device object in the script. / The value will be in days. If the value is 0 or less, then the lifetime rating of the device has been met.
Less than or equal 0 – Lifetime reached
Less than 30 – Lifetime within a month. Warning.
Greater than 30 – Lifetime not reached
POSDevice Printer / Print receipts / Ink level / If the device is a printer, then a InkLevel property will be returned. / The value will be the percent ink level.
Less than 0.2 – Warning
Less than 0.1 - Error
POSDevice Card Reader / Scan credit card / Credit Connection / If the device is a card reader, then a CreditConnect property will be returned. This will return a status for the last connection attempt. / 0 – Success
1 – Failure
An error should only be reported if 3 consecutive failures are received.

3.1.3Store Server

Function / Potential problems / Detection / Details
Allow terminal connection / Client Connection Service not running / Monitor checking running state of service / Service name is ClientConnection.
No connection to Store database / Local ODBC monitor / The name of the database is POSConfig and will be located on the local computer.
Windows Event / Source: ClientConnection
Number: 2036
Description contains reason for the failure.
Event is logged whenever there is a problem connecting to the Store database. There is no corresponding event indicating a successful connection.
Allow admin connection / Admin Service not running / Monitor checking running state of service / Service name is POSAdmin.
No connection to Config database / Local ODBC monitor / The name of the database is POSConfig and will be located on the local computer.
Windows Event / Source: POSAdmin
Number: 2036
Description contains reason for the failure.
Event is logged whenever there is a problem connecting to the Store database. There is no corresponding event indicating a successful connection.
Accept an order / Client Connection service not running / Monitor checking running state of service / Service name is ClientConnection.
Unable to write to database / Windows Event / Source: ClientConnection
Number: 2037
Description contains details of the failure.
Support POSDevice service / No connection to Config database / Local ODBC monitor / The name of the database is POSConfig and will be located on the local computer.

3.1.4Store Order Processing

Function / Potential problems / Detection / Details
Send Order to Central Queue / Can’t connect to central share / Windows Event / Source: OrderProcessing
Number: 2041
Description contains error message returned.
There is no corresponding event indicating a successful connection.
Server not found / Windows Event / Source: OrderProcessing
Number: 2042
There is no corresponding event indicating a successful connection.

3.1.5Central Order Processing

Function / Potential problems / Detection / Details
Process Orders / Service not running / Monitor checking running state of service / Service name is CentralOrder.
No connection to Orders database / Local ODBC monitor / The name of the server and database can be retrieved from properties on the Central Order Processing class.
Windows Event / Source: CentralOrder
Number: 2043
Description contains reason for the failure.
Event is logged whenever there is a problem connecting to the database. There is no corresponding event indicating a successful connection.

3.1.6Store Queue