SAP Cloud Platform

SAP Cloud Platform, the in-memory Platform-as-a-Service offering from SAP, enables customers and developers to build, extend, and run applications on SAP HANA in the cloud. It provides access to a development environment in the cloud. The platform includes a comprehensive set of services for integration, enterprise mobility, collaboration, and analytics.  

Integration Scenario

Please, select...

Unlike the classic point-to-point interfaces like e.g. IDocs, Web Services or RFCs, when talking about monitoring for cloud services, you always also have to consider the integration component of the scenario. For most cloud services, Advanced Integration Monitoring for the cloud service itself concentrates on monitoring exceptions happening in the cloud service. But to fully monitor a cloud service scenario it is also important to monitor the integration between the cloud service and the on-premise backend system. This integration consists of different point-to-point interfaces of different types.

The following section describes the different integration options for the cloud service. Please choose the integration option you are using and consider also setting up the monitoring for the relevant interface types that are part of the integration scenario for the cloud service.

On this page we describe the monitoring categories that are available for this specific cloud service type. For information on how to set up the monitoring categories for the other technical system and cloud service types, please refer to the setup documentation of the respective interface type.

After setting up the monitoring for the single components and interface types, you can use the scenario configuration to group all relevant messages and exceptions of the cloud integration scenario in one Advanced Integration Monitoring scenario. Information how to create scenarios can be found here

 

For SAP Cloud Platform the following integration scenarios are possible: 

 

The different scenarios contain the following exceptions and point-to-point connections:

  1. Integrating SAP Cloud Platform via SAP Cloud Platform Integration: 1, 3
  2. Integrating SAP Cloud Platform via SAP Cloud Platform Integration for data services: 2, 3
  3. Integrating SAP Cloud Platform via SAP Cloud Connector Integration: 3, 4 
 

Scenario Component Monitored Content Monitoring Category
Cloud Services: SAP Cloud Platform Integration  Integration flows (iFlow) in SAP CPI  SAP Cloud Platform Integration 
Cloud Services: SAP Cloud Platform Integration for data services Exceptions in SAP CPI for data services SAP Cloud Platform Integration for data services
Cloud Services: SAP Cloud Platform Java logs in applications running in SAP Cloud Platform SAP Cloud Platform Java Neo Application
Alerts and exceptions sent from the Alert Notification Service  SAP Cloud Platform Alert Notification 
On-premise: SAP Cloud Connector  Availability and Performance for SAP Cloud Connector  Available monitoring content in Advanced System Monitoring 

Configure Cloud Service

Please, select...

Public cloud service offerings are usually Software-as-a-Service (SaaS) solutions. This means that customers only have access to the service but not to the underlying infrastructure. Hence, the usual way to connect on-premise managed systems to Focused Run does not apply to cloud services.

However, to be able to monitor exceptions and performance in cloud services they need to be connected to Focused Run. This connection is created using the customer and cloud service specific root URL and an end-point definition, which allows Focused Run to receive information from the cloud service.

The first step is to import the SSL certificate into Focused Run. This is valid for all cloud services.

Import Cloud SSL certificate into STRUST

Export Certificate from Browser: 

  1. Open the cloud service URL in your web browser.
  2. Click on the padlock next to the Cloud Service URL (within the address input field).
  3. When using Firefox, click on ‘Show Connection details', ‘More Information', 'View Certificate' and select the ‘Details' tab.
  4. When using Microsoft IExplorer, click on ‘View Certificate' and select the 'Certificate Path' tab.
  5. When using Google Chrome, click on ‘Certificate' and select the 'Certificate Path' tab.
  6. In the displayed certificate hierarchy select the Certification Authority (CA) certificate you plan to trust.
  7. When using Firefox, press ‘Export…'.
  8. When using Microsoft IExplorer or Google Chrome, press ‘View Certificate' and in the displayed pop-up navigate to the ‘Details' tab, to press ‘Copy to File…'.
  9. Select an export format you would like to use and that is supported by STRUST transaction, and export the certificate.

Import Certificate into Focused Run:

  1. Now, log on to Focused Run and go to transaction STRUST.
  2. Switch to Edit.
  3. Double click on entry 'SSL client SSL Client (Anonymous)'.
  4. Import the previously exported CA certificate, by pressing – within section ‘Certificate' – the icon ‘Import Certificate'.
  5. Press ‘Add to Certificate List'.
  6. Finally ‘Save' this modification. 

Additionally you have to perform certain preparations in the cloud service to enable Focused Run to connect to the cloud service.   

 
 
 
 

Preparations in SAP Cloud Platform (Neo)

The following section described the preparation steps that have to be performed if you run SAP Cloud Platform in the Neo environment. If you run SAP Cloud Platform in the Cloud Foundry environment please go to the next section. 

Preparations for Java Application Error Monitoring

Determine Root URL

The API Root URL for SAP Cloud Platform depends on the host on which your account is hosted on. The host depends on the region as described here:

  • SAP Cloud Platform Regions (e.g. If your host is us1.hana.ondemand.com, the Root URL to configure is https://publicapingplog.us1.hana.ondemand.com)

Create User for Java Log Monitoring

To connect to SAP Cloud Platform to collect Java application exceptions you need to provide Focused Run with a user that is allowed to read the default trace.

  • The user needs at least the role 'Support User' in SAP Cloud Platform

Write Java Errors into Default Trace

This last preparation step starts already during the development of the SAP Cloud Platform application. To be able to collect application errors, these errors must exist in the default trace for the SAP Cloud Platform java application. Hence developers must write meaningful errors in this trace. The quality of the monitored exceptions completely depends on the quality of the exceptions written by the developer.

  • Please see this blog for more information on logging for SAP Cloud Platform Java applications 

Preparations for Alert Notifications

Enable SAP Cloud Platform Alert Notifications

Receiving alert notifications is done via the Alert Notification Service which can be enabled for your SAP Cloud Platform account. 

Important: Please be aware that the use of this service is quota based (billable)!

To enable the service please follow the documentation:

Gather Connection Information

To authenticate towards the service you have to create an OAuth client in SAP Cloud Platform. Information how to do this you find here:

Please make sure to note down or copy the client secret, as it cannot be retrieved later on. 

You will need the following connection information to connect SAP Focused Run.

  1. In your Subaccount navigate to Services → Alert Notification → Security
  2. Root URL: Use 'Consume Events' URL under Endpoints (up to .com)
  3. OAuth URL: Use 'OAuth Token' under Endpoints (full URL)
  4. Client ID: Use 'Client ID' of the created OAuth client
  5. Client Secret: Use client secret noted down during client creation

Import the SSL certificate for Cloud Foundry

Even if used in the SAP Cloud Platform (Neo) the alert notification service technically runs in SAP Cloud Platform (Cloud Foundry). To make sure that SAP Solution Manager can receive alert notifications successfully, you have to import the SSL certificate for Cloud Foundry additionally to the SSL certificate for Neo.

  1. In your Subaccount navigate to Services → Alert Notification → Security
  2. Click on the 'Consume Events' URL under Endpoints to open it in a browser
  3. Import the SSL certificate for this website into SAP Solution Manager STRUST as described above

Preparations for E2E Application Tracing

Enable Automatic Trace Upload for SAPUI5 applications

You can enable the automatic upload of the client side trace data, which starts in the background when a trace is ended. Therefore, perform the following steps in your WebIDE or development platform for the SAPUI5 applications in focus.

Note: This operation has to be repeated for each relevant SAPUI5 application.

  1. Load the SAPUI5 application in your WebIDE
  2. Open the file: neo-app.json
  3. Edit the file, adding a "routes" record, of type destination, as shown here:
    {
      "welcomeFile": "index.html",
      "routes": [
        {
           ...
        }
        {
            "path": "/sap/bc/sdf/E2E_Trace_upl",
            "target": {
                "type": "destination",
                "name": "focusedrun",
                "entryPath": "/sap/bc/sdf/E2E_Trace_upl"
            },
            "destination": "SAP FRunUpload"
        }
      ]
    }
  4. Save the file
  5. Also maintain the above mentioned destination, within SAP Cloud Platform and SAP Cloud Connector, specifying the gateway host and port used by your app.
    • Essentially you can copy the path for the odata services just replacing the path value.
  6. Finally, deploy the SAP UI5 application again to the SAP Cloud Platform
 
 
 
 

Preparations in SAP Cloud Platform (Cloud Foundry)

The following section described the preparation steps that have to be performed if you run SAP Cloud Platform in the Cloud Foundry environment.

Preparations for Alert Notifications

Enable SAP Cloud Platform Alert Notifications

Receiving alert notifications is done via the Alert Notification Service which can be enabled for your SAP Cloud Platform account. 

Important: Please be aware that the use of this service is quota based (billable)!

To enable the service please follow the documentation:

Gather Connection Information

To authenticate towards the service you have to create an OAuth client in SAP Cloud Platform. Information how to do this you find here:

Please make sure to note down or copy the client secret, as it cannot be retrieved later on. 

You will need the following connection information to connect SAP Focused Run.

  1. Select your sub-account and find the Alert Notification Service
  2. Navigate to Service Keys → Create Service Key
  3. Root URL: Use 'url' value of the service key (up to .com)
  4. OAuth URL: Use 'oauth_url' of the service key
  5. Client ID: Use 'client_id' of the service key
  6. Client Secret: Use 'client_secret' of the service key

Create Custom Alerts

SAP Cloud Foundry doesn't have any available event that come out of the box. Hence to actually receive alerts from application in SAP Cloud Foundry you have to implement the alert creation in your application.

Find more information here:

 
 

Please, select...

After gathering all necessary information and creating the necessary connection point or users in the cloud service, you can now create the cloud service in Focused Run.

  1. Call transaction FRUN
  2. Select 'Advanced Integration Monitoring' → Cloud Service Management
  3. Click the 'Add' button
  4. Select the Cloud Service Type.
  5. The other input fields in the section 'Definition' depend on the cloud service type, see the details below
  6. In the section 'Identification' you have to enter the following:
    • Customer Network: the isolated network for which this cloud service should be visible
    • Extended Service ID: the extended SID uniquely identifies the cloud service in LMDB and can be between 3 and 8 characters long
 

Input Values for SAP Cloud Platform

  • Environment: Neo or Cloud Foundry
  • Account: Your account ID
  • Root Account URL:
    • Cloud Foundry: "url" value of the service key (up to .com)
    • Neo: Use the "Consume Events" field from the Endpoints (up to .com)

If you want to use ANS and Java Logs in Neo, you can use one the root URLs for Neo. The actual distinction happens in the end-point configuration. 

 

Please, select...

The second step is to create the end-point for the cloud service. The end-point is used to actually connect to the cloud service with user and password. Most cloud services use HTTP end-points.

  1. Click on the extended service ID of the cloud service 
  2. Click the 'Add' button on the 'HTTP ENDPOINTS' tab.
  3. Enter the following information:
    • Section 'Global':
      • Description: A meaningful description
    • Section 'Authentication':
      • The information needed here depends on the cloud service type, please refer to the details below
    • Section 'Proxy':
      • If necessary add proxy information to connect to the cloud service
 

Input Values for SAP Cloud Platform

For SAP Cloud Platform the input values for the end-point depend on the environment and the data you want to collect. For SAP Cloud Platform on Cloud Foundry, only Alert Notification Service events can be collected. For Neo, you can collect ANS events as well as java logs. Since the root URL between ANS and java log differs, you have to create two endpoints if you want to collect both types of data in Neo.

End-point for Cloud Foundry

  • API Type: Alert Notifications
  • API Root URL: "url" value of the service key (up to .com)
  • Authentication Type: OAUTH
  • OAuth URL: "oauth_url" of the service key
  • Client ID: "client_id" of the service key
  • Client Secret: "client_secret" of the service key

End-points for Neo

If you want to collect alert notifications: 

  • API Type: Alert Notifications
  • API Root URL: Use the "Consume Events" field from the Endpoints (up to .com)
  • Authentication Type: OAUTH
  • OAuth URL: OAuth Token from Endpoints
  • Client ID: Client ID of the OAuth client
  • Client Secret: copy the value is the process of creating the OAuth client

If you want to collect java logs:

  • API Type: Application Exceptions and Performance / Java Monitoring
  • API Root URL: Root URL by location
  • Authentication Type: BASICAUTH
  • User: User
  • Password: Password 
 

You need the following end-points for the monitoring categories:

  • SAP Cloud Platform Alert Notifications: 'Alert Notifications' end-point
  • SAP Cloud Platform Java Neo Application: 'Application Exceptions and Performance' end-point 

Advanced Integration Monitoring Setup

Please, select...

To be able to monitor interfaces of an on-premise system you first have to add it to Interface & Cloud Monitoring and select the monitoring categories you want to monitor for the system. 

  1. Open the Advanced Integration Monitoring Application by clicking on the 'Integration & Cloud Monitoring' tile in transaction FRUN
  2. Click on the pinwheel in the upper right corner of the 'Integration & Cloud Monitoring' application
  3. In the configuration panel expand the 'Cloud Services' tray and click on the pen icon in the upper right corner. This will open the 'Configuration for Cloud Services' view.
  4. If your system is not on the list yet, click the 'Add' button to add it. If it is on the list, click on the system ID of the system. 

In the next step, you see all monitoring categories which are available for the system, depending on the system type and the installed software components. Some recommended standard monitoring categories are preselected.

Select the monitoring categories in scope.

Available Monitoring Categories

For SAP Cloud Platform different monitoring categories are available.

  • SAP Cloud Platform Alert Notifications: Collects events sent from the Alert Notification Service. Available for Neo and Cloud Foundry
  • SAP Cloud Platform Java Neo Application (f.k.a. SAP Cloud Platform): Collect exceptions in Java Logs for applications running in SAP Cloud Platform. Only available for Neo 
 

Please, select...

After selecting your monitoring categories you have to maintain filters to define what exactly you want to monitor. Some monitoring categories come with standard filters that usually just select all items of this monitoring category. Focused Run can handle this high amount of monitoring data, so you can stick to this standard filters. Or you can set up filters of your own. You can create more than one filter for a monitoring category.

Available Filter Options

You can collect all exceptions and events for SAP Cloud Platform or you can filter them using the following parameters:

SAP Cloud Platform Alert Notification

  • Category: Alert, Exception
  • Subject: Alert notification short text
  • Severity: Error or Warning
  • Resource Name: Name of the resource causing the event

SAP Cloud Platform Java Neo Application

  • Application: Application Name
  • Logger: This field usually contains the area and the application name to identify the origin of the logged problem. Supports wildcards (e.g. com.sap*)
  • Message: Error text of the exception. Supports wildcards (e.g. Failed*cache)
  • Passport Id: The passport of the exceptions
  • Severity: Comma-separated list of the severity of the exceptions (e.g. ERROR, FATAL)
  • Tenant: The account or sub-account ID for the exception
  • User: The user who triggered the exception 
 

Please, select...

The setup of the filters for the monitoring categories only makes sure that the data is collected, however, alerts are not created automatically. To create alerts and notifications you have to create an alert individually. If you didn't use specific filters in the setup before, but rather opted to collect all data, you have to create filters for the alerts.

  1. Click on the 'New Alert' button in the upper right corner of the alerts table. A new panel will appear below the table for you to enter the alert information
  2. Select the monitoring category
  3. Select the metric name. The available metrics depend on the monitoring category.
  4. Enter a name for the alert
  5. Enter a name for the filter

In the next sub-step, you have to maintain the filter. The filter values are the same as described above. For some metrics, you have to maintain metric parameters. Find details below in the overview of the available metrics.

In the last sub-step you have to activate the alert:

  1. Check the checkbox next to 'Active'
  2. You can adjust the calculation frequency and the severity
  3. Available threshold types depend on the metric selected. If the threshold type allows it you can adjust the threshold value which triggers the alert.
  4. Select the notification variant and the outbound connector variant from the drop-down list.

For single exceptions, the threshold type is always 'Already Rated'. This means depending on the calculation frequency the number of exceptions is checked and an alert is created if this number is bigger than 0. If you want to reduce the number of alert for these metrics, you could increase the value for the calculation frequency to increase the time between checks.

Available Metrics

For SAP Cloud Platform the following metrics are collected:

SAP Cloud Platform Alert Notification

  • SAP Cloud Platform Alert Notifications: Indicates that new exceptions have been received via the Alert Notification Service
  • ANS Alerts (Stateful events): Indicates a new alert has been received via the Alert Notification Service

SAP Cloud Platform Java Neo Application

  • SAP Cloud Platform Java Neo Application exceptions: Indicates that new exceptions were collected during the last data collection interval 
 

Application Tracing

Trace Preparation: Activate Java Statistics in SAP Cloud Platform

To collect also the Java application part of a trace you need to activate the statistics for the Java application that you want to trace in SAP Cloud Platform.

Note: You need the role 'Developer' to start the statistics collection 

  1. Navigate to you Subaccount in SAP Cloud Platform
  2. Go to Applications → Java Applications → Click on the name of the application you want to trace
  3. Go to Monitoring → JMX Console
  4. Find the MBean com.sap.js
  5. Select Statistics → Statistics
  6. Select 'Operations'
  7. Set 'Enable Tracing' = true
  8. Click the 'Execute' symbol 
 

To prepare SAP Focused Run for the use of trace analysis, please follow this documentation. For more information on the E2E Trace functionality in SAP Focused Run please refer to Trace Analysis.

Tracing SAP UI5 Applications

You can start Trace Analysis for any SAPUI5 application, using the Diagnostics functionality, as described in the help portal (<Alt>+<Shift>+<Ctrl>+S key combination).  Note: For mobile devices, refer to Mobile Diagnostics.

  1. In the Diagnostics window that pops-up, open the Technical Information section, and scroll to the bottom of that section to find the E2E Trace sub-section.
  2. Select the desired Trace Level (LOW|MEDIUM|HIGH)
  3. Press the Start button
  4. In the Window of the SAP UI5 application you can now perform the actions you want to trace. 
    Note: After each interaction with the SAP UI5 application you need to wait for a until a pop-up appears, asking if you want to continue tracing or not.
  5. Press cancel, when you want to end tracing.
  6. After having ended the tracing, it is important to reload the SAPUI5 application, to be able to proceed using that application.

Important: Make the end-user starting a trace aware that his provided user-id is recorded in involved systems, as part of the trace data.