How-to guide: OS Command Adapter

Similar documents
How to Use a Customer Specific UIBB in MDG Application 'Create Change Request' Author: Matthias Hubert Company: SAP Created on 5th July 2013

Disclosure Management. Default font on styles in Disclosure Management

How the Standard Integration between SAP EM and SAP TM Can Be Tested with SE37

Moving BCM to different IP range

Disclosure Management US SEC. Preview

BW Workspaces Data Cleansing during Flat File Upload

Passing Parameters via Web Dynpro Application

How to Setup Notifications in Fiori 2.0 Step-by-Step

Managing Substitutions in My Inbox 2.0 app

Create and run apps on HANA Cloud in SAP River RDE

UI Changes for SAP Portfolio and Project Management Depending on NW Release

SAP Directory Content Migration Tool

How To - Extend MDG-M content by new attributes for customer Z-fields in standard tables

SAP Sybase Replication Server Change DATA Capture Configuration. Example Configuration

Alert Consumption for Business Process Monitoring on MAI with SAP Solution Manager 7.1 SP12 Setup and features of notifications and incidents

How To... MDG-M: Replace Enterprise Search with database base search or an alternative search provider. Applicable Releases: From MDG 6.

Disclosure Management Financial Consolidation. Troubleshooting Data Import Interface

How To... MDG-M: Replace Enterprise Search with database base search or an alternative search provider

Implementation steps for Note

Introduction to BW Workspaces and its usage with SAP BusinessObjects BI Tools

CREATION AND CONFIGURATION OF WEB SERVICE FROM RFC AND DEPLOYMENT IN ANOTHER SYSTEM

How to setup My Inbox 2.0 app

Creating Application Definitions in Hana Cloud Platform Mobile Services

ADM100 AS ABAP - Administration

SAP Business Communications Management (BCM) Release Notes 7.0 SP04 Patch 1 ( )

Deploy a SAPUI5 Mobile App to Android Device

Defining Associations in Business Object Builder

How to... MDG-M: Best Practice for Maintenance Status. Applicable Releases: From EHP6 FOR SAP ERP 6.0 and from SAP S/4HANA 1511

How to setup My Inbox 2.0

SAP EM How to Display the Planned Route on the Geo-Map

How-to Connect your HANA Cloud Platform Mobile Service Account to your On-Premise OData Service

BOC320. SAP Crystal Reports - Business Reporting and Report Processing Strategies COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

BC404. ABAP Programming in Eclipse COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

ADM900 SAP System Security Fundamentals

AFA461 SAP Afaria 7.0 System Administration (SP03)

BIT460. SAP Process Integration Message Mapping COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

HA200 SAP HANA Installation & Operations SPS10

Experience SAP HANA Cloud Portal. Use SAP HANA Cloud Portal to Create Engaging Websites in 5 Simple Steps

BC100. Introduction to Programming with ABAP COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

BC430 ABAP Dictionary

Cube Designer User Guide SAP BusinessObjects Financial Consolidation, Cube Designer 10.0

How to Install SMP in a Cluster Environment Using ASE DB Without MBO Runtime SAP Mobile Platform (3.0 SP05)

NET311. Advanced Web Dynpro for ABAP COURSE OUTLINE. Course Version: 10 Course Duration: 4 Day(s)

BC490 ABAP Performance Tuning

MDG100 Master Data Governance

ADM920 SAP Identity Management

TBIT44 PI Mapping and ccbpm

How to Transport KPI Tile Application Step-by-Step Guide in S/4HANA On-Premise

What's New in SAP Landscape Transformation Replication Server 2.0 SP15

How to setup My Inbox 2.0 app

EWM125. Labor Management in SAP EWM COURSE OUTLINE. Course Version: 16 Course Duration: 4 Hours

BC405 Programming ABAP Reports

ADM950. Secure SAP System Management COURSE OUTLINE. Course Version: 10 Course Duration: 2 Day(s)

HA150 SQL Basics for SAP HANA

MII - Crystal Reports Configuration Guide

BC410. Programming User Dialogs with Classical Screens (Dynpros) COURSE OUTLINE. Course Version: 10 Course Duration: 3 Day(s)

PLM210. Master Data Configuration in SAP Project System COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

ADM960. SAP NetWeaver Application Server Security COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day

