Configuring NetWeaver Provider in AMS (Version 2)
Published Jul 19 2022 08:30 AM 3,655 Views
Microsoft

SAP NetWeaver Provider in AMS (Version 2) providers end users with a capability to fetch, capture and visualize SAP availability and application data via SAPOScontrol and RFC leveraging pre-delivered standard content provided by SAP. Below are the different approaches to fetch the metrics: 

 

NetWeaver SOAP Metric collection:  

The NetWeaver provider for AMS currently leverages a SOAP interface for fetching a subset of available metrics from the NetWeaver application layer. This includes Instance/Service/Process Availability, Work Process utilization, and Queue/Lock statistics. SAP Control Web service interface is used to collect the primary SOAP metrics for the NetWeaver provider.  We are using SAPControl, which is a SOAP web service interface that exposes these capabilities. The SAPControl web service interface differentiates between protected and unprotected web service methods. The SAP start service provides the following functions for monitoring SAP systems, instances, and processes.  

 

Web method 

ABAP 

JAVA 

Metrics 

GetSystemInstanceList 

X 

X 

Instance Availability, Message Server, Gateway, ICM, ABAP Availability 

GetProcessList 

X 

X 

SAP system processes, its availability and their status 

GetQueueStatistic 

X 

X 

Queue Statistics (DIA/BATCH/UPD) 

ABAPGetWPTable 

X 

  

Work process utilization 

EnqGetStatistic 

X 

X 

Locks 

 

SOAP URL:   

http://<hostname>: 5XX13/?wsdl (or) 

https://<hostname>: 5XX14/?wsdl 

hostname: SAP application server name and FQDN (Fully Qualified Domain Names) - http://sapservername.contoso.com.

5XX13: XX is SAP instance number and 13 port is used for HTTP connection 

5XX14: XX is SAP instance number and 14 port is used for HTTPS connection  

The above URL is used to generate a client proxy in web service-enabled programming environments like Python. The following link provides a detailed description of the pre-requisites for fetching the SOAP metrics from the SAP system.  

  

NetWeaver RFC Metric collection:   

The idea behind this approach is to use SAP’s built-in HTTP module. This module has multiple services, where each one has its own interface and can be enabled or disabled depending on your needs. Each service has a corresponding ABAP Class that processes the HTTP Response based on the HTTP Request. These services enable us to call a remote-enabled function in SAP through HTTP protocol. It thereby allowed us to enable TLS (Transport Layer Security) based approach to enable the secure connection.   

In the next refresh of AMS, we are planning to enable secure communication between the AMS NetWeaver Provider and SAP through industry standard mechanisms.

The following is the list of RFC Metrics collected by NetWeaver Provider:  

 

RFC Metric Name 

TCODE

SMON Metrics 

/SDF/SMON

SWNC Workload 

ST03n

SWNC Memory Metrics 

ST03n

SWNC Transaction Metrics 

ST03n

SWNC User Metrics 

ST03n

SWNC RFC Usage Metrics 

ST03n

Short Dumps 

ST22

Object Lock  

SM12

Failed Updates 

SM13

System Logs Analysis  

SM21

Batch Jobs Statistics  

SM37

Outbound Queues  

SMQ1

Inbound Queues 

SMQ2

Transactional RFC 

SM59

STMS Change Transport System Metrics 

STMS

 

SOAP WSDL Path:  

This service returns the WSDL (Web Services Description Language) of a Remote-Enabled Function.

"sap/bc/soap" is the service that really executes the function based on the HTTP Request’s body.  

The expected return content of this service is XML content with the structures defined on WSDL and values returned from the function executed inside SAP. Following are the SAP prerequisites for this approach:  

Enable SAP ICF: 

  • Login to SAP System. 
  • Navigate to Transaction code SICF 
  • Navigate to Service with Service Path - /default_host/sap/bc/soap/, and activate wsdl11 and RFC service: 

 

harshasri_23-1657328543279.png

Accessing RFC via SOAP WSDL Call: 

This can be achieved using zeep, which is the fastest and most modern Python SOAP client. Zeep inspects the WSDL document and generates the corresponding code to use the services and types in the document. This provides an easy-to-use programmatic interface to a SOAP server. We already used zeep for fetching all the SOAP metrics in AMS (Version 1.0 and 2.0). 

Sample code snippet: 

wsdl_url = "http://sapservername.contoso.com:8110/sap/bc/soap/wsdl?sap-client=001&services=/SAPDS/RFC_READ_TABLE"

session = Session() 

session.auth = HTTPBasicAuth(‘XXXX, ‘XXXX’) 

client = Client(wsdl=wsdl_url, transport=Transport(session=session)) 

rfcname = rfcname.replace('/', '_-') 

method = getattr(client.service, rfcname) 

failed_update_result = method( DATA = data_value, 

                                DELIMITER=';', 

                                FIELDS=rfc_fld, 

                                NO_DATA='', 

                                OPTIONS='', 

                                QUERY_TABLE='VBHDR', 

                                ROWCOUNT = 0, 

                                ROWSKIPS = 0 

                            ) 

 

Explanation: 

Customers need to supply their SAP credentials to connect to this WSDL and the session is authenticated using HTTP basic authentication. 

WSDL URL can be divided into the following parts:  

  • SAP Hostname and FQDN (Fully Qualified Domain Names) - e.g.: http://sapservername.contoso.com
  • Port – port your ICF is running – e.g.: 8110  
  • WSDL path - /sap/bc/soap/wsdl 
  • SAP client Id - 001 
  • RFC service name - e.g.: /SAPDS/RFC_READ_TABLE, /SDF/SMON_GET_SMON_RUNS or ENQUEUE_READ 

The WSDL used above only defines one simple function (/SAPDS/RFC_READ_TABLE) which is made available by zeep via the client.service method: ‘_-SAPDS_-RFC_READ_TABLE’. 

We need to process and pass all the input types from the python code which we need to send as input parameters to the RFC function module.  

 

harshasri_24-1657328543280.png

 

Create NetWeaver Provider: 

Option 1: Providers can be created in Azure portal UI either by entering the provider connection details while creating the AMS in the “Providers” tab 

 

harshasri_19-1657328543276.png

 

 

 Option 2: Click on the Provider link once the AMS is successfully created. 

 

harshasri_0-1658442711395.png

 

 

 

Customers need to enter the following connection information for creating a NetWeaver provider.

SAP prerequisites and connection details are explained in the AMS public documentation link:

 

 

harshasri_21-1657328543278.png

 

 Following resources are created as a part of AMS:  

harshasri_22-1657328543279.png

 

Once you have configured the NetWeaver provider, AMS connects and pulls the information from SAP, which is stored in Azure Log Analytics workspace and visualized through Azure workbooks. In general, it would take 15 minutes for visualizations to appear in the workbook after the NetWeaver provider is created successfully in AMS. Once you have successfully configured NetWeaver provider let us explore how to visualize data using workbooks

 

References: 

Co-Authors
Version history
Last update:
‎Jul 21 2022 03:32 PM
Updated by: