===== SAP Solution Manager PUSH Connector Guide ===== The MID WebService Event Collector enables you to collect alerts sent from SAP Solution Manager utilizing event stream notification capabilities. The interface is running a push and a pull interface to interact directly with Solution Manager ([[products:solmanconnector:welcome|see HomePage]]) ====Before you begin ==== Ensure that you: * Deploy and start the MID Server. [[https://docs.servicenow.com/bundle/london-servicenow-platform/page/product/mid-server/concept/c_MIDServerConfiguration.html|See MID Server configuration]] * Configure and start the MID Web Server. [[https://docs.servicenow.com/bundle/london-it-operations-management/page/product/event-management/task/configure-midwebserver-extension.html#configure-midwebserver-extension|See Configure the MID Web Server extension]] * Configure and start the MID WebService Event Collector. [[https://docs.servicenow.com/bundle/london-it-operations-management/page/product/event-management/task/configure-em-context-extension.html#event-collection-extension|See Configure the MID WebService Event Collector Context.]] Role required: evt_mgmt_admin ==== About this task ==== JSON formatted event messages are sent from SAP Solution Manager. The MID Server transforms the collected alert messages by parsing them using the TransformEvents_SAPSolution Manager script include, located here:** Event Management > Event Listener (Push) > Listener Transform Scripts. ** In the Listener Transform Scripts page, click **TransformEvents_SAPSolman** . The default format of the URL to push alert messages from SAP Solution Manager to the MID Server is [[http://:/api/mid/em/inbound_event?Transform=TransformEvents_SAPSolman]] ====Variables in the default URL==== ^ Variable ^ Description ^ | MID_Server_IP |IP address of the MID Web Server Extension | | MID_Web_Server_Port| Listening port of the MID Web Server Extension| The following procedure describes the collection of JSON formatted event messages using basic authentication. For more information about supported authentication methods, see Configure the MID Web Server extension. ==== SAP Solution Manager Setup Method==== === Create the RFC in SAP Gui and install Transport === Connect to SAP GUI and enter transaction code "SM59", create a new RFC with the corrects parameters **Important**: 8-O 8-O 8-O 8-O You must name the destination **MID_EVENT_COLLECTOR2** 8-O 8-O 8-O 8-O {{:products:solmanconnector:pasted:20180914-101034.png}} ^ SAP parameter ^ Value ^ | Target HOST | Enter the name of the MID Server | | Service No | Enter the Listener Port on the MID Server | | Path Prefix | Enter the URL of the MID Server transform script = /api/mid/em/inbound_event?Transform=TransformEvents_SAPSolman | Then, enter credentials defined in Service Now in the "//logon and Security//" tab of the RFC {{:products:solmanconnector:pasted:20180914-101547.png}} New custom BADI Z_ALRT_REACTION_IMPL has been created and is stored in a workbench transport request PSMK900100 {{:products:solmanconnector:pasted:20180914-104513.png}} After installation, This RFC will be called by the new badi Z_ALRT_REACTION_IMPL to connect to Service Now. ==== Configure SAP MONITORING to forward alerts to the new BADI ==== === System Monitoring configuration === To use the new Badi implementation method, the Third- Party Component must be enabled in the System Monitoring configuration.You need to enable the Third- Party forwarding and this can be done at different levels: * Global * and/or Template * and/or Alert. In our case, we will setup the Global level, //but keep in mind that you can configure the alert reaction ONLY for a specific monitoring template.// To access System Monitoring configuration : run the "solman_setup" and Select **Application Operations > Select System Monitoring** {{:products:solmanconnector:pasted:20180914-104933.png}} === Enabling the Third-Party Component at Global Level === Select Step 2:** Configure Infrastructure > Step 2.3: Default Settings** * Change to Edit mode * Select Third-Party Components tab * Add Entry: “Implementation: BadI Definition for Alert Reactions ZSNOW with scope = All Alerts and Metrics” * Check Third-Party Components * SAVE ! {{:products:solmanconnector:pasted:20180914-105443.png}} Jump to Step 5: Define Scope You can assign the template to all the systems or choose one or more * Select the Managed Object to configure * In this example, we will select only 2 systems ( NWP and HS1 ) which were already configured for System Monitoring ( Monitoring Status = Green ) {{:products:solmanconnector:pasted:20180914-105637.png}} Jump to Step 6: Setup Monitoring Each time that MAI settings is changed, monitoring templates must be reactivated. The Setup Status will change to warning with “Reconfigured required “ , for all already configured systems. Assign (if new) the template and always press Apply and Activate {{:products:solmanconnector:pasted:20180914-110140.png}} When ABAP jobs are finished, check that the “Assignment Status” is green. **Result : all the templates and active Alerts assigned to HS1 and NWP will now use the new forwarding method.** ==== View Alerts In SAP Solution Manager Alert Inbox -> in Service Now ==== Open Solution Manager, all the Alerts located in the Inbox are now forwarded to ServiceNow Instance {{:products:solmanconnector:pasted:20180914-110629.png}} {{:products:solmanconnector:pasted:20180914-110845.png}} ==== Data Mapping from SAP to ServiceNow ==== Field mapping has been built in ServiceNow to simplify maintenance. By default the mapping is made as follow : ^ SAP data ^ ServiceNow Field ^ Description ^ | severity | severity | SAP is using number from 1 to 9 (more critical) | | message_key | message_key | SAP message group ID, messageGUID | | description | description | event description| | source | source | SAP system ID | | managed_object_type | type | type of object, HOST, INSTANCE ... | | managed_object_name | node | name of the object | | node | resource | solution manager node name | | | source instance| the event class has to match the connetor pull instance name. Is a concatenation of {SOURCE}_{CLIENT} | | source | additional_info.sid |SAP system ID | | rating | additional_info.rating | color of the event in SAP | | resource | additional_info.mandant | SAP mandant | | time_of_event| time_of_event | SAP time of the event|