A Sample PhoneGap Application Using SUP

Dashboards Batch Utility User Guide

EP200. SAP NetWeaver Portal: System Administration COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

ADM960. SAP NetWeaver Application Server Security COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

DEV523 Customizing and Extending PowerDesigner

BC400. ABAP Workbench Foundations COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

ADM950. Secure SAP System Management COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

SAP NetWeaver Cloud Security Tutorial Single Sign-On and Identity Federation with SAP NetWeaver Single Sign-On

BC401. ABAP Objects COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

EDB116. Fast Track to SAP Adaptive Server Enterprise COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

BC400 Introduction to the ABAP Workbench

GRC100. GRC Principles and Harmonization COURSE OUTLINE. Course Version: 10 Course Duration: 2 Day(s)

AC507. Additional Functions of Product Cost Planning COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

EDB785 SAP IQ Administration

BC480 PDF-Based Print Forms

BOC310. SAP Crystal Reports: Fundamentals of Report Design COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Message Alerting for SAP NetWeaver PI Advanced Adapter Engine Extended

DS50. Managing Data Quality with SAP Information Steward COURSE OUTLINE. Course Version: 10 Course Duration: 2 Day(s)

SMP541. SAP Mobile Platform 3.0 Native and Hybrid Application Development COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

BOCE20. SAP Crystal Reports for Enterprise: Advanced Report Design COURSE OUTLINE. Course Version: 15 Course Duration: 3 Day(s)

TBIT40 SAP NetWeaver Process Integration

SAP NetWeaver Identity Management Identity Center. Implementation guide. Version 7.2 Rev 4. - Optimizing dispatcher performance

SAP BusinessObjects Integration Option for Microsoft SharePoint Getting Started Guide

SAP BusinessObjects Dashboard Design Component SDK Installation Guide

Configurable Notifications in Planner

TBW60. BW: Operations and Performance COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

Business Add-Ins (BAdIs) for SD Jam Integration Document Version:

EDB377. Fast Track to SAP Replication Server Administration COURSE OUTLINE. Course Version: 15 Course Duration: 5 Day(s)

NET312. UI Development with Web Dynpro for ABAP COURSE OUTLINE. Course Version: 10 Course Duration: 4 Day(s)

How to... Master Data Governance for Material: Use the Data Import Framework for Material. Applicable Releases: From EhP6

SAP ESP: Keyed Streams in CCL New feature in SP08

EP350. Innovated Content Management and Collaboration COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

SAP BusinessObjects Explorer API Guide SAP BusinessObjects Explorer XI 3.2 SP2

TBW30 SAP BW Modeling & Implementation

SMP521. SAP Mobile Platform - Native and Hybrid Application Development COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

Testing Your New Generated SAP NetWeaver Gateway Service

SAP Discovery System V5 Users and Passwords

How to Configure Fiori Launchpad and Web Dispatcher to Support SAML2 Using SAP Identity Provider Step-by-Step

What's New in SAP Landscape Transformation Replication Server 2.0 SP13

How to Find Suitable Enhancements in SAP Standard Applications

Visual Composer for SAP NetWeaver Composition Environment - Connectors

SAP BusinessObjects Predictive Analysis 1.0 Supported Platforms

Transcription:

How-to guide: OS Command Adapter This guide explains how you can react to MAI Alerts in SAP Solution Manager 7.10 by sending an OS Command Version 2.20 (March 2015) SAP Active Global Support

TABLE OF CONTENT 1 PREREQUISITES... 5 1.1 SAP Solution Manager 7.10... 5 1.2 SAP Notes... 5 1.3 System Monitoring Setup... 5 2 OS COMMAND ADAPTER... 6 2.1 Overall mechanism... 6 2.2 OS Command usage... 7 2.3 BAdI Implementation... 9 2.3.1 Custom BAdI implementation overview... 9 2.3.2 Steps to create the BAdI entities...10 3 OS COMMAND CONFIGURATION...13 3.1 User Interface SP07 and upper...13 3.1.1 OS Command Options...15 3.1.2 OS Command Parameters...17 3.2 User Interface SP06...18 4 MAI CONFIGURATION TO REACT TO ALERTS...19 4.1 Enabling the Third-Party Component at Global Level...19 4.2 Enabling the Third-Party Component at Template Level...20 4.3 Enabling the Third-Party Component at Alert Level...20 5 TROUBLESHOOTING...21 2

