Manager
Step through the process of creating two custom metrics: One within Computing Center Management System (CCMS) and one in SAP Solution Manager 7.1 Technical Monitoring. These metrics work together to monitor specific backgrounds designated by you. The integration of the two metrics allows for an alert to be sent when a specific background job has failed to finish successfully or has been canceled.
Key Concept
To successfully implement this process and use it to its fullest potential, you must have a complete understanding of your SAP landscape and its daily processes. You also must understand the key components used to complete the activation of the monitor: Computing Center Management System (CCMS) CCMS and Technical Monitoring. CCMS uses monitoring tree elements (MTEs) to collect data on the current status of a key component. CCMS resides on the specific instance that requires monitoring and requires any desired monitoring to be configured on that instance. Technical Monitoring is the latest monitoring solution via Solution Manager 7.1. It allows for the monitoring of key components across an entire SAP landscape. Solution Manager uses a similar tool: a metric. It includes alerts via email as well as a mobile monitoring app, providing a quicker response to issues. All SAP landscapes rely on background jobs to process vital business-related data. Without the successful completion of these background processes, vital data can be lost. This causes an interruption of daily business activity, from processing sales to supplying orders. The activation of a monitor that keeps an eye on these processes allows for an immediate response to the failure of these vital business processes. I’ll show you a step-by-step process for creating two metrics using two systems, Computing Center Management System (CCMS) and SAP Solution Manager 7.1 Technical Monitoring, so you can be alerted when one of your designated background jobs fails to process successfully.
To perform this process, you must first compile a complete list of all the background jobs you need monitored — primarily, the vital background jobs that run on each production instance within your SAP landscape. This process requires a Solution Manager 7.1 system that is fully integrated with your SAP landscape. This article is based on Service Pack 7 and is valid for Service Pack 4 and above.
Step-by-Step Process
Step 1. Within the instance that runs the background jobs, add the background jobs that need to be monitored by using transaction code RZ21. Select Goto > Maintain Background Job Monitoring (Figure 1). At the top of the window, click the create icon to add additional empty rows (Figure 2). Each time you select create, one additional empty row is added. Input the background job name under both columns, Background Job Name and MTE Class. (I usually use the background job name for the MTE class to simplify the process of adding multiple jobs.) Then select the save icon. You may enter as many jobs as necessary. After you save, it can take 10 to 20 minutes to populate all the MTE options within transaction code RZ21. Keep in mind that the more jobs you add to the list, the longer it takes for the jobs to populate within the monitor set tree in transaction code RZ20.

Figure 1
Select Maintain Background Job Monitoring via transaction code RZ21

Figure 2
Add the jobs that require active monitoring
Step 2. Within transaction code RZ20, select Extras > Activate maintenance function (Figure 3). You can’t make changes to the monitoring tree elements (MTEs) without activating maintenance.

Figure 3
Activate the maintenance function
Step 3. Create a custom monitor set (Figure 4). Click the create icon. In the next window, select the New monitor set radio button and click the green check mark icon (Figure 5).

Figure 4
Create a custom monitor set

Figure 5
Create a new monitor set
Step 4. Maintain options on the Create Monitor Set window (Figure 6). Enter Background Job Monitoring as the Monitor set name and select the Only for administrators and me radio button. Click the green check mark icon to save the monitor set and the system takes you back to transaction code RZ20.

Figure 6
Complete the creation of the new monitor set
Step 5. Create a custom monitor for one or multiple background jobs (Figure 7). Select the Background Job Monitoring monitor set and click the create icon.

Figure 7
Create a custom monitor for each background job
Step 6. Create a status monitor for each background job (Figure 8). Move down the MTE tree by selecting the instance > Background > Background Job Monitoring and then select the background job you entered (e.g., SAP_REORG_JOBS). Select the Status check box next to the background job. This means you are monitoring only the status of the jobs and nothing else. To create the custom status monitor, click the generate icon at the top of the screen. (If you wish to monitor for runtime, details, or delay of the job, you can also configure a metric to collect data on those options.)

Figure 8
Generate status monitors for each individual background job
Step 7. Provide a name for the new background job monitor (Figure 9). Select the green check mark icon to save the new monitor. If you have multiple background jobs, repeat steps 5 through 7 for each individual background job.

Figure 9
Provide a name for the new background job monitor
Step 8. Look up the MTE class name for each background job monitor (Figure 10). Double-click the newly created background job monitor. If you create multiple background job monitors, you need to look at the MTE class for each one. This screenprint only shows the single monitor I created for this article highlighted by the red box.

Figure 10
Double-click each background job monitor
Step 9. Select the background job monitor (Figure 11). Click the Properties button. Make note of the MTE class name for each background job monitor (Figure 12). You need them when setting up the metric in Solution Manager.

Figure 11
Select Properties for each background job monitor

Figure 12
Make note of the MTE class name for each background job monitor
Step 10. Log into your Solution Manager instance. Enter the transaction code SOLMAN_SETUP (Figure 13). A new window appears using Internet Explorer. Select the Technical Monitoring option on the left (Figure 14). Then select step 4, Template Maintenance, in the ribbon at the top of the screen. To see all the necessary configuration options, you need to activate both the Edit and Expert Mode options.

Figure 13
Use transaction code SOLMAN_SETUP

Figure 14
Select Technical Monitoring and go to Template Maintenance
Step 11. Create a Custom Template (Figure 15). Under Technical Instance select the correct factory template that applies to the instance you want to monitor (e.g., SAP ABAP 7.00 – 7.03). Click the Create Custom Template button. If you have already created a custom template, skip steps 11 and 12 and create the necessary custom metrics and alerts under that template.

