Methods For Handling and Analyzing Monitor Alerts
Methods For Handling and Analyzing Monitor Alerts
Regular Feature
Infrastructure Insights
Imagine that your database backup has surpassed its memory threshold, and as a result the backup has stalled. As a system administrator, how would you be alerted to this problem? Perhaps you would like to be notified by both email and pager. Then, you could react by logging onto your monitoring system and opening the corresponding monitor. From there, you would simply double-click the database alert, jump right into the systems backup log, and start investigating.
analysis of the problem whether via a transaction, URL, or function module. Although many of these alerthandling methods are already part of the standard SAP system and the CCMS monitoring infrastructure, some customizing is often needed, especially where specific personnel information is involved (email addresses, pager numbers, and the like). The CCMS Monitor makes this easy to do. This article provides the information you need to get the most out of the notification and alert analysis features available in SAPs CCMS monitoring infrastructure.1
If this scenario is not the picture of how notification or alert analysis works in your system landscape, then SAPs CCMS monitoring infrastructure can help. The CCMS monitoring infrastructure centrally monitors large, heterogeneous system landscapes, and returns alerts when defined threshold values are exceeded. It also gives you the tools to fine-tune the monitoring system to better respond to alerts and correct errors. Once you have added the appropriate information in the form of a method into your monitor, the system can automatically notify the person you specify by email, pager, or fax. These methods can also be set up to respond to problems by automatically forwarding you to just the right tool for
Instead of assigning methods to each and every MTE, you can assign them to the whole MTE class, thus enabling you to administer numerous monitoring attributes at once.2 The following sections explain the types of methods that enable these functions, as well as the steps necessary to create, assign, and change methods. What Types of Methods Can I Use in the Alert Monitor? SAP provides three types of alerthandling methods: data collection methods, auto-reaction methods, and analysis methods. In many cases, the CCMS monitoring architecture provides
The use of methods has always been possible with CCMS. However, special methods, such as for notification via email, were introduced as of Release 4.6.
For an introduction to MTEs and MTE classes, see How to Set Up Your Own Customized Monitors for mySAP.com Solutions in the April-June 2002 issue of SAP Insider at www.SAPinsider.com.
pre-assigned methods (which you can view via transaction RZ20). Data collection methods gather information about the SAP system and its environment and report it to the monitoring architecture. Since these are already assigned in the monitoring infrastructure, you may never write any data collection methods.3 With that in mind, lets focus on the two more common candidates for customization:
Figure 1
Figure 2
Starting the ITS Administration Tool from Within the Alert Monitor
Analysis methods help you to quickly reach the tools needed to analyze the root causes of a monitoring alert. They determine the functions to be called and link you to the right solution to check the right system. Conveniently, you do not have to leave the alert monitor; you can trigger these analysis methods directly from inside the monitor.
3
Suppose that an alert occurs during ITS monitoring. From the monitor for the ITS configuration on p45747 in Figure 2, you double-click on the MTE Admin ADM Port 1080 to start the ITS Administration tool with ITS-specific information. When the ITS Administration browser is started, an analysis method can call URLs, or jump right into other processes that enable you to evaluate error situations, such as transactions, function modules, and reports. In this article, we will look at how the CCMS Monitor supports the three basic steps for modifying default alerthandling and analysis methods:
1. Check your current monitors and the existing methods of your most commonly used MTEs and MTE classes. 2. If necessary, create a new method, or copy an existing method and customize it to meet your needs. 3. Assign the method to the corresponding MTE to activate it. Checking Your Current Monitors and Methods Most methods come preset in the CCMS infrastructure. As you look through your MTEs, youll likely find that analysis methods are already assigned to MTEs and MTE classes in the SAP standard version, whereas
An exception to this might come up if, for example, you want to monitor an SAP or non-SAP component that is not already monitored by default, such as a custom process.
auto-reaction methods are waiting for you to plug in contact and other information. So first check whether the existing methods fulfill your requirements in your most critical MTEs. To view methods already assigned to an MTE, start transaction RZ20, select the MTE, and choose Properties. Under the Methods tab you will see the methods effective for the MTE. Doubleclick on the method to view the method definition. Once you have identified the MTEs and MTE classes that could use some adjustment, you can either create a new method or fine-tune an existing one. The CCMS Monitor makes it easy to do both. Figure 3 Creating Methods Before you can create a method from scratch, determine if the particular method you need already exists. Methods are located in the CCMS Monitoring: Properties and Methods screen (RZ21) under Method Method Definitions. You can also use the Method menu to determine which methods are assigned to MTE classes or individual MTEs (see Figure 3). If you cant find the method you need, then create a new one by choosing Methods Create new method. This opens the screen for method definition, shown in Figure 4. Figure 5 on page 78 takes you through the process of creating a new method for an email alert. One important note: You would find that the CCMS_OnAlert_Email method, created in Figure 5, is actually already pre-configured, so you would not have to create this method from scratch. However, the steps laid out in this example provide a good idea of the steps you would take for creating a new method that does not currently exist in the system. Reviewing Methods in the CCMS Monitor (RZ21)
Figure 4
Copying and Adapting Existing Methods As you have seen, the CCMS Monitor makes it quite easy to create a method from scratch. However, if you simply need to adapt a preconfigured method to your requirements, this is easily done. To copy an existing method, start from transaction RZ21. In the list of
especially useful if you need different alerts to notify different people. For example, the spool administrator is notified when spool alerts are generated, and the database administrator is contacted in the event of database alerts.
On the Execution tab, specify the type of function to be called. Specify Function module as the type of call and SALO_EMAIL_IN_CASE_OF_ALERT as the call.* Then indicate whether the method is to be executed on the local server, on any server, or on a specific server.
TIP: We advise you to assign methods to MTE classes rather than to single MTEs, because this reduces your configuration workload enormously and the assignment of MTE classes can be transported to other systems.
how to define SAPconnect nodes in the corresponding online documentation.5 Assigning Methods
Under the Control tab, choose how the method is to be executed: in dialog, in the background, in the CEN triggered by CCMS agents, or manually. Choose periodically in dialog process. This option ensures that the email is processed within five minutes. You want to run a function module that takes parameters, so from the Parameters tab, specify the sender and recipient. The sender must be a regular SAP user of client 000. The recipient may be a person or a distribution list. Finally, from the Release tab, specify the type of method. For this example, choose Auto-Reaction Method.
Once the method is complete, simply assign it to the corresponding MTEs or MTE classes. This is done in the alert monitor transaction RZ20. You start the desired monitor, select the MTE, and choose the Properties button. On the method tab, you have two options: 1. To assign the method to the single MTE, choose the Method assignment button (see Figure 7). In the next screen, in the corresponding tab in this case Auto-reaction Method enter CCMS_OnAlert_Email in the field associated with the Method Name radio button. You might assign a method to a single MTE if you want to be notified when the CPU utilization value of a single CPU exceeds the set threshold for example, if one machine is reserved for batch processing and therefore the CPU utilization can be higher there than for the dialog systems. 2. To assign the method to the MTE class in Figure 7, this is CPU_Utilization just select the name of the class. In the next screen select the Method Name radio button in the Auto-reaction group box. Then enter CCMS_OnAlert_Email in the associated field. For example, you might assign a
4
* For a list of auto-reaction method names and functions, log on to the SAP Service Marketplace (http://service.sap.com) and see Predefined Auto-Reaction Methods of the Alert Monitor.
Figure 5
method definitions, select the method and the Copy button. In the new copy, you can edit the parameters and specify the new sender and recipient (see Figure 6). Suppose you want to create a method for pager or fax notification from the email alert model. You would copy CCMS_OnAlert_Email, but this time you enter a fax or pager number in the RECIPIENT field, and in the RECIPIENT-TYPE-ID field,
enter K for pager or F for fax. The type of function remains SALO_EMAIL_IN_CASE_OF_ALERT.4 For the method to work, the corresponding SAPconnect nodes MAIL, FAX, or PAG (for pager) must be defined in client 000. You can find information on
For details about auto-reaction methods and the functions to be called, see Predefined Auto-Reaction Methods of the Alert Monitor in the SAP Service Marketplace (http://service.sap.com).
SAP Web Application Server mySAP Technology Components SAP Web Application Server Basis Services/Communication Interfaces Communication Interfaces SAPconnect.
monitoring your SAP R/3 system. If you dont want to wake up to your pager at 2 am, you can create a property variant for night settings, specifying that no notifications be sent to your pager after hours. In addition, you do not have to maintain methods in every system, but maintain them in a central system and transport them to the monitored systems.
Figure 6
Agent Push Technology As of SAP Web Application Server 6.10, the CCMS agents use push technology.This means that the agents output alerts independently, which improves performance, since the central monitoring system (CEN) does not have to request alerts from the agents. Therefore, SAP recommends that you connect remote systems to the CEN with the help of CCMS agents. See SAP note 429265 for more information.7 Central Auto-Reaction Methods
As of SAP Web Application Server 6.10, you can define central autoreaction methods, which are not started in the system where the alert occurs, but in the CEN. Thus, you can react from a central point automatically to events that occur in the monitored components. See SAP note 429265.
method to an MTE class to monitor the workload of the different CPUs in your system.
To learn more about CCMS and monitoring, SAP users can log onto http://service.sap.com/monitoring or write to [email protected].
Melanie Reinwarth joined SAP in June 2001. She works as technical writer for the CCMS group with a focus on the CCMS Alert Monitoring Infrastructure as well as batch and spool processes.
For more information about property variants and MTE classes, see the article Have You Checked Your Threshold Settings Lately? Adjusting Alert Settings for Optimal SAP System Monitoring in the July-September 2002 issue of SAP Insider, available at www.SAPinsider.com.
For an introduction to CCMS agents, see Bring Enhanced Central Monitoring to Your SAP System with Free, New CCMS Agent Technology in the January-March 2002 issue of SAP Insider, available at www.SAPinsider.com.