E2E Monitoring and Alerting Infrastructure (E2E MAI): E2E MAI is a unique and centralized alerting approach retrieving metrics and simple events from different data providers as CCMS at managed system or Wily Introscope via push or pull mechanism. It includes: An Event Calculation Engine to calculate complex events and end-user alerts out of the retrieved metrics and simple events to avoid alert flooding. A centralized directory for metrics, events and alerts including SAP and customer template knowledge and context information as system landscape, business process or interface information. Then end-user alerts are forwarded to several alert consumers as Alert Inbox, Incident Management and Notification Engine provided by SAP Solution Manager. In order to forward those events to third party tool an Alert Consumer Connector allows implementing standard forwarding protocols. In this context, an adapter is implemented to react to alert by calling an OS Command. 3

4

1 PREREQUISITES 1.1 SAP Solution Manager 7.10 The OS Command Adapter is available standard with Solution Manager 7.10 SP06 and upper releases. 1.2 SAP Notes Some additional corrections need to be applied: For SP06 : https://service.sap.com/sap/support/notes/1752573 https://service.sap.com/sap/support/notes/1754559 https://service.sap.com/sap/support/notes/1754295 https://service.sap.com/sap/support/notes/1779366 For SP07 : https://service.sap.com/sap/support/notes/1779140 https://service.sap.com/sap/support/notes/1820724 https://service.sap.com/sap/support/notes/1779366 For SP08 : https://service.sap.com/sap/support/notes/1959978 https://service.sap.com/sap/support/notes/1820727 For SP10 : https://service.sap.com/sap/support/notes/1965064 For SP11 : https://service.sap.com/sap/support/notes/2009733 For SP12 : https://service.sap.com/sap/support/notes/2134843 For SP13 : https://service.sap.com/sap/support/notes/2134848 1.3 System Monitoring Setup The System Monitoring setup (transaction solman_setup) must have been successfully completed. 5

2 OS COMMAND ADAPTER The OS Command Adapter is fully configurable to execute any External OS Command. 2.1 Overall mechanism 1. The ACC is configured to send 3rd Party Alert Information to the BAdI Implementation (à see configuration details). 2. All the necessary data to be forwarded to the 3 rd party is bundled in a table and passed to the OS Command Adapter. a. Instantiate the OS Command Adapter and pass the AlertInfo Bundle (key-value table) b. Call : OSCommandAdapteràexecute_command() c. This will trigger the steps 3 and 4. 3. Based on the OS Command Configuration, the Executable options and parameters are built (à see configuration details). 4. The configured OS Command is called. 6

2.2 OS Command usage Starting with Solution Manager 7.10 SP06 an SAP-Standard BAdI implementing class is provided: CL_ALERT_REACT_OS_COMMAND (package AI_SOLMAN_ALRT_AL_REACTION_IMP) The provided implementation is bundling the following MAI Alert Information: Name Value Type Length [MAI:ALERT:MO_NAME] Name of the ManagedObject reporting the Alert Char 128 [MAI:ALERT:MO_TYPE] T_SYSTEM, INSTANCE, HOST, DBMS Char 10 [MAI:ALERT:ID] Unique ID that identifies the Alert in MAI Char 32 [MAI:ALERT:DATE] UTC Date (YYYYMMDD) Char 8 [MAI:ALERT:TIME] UTC Time (hhmmss) Char 6 [MAI:ALERT:NAME] Human readable short name of the Alert Char 128 [MAI:ALERT:TECHNICAL_NAME] Technical ID of the Alert Char 60 [MAI:ALERT:DESCRIPTION] Alert Description (or Custom Description) Char 128 [MAI:ALERT:CATEGORY] AVAIL, PERFORM, EXCEPTION, CONFIGURE Char 10 [MAI:ALERT:RATING] 0:Unknown, 1:Normal, 2:Warning, 3:Critical Integer 1 [MAI:ALERT:SEVERITY] 0:Low 5:Medium 9:Critical Integer 1 [MAI:METRIC:NAME_PATH] Metric Name (or Metric Path for grouped metric) Char 128 [MAI:METRIC:VALUE] Metric Value and Unit (or Metric TextValue) Char 128 [MAI:ALERT:MO_ID] Unique ID that identifies the ManagedObject Char 32 [MAI:ALERT:STATUS] O:Open, I:In process, T:Transferred, C:Confirmed Char 4 [MAI:ALERT:REASON_FOR_CLOSURE] 1:Re-configuration, 2:Work mode change, 3:Green alert Integer 1 [MAI:ALERT:PRIORITY] 1:Low, 2:Medium, 3:High, 4:Very high Integer 1 7