Figure 15
Create a custom template
Step 12. Rename the new custom template (Figure 16). Name the custom template Production SAP ABAP 7.00-7.03. Save the template. Note that any name is appropriate. I usually have a template for each type of instance: Development, Quality, and Production.

Figure 16
Rename the custom template and save
Step 13. Save the custom template to the ZSOLMAN package. (Figure 17). Create a new transport request for all future changes to Solution Manager Technical Monitoring template, metric, and alert changes. Name the new request Technical Monitoring Template Customization and click OK (Figure 18).

Figure 17
Select package ZSOLMAN

Figure 18
Create a new transport request
Step 14. Create a custom metric (Figure 19). Select Create and in the dropdown select Metric. Every job that was entered into CCMS must have its own metric within Solution Manager Technical Monitoring.

Figure 19
Create a custom metric
Step 15. Name the metric Monitor Background Job (name of job) (Figure 20). Select Exceptions as the Category and enter a Custom description for the background job and then click Next (Figure 21). Set the Collection Interval to every five minutes, set the Data Collector to RFC (pull), and then set the Data Provider to CCMS Get Current Values. Input the MTE Class SAP_REORG_JOBS_Status and select the Configure check box next to the MTE class. Click Next.

Figure 20
Maintain custom metric attributes

Figure 21
Maintain data collection attributes
Step 16. Set the threshold type (Figure 22). Under the Threshold tab, set the Threshold Type to Already Rated and click the Next button.

Figure 22
Set Threshold Type to Already Rated
Step 17. Input the technical name of the metric (Figure 23). Under the Others tab, input the desired Technical Name. I usually use Z_(background job name). Select Next.

Figure 23
Input the technical name
Step 18. Save the custom metric (Figure 24). Save the metric under the previously created transport Technical Monitoring Template Customization and click the OK button.

Figure 24
Save the metric under the previously created transport
Step 19. Create a custom alert for all the previously created custom metrics (Figure 25). Select Create and then Alert.

Figure 25
Create a custom alert
Step 20. Maintain custom alert attributes (Figure 26). Enter the alert name Monitor Background Jobs, select Exceptions in the Category field, and in the Severity field select the level that is appropriate for that specific background job (e.g., 7). Enter a description for the custom alert and select Next.

Figure 26
Maintain custom alert attributes
Step 21. Click the Notifications tab (Figure 27). Select Use Template Settings from the Auto-Notifications drop-down field, or add a specific recipient. Use Template Settings refers to step 2.3 Default Settings in the ribbon along the top of the screen, where the default notification list for all the templates is configured. These steps are before the Template Maintenance step of Technical Monitoring (Figure 28; you can also refer to Figure 14). To add a specific set of recipients beyond the default, select Active under Auto-Notifications. Then add the recipients that need to receive the alert.

Figure 27
Maintain the Notifications tab

Figure 28
The Notifications tab under Default Settings
Step 22. Go to the Others tab (Figure 29). Enter a technical name for the custom alert (e.g., Z_Background_Job_Monitoring). Select Next.

Figure 29
Maintain the Others tab
Step 23. Assign the previously created custom background job metrics to the alert (Figure 30). Select Finish.

Figure 30
Select assignment settings
Step 24. Save the custom alert (Figure 31). Save the metric under the previously created transport Technical Monitoring Template Customization and click the OK button.

Figure 31
Save the custom alert under the previously created transport
Step 25. Go to step 5, Define Scope (Figure 32). Select the technical system or systems to which you want to assign the template. Only systems with the custom CCMS MTE can be monitored with this custom metric.

Figure 32
Assign the template to a technical system
Step 26. Go to step 6, Setup Monitoring (Figure 33). Assign the newly created custom template to the instance. Select Assign Templates and select the production template. Then apply and activate the template. Make sure the technical instance is highlighted. Click the Apply and Activate button and within the drop-down field select Selected managed objects only. This step pushes out the assigned template. Keep in mind, this can take five to 30 minutes depending on the number of systems that are activated.

Figure 33
Apply and activate
Step 27. Go to step 7, Reporting (Figure 34). Click the Activate button. The actual activation of the monitors can take up to 30 minutes. If you see that all the metrics have a gray status, they are not yet fully activated, and give it some more time.

Figure 34
Activate the monitors
Step 28. Verify that the custom monitor is active via transaction code SOLMAN_WORKCENTER. Go back to the SAP GUI session and enter transaction code SOLMAN_WORKCENTER. Select the Technical Monitoring tab (Figure 35).

Figure 35
Select System Monitoring within the Technical Monitoring tab
Step 29. Select the system to which the metric is assigned. Select System Monitoring and within the dropdown select Start New Window (Figure 36).

Figure 36
Select the system to which you assigned the custom metric
Step 30. Select the instance to which you assigned the metric (Figure 37).

Figure 37
Verify the status of the background job monitor or monitors
Step 31. Verify that the status of the custom metric or metrics is green (Figure 38). If they are gray, give it another ten to 20 minutes to activate. You must select refresh to get an updated status. If they never turn gray, go over the guide again and make sure all the steps were configured properly.

Figure 38
Verify the status of the background job monitor or monitors
Jereme Swoboda
Jereme Swoboda is an experienced SAP Solution Manager and NetWeaver consultant focusing on proactive technical monitoring of SAP and non-SAP systems, supporting critical business processes. He has tremendous experience pairing real-world scenarios with Solution Manager’s Technical Monitoring capabilities. He is an expert at collecting requirements, creating a monitoring strategy, and then putting that strategy to work for SAP customers. Jereme has had the opportunity to work on a variety of platforms for companies large and small integrating Solution Manager 7.1.
You may contact the author at jereme.swoboda@benimbl.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.