Here are the corresponding Value Ranges: [MAI:ALERT:MO_TYPE] : [MAI:ALERT:CATEGORY] : [MAI:ALERT:STATUS] : [MAI:ALERT:RATING] : [MAI:ALERT:REASON_FOR_CL OSURE] : [MAI:ALERT:SEVERITY] : [MAI:ALERT:PRIORITY] : 8

2.3 BAdI Implementation The OS Command Adapter is ready to be used within a BAdI implementation that has to be created. 2.3.1 Custom BAdI implementation overview Any listener of the Alert Inbox must implement the BAdI Definition BADI_ALERT_REACTION from the Enhancement Spot ALERT_REACTION (package AI_SOLMAN_ALRT_AL_REACTION_ENH): BAdI filter is: - ALERT_REACTION_OPTION (Character-Type) The Implementing Class must be CL_ALERT_REACT_OS_COMMAND if you want to use the SAP- Standard MAI Information, or any other implementing class according to your needs. 9

2.3.2 Steps to create the BAdI entities a) With transaction se19, create a new Enhancement Implementation, e.g. Z_ALERT_REACTION_IMPL based on the existing Enhacement Spot ALERT_REACTION: 10

Here is the detailed view of the newly created BAdI Implementation: 11

Then set a dedicated BAdI Filter Value that will be used to differentiate Configurations. After activating the implementing class and the BAdI implementation, it will be registered when the next Alert Notification is triggered by the ACC. 12

3 OS COMMAND CONFIGURATION As of Solution Manager SP07, a dedicated User Interface has been implemented to configure the OS Command. SP06 releases do not have a dedicated User Interface and configuration is done via the Administrative SolutionManager Generic Storage UI with Configuration ID = MAI_OS_CMS_CONFIG. (à see configuration details). For SP07 and upper, make sure in transaction SICF that the service mai_os_command_config is active. 3.1 User Interface SP07 and upper http://<solutionmanagerhost>:<port>/sap/bc/webdynpro/sap/mai_os_command_config 13

If this is the first time you are accessing the Configuration UI, you ll need to create a new Configuration. 1. Expand the Panel Create a Configuration 2. Set Filter Value to <BAdI_FilterValue>_REACT (replace <BAdI_FilterValue> by its value configured when creating the BAdI entities) 3. Press Create 4. Set Filter Value to <BAdI_FilterValue>_REACT_CLOSE (replace <BAdI_FilterValue> by its value configured when creating the BAdI entities) 5. Press Create This will create 2 Configuration Entries for each type of forwarding (AlertChange & AlertClosure): - one describing the OS Command Options, - one describing the OS Command Parameters. It is mandatory to create those 2 configurations to react differently: - Reacting on Alert Change à Configuration <BAdI_FilterValue>_REACT - Reacting on Alert Closure à Configuration <BAdI_FilterValue>_REACT_CLOSE 14

3.1.1 OS Command Options 2 mandatory options are already pre-filled: 00;COMMAND_NAME 01;OP_SYSTEM The values must reflect the SM49 External OS Command Configuration. The 2 mandatory configurations are aimed to eventually react differently between an Alert Change (OS_CMD_REACT) and an Alert Closure (OS_CMD_REACT_CLOSE). It is however possible to deactivate one of them by setting the value <SKIP> to the COMMAND_NAME option. 15

You can specifically skip some ratings by adding the Parameter Name 00;RATINGS_TO_SKIP and set the values of the ratings you want to skip, separated by the separator ;. For example, to skip Grey and Green Alert Ratings, the value has to contain : 0;1 Do not forget to prefix (separated by semi-columns) the option name with the index order to which you want the OS Command to be called : 01;option1 / value1 02;option2 / value2 Option values can remain empty. You can freely add new options. For example: 00;COMMAND_NAME 01;OP_SYSTEM 02;-v 03;-d 04;-DIR SM49_CMD ANYOS true /cfg/mydir/ Will create the following OS Command call: <SM49_CMD_ConfiguredCommand> -v -d true -DIR /cfg/mydir/ 16

3.1.2 OS Command Parameters Additionally to Options, you can configure the OS Command Adapter to send Parameters. By default it is configured with -1;NO_PARAMETER that indicates that no parameter will be build. Please do not remove this entry to avoid the Configuration Entry to be deleted automatically. If you need to add Parameters, replace the -1;NO_PARAMETER with the Parameters at your convenience, for example: 01;alertID [MAI:ALERT:ID] 02;alertDateTime [MAI:ALERT:DATE] at [MAI:ALERT:TIME] 03;description [MAI:ALERT:DESCRIPTION] 04;$$ [MAI:ALERT:RATING] This will create the following Parameters line that will be concatenated to the previously build Options line : alertid <MAI_alertID_value> alertdatetime <MAI_alertDate_value> at <MAI_alertTime_value> description <MAI_alertDescription_value> <MAI_alertRating_value> The Parameter name $$ indicates that there will be parameter name (only a parameter value). The OS Command is limiting the concatenated length of all Parameters to maximum 1024 chars. 17

3.2 User Interface SP06 The OS Command dedicated User interface could not be downported to SP06. Therefore you ll need to use the Administrative Solution Manager Storage UI : http://<solutionmanagerhost>:<port>/sap/bc/webdynpro/sap/wd_sise_admin If this is the first time you are accessing the Configuration UI, you ll need to create a new Configuration to create the entry MAI_OS_CMD_CONFIG~MAI_OS_CMD_CONFIG. Run ABAP Report : PR_ALERT_INIT_OS_CMD_CONFIG. Set Filter Value to the previously assigned BAdI Filter Value concatenated with : 1. _REACT for the REACT_TO_ALERTS OS Command 2. _REACT_CLOSE for the REACT_TO_CLOSED_ALERT OS Command This will create 2 Configuration entries: one relative to the OS Command Options, the other relative to the OS Command Parameters. The configuration is then identical to the previous section. 18

4 MAI CONFIGURATION TO REACT TO ALERTS You need to enable the 3rd Party forwarding and this can be done at different levels: - Global - and/or Template - and/or Alert. 4.1 Enabling the Third-Party Component at Global Level Call transaction solman_setup Select Technical Monitoring > System Monitoring Select Step 2: Configure Infrastructure > Step 2.4: Default Settings Select Third-Party Components tab Add Entry: <OS Command BAdI Description> with scope = All Alerts Check Third-Party Components Save Jump to Step 5: Define Scope Select the Managed Object to configure Jump to Step 6: Setup Monitoring Eventually assign the template and always press Apply and Activate 19

4.2 Enabling the Third-Party Component at Template Level Call transaction solman_setup Select Technical Monitoring > System Monitoring Select Step 4: Template Maintenance Select the Template and switch to Expert Mode Select the Tab Third-Party Components Set Dropdown to active and add Entry: <OS Command BAdI Description> with scope = All Alerts Save Jump to Step 5: Define Scope Select the Managed Object to configure Jump to Step 6: Setup Monitoring Eventually assign the template and always press Apply and Activate 4.3 Enabling the Third-Party Component at Alert Level Call transaction solman_setup Select Technical Monitoring > System Monitoring Select Step 4: Template Maintenance Select the Template and switch to Expert Mode Select the Tab Alerts Select the specific alert you want to configure and go to the Tab Third-Party Components Set Dropdown to active and add Entry: <OS Command BAdI Description> with scope = All Alerts Save Jump to Step 5: Define Scope Select the Managed Object to configure Jump to Step 6: Setup Monitoring Eventually assign the template and always press Apply and Activate 20

5 TROUBLESHOOTING Logs are available using the standard SLG1 transaction: External ID has the following structure: <ConfigurationFilterValue> _ OSCMD_<ManagedObject Name> _ <Alert Category> _ <AlertName> For the Initialization process and if an unexpected error occurs, you can also check the following ExternalID : 21

www.sap.com 2012 SAP AG. All rights reserved. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Sybase and Adaptive Server, ianywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase, Inc. Sybase is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.