Observing Your Apps Running on SAP BTP

Objectives

After completing this lesson, you will be able to:
  • Explain how integrating SAP Alert Notification service and SAP Automation Pilot with SAP Cloud ALM can enable (Dev)Ops teams to seamlessly and efficiently manage cloud applications running on SAP BTP.
  • Master the process of implementing automated health monitoring, alerting, and triggering of recommended actions for your cloud application in SAP BTP.

Main Concepts: SAP Alert Notification Service for SAP BTP and SAP Automation Pilot

When providing and running applications in the cloud, Ops teams can face different issues and challenges within their cloud setup.

The following figure shows some examples of potential issues.

Examples of potential issues the Ops teams face within their cloud setup

Handling such challenges in time is critical for the reliable operation of any cloud application.

Therefore, SAP BTP provides the DevOps teams with the proper tools and services to keep their solutions up and running. To do this, they need to be notified about potential issues in time.

Moreover, to cope with issues outside of working hours, DevOps teams need to automate remediation and recommended actions that can fix the issues.

Business Scenario

Our friends at Rotating Banana developed a cloud application deployed in SAP BTP, Cloud Foundry environment. However, the app randomly becomes unstable and sometimes inaccessible for different users. To make matters more challenging, no alerts have been triggered so far. In this situation, a DevOps team should step in to tackle the problem.

As a member of the Ops team in charge of running this application, you are tasked to solve the issue by using local observability and operations tools in SAP BTP that complement SAP Cloud ALM as a central observability solution for SAP BTP:

  1. SAP Alert Notification service (integrated with SAP Cloud ALM) with its primary focus on alerting
  2. SAP Automation Pilot with its primary focus on ops automation
Combining SAP Alert Notification service with SAP Cloud ALM and SAP Automation Pilot will result in less effort for your DevOps teams

Note

The capabilities of SAP Cloud ALM have been already covered in a previous chapter. For more details see: "Introducing SAP BTP Services for DevOps".

To implement notifications and automated remediation actions, you first need to understand the respective products and how they all work together in a fully integrated scenario. In the following sections, discover more details for both services before resuming the task in Rotating Banana.

SAP Alert Notification Service

SAP Alert Notification service of SAP BTP masters in collecting crucial technical information from various sources and creating real-time events. The events are ingested into the service by SAP BTP applications and services, other products delivered by SAP, or by third-party tools and systems. DevOps teams can set conditions to filter the events out, thereby focusing only on the relevant ones.

The service supports an integration with SAP Cloud ALM, ensuring a seamless DevOps and Operations experience across your solutions. Otherwise, SAP Alert Notification service for SAP BTP can deliver the events of your interest to a channel of your choice or trigger different predefined actions.

Watch the video below to find out more about this service.

SAP Automation Pilot

The goal of SAP Automation Pilot is to simplify and automate complex manual technical processes and flows. This enables DevOps teams to run their solutions on SAP BTP with minimal operational effort.

SAP Automation Pilot is a low-code / no-code automation engine that allows you to:

  • Automate sequences of steps,
  • Execute scripts in a serverless manner,
  • Use catalogs of commands provided by SAP to automate typical Ops tasks in and outside your SAP BTP landscape,
  • Build custom automations.

Automations in SAP Automation Pilot can be triggered in various ways to best fit your operational needs - manually by the DevOps team, through the built-in scheduler, automatically via integration with services and ops platforms like SAP Cloud ALM, or by other applications and systems.

The service is designed to work with low latency, even under a heavy workload, and is capable of triggering hundreds of automations simultaneously.

Watch the video below to find out more about the SAP Automation Pilot.

Availability Checks for Your Cloud App

Business Scenario

Returning to Rotating Banana, remember that you are tasked with implementing an integrated monitoring and automated incident response system for your cloud app deployed in SAP BTP. Mind that the solution architecture has the following details:

  • The cloud application runs on SAP BTP, Cloud Foundry runtime, so there are Cloud Foundry Audit Events collected automatically in the platform itself.
  • In case the cloud application crashes unexpectedly, these events are collected automatically by SAP Alert Notification service for SAP BTP.
  • The integration between SAP Alert Notification service for SAP BTP and SAP Cloud ALM ensures that the app crash event gets automatically ingested into SAP Cloud ALM for central problem detection.
  • SAP Cloud ALM fires an alert to the DevOps team. At the same time, for new issues, SAP Cloud ALM would allow context-sensitive navigation to local observability tools like SAP Cloud Logging service, for problem resolution. Also, it could automatically trigger a command in SAP Automation Pilot.
  • SAP Automation Pilot executes an ops automation flow (triggered by SAP Cloud ALM) that:
    • collects the recent application logs and audit events related to the crash event,
    • stores these logs into a ticket in a Ticket Management System and assigns the ticket to a DevOps team member.

Note

If an app crash event is detected, SAP BTP restarts the application automatically (this mechanism is built into the platform). This means that there is no need for an automated app restart to be executed by SAP Automation Pilot or any other automation tool.

The workflow is illustrated in the following diagram.

Workflow for implementing an integrated monitoring and automated incident response system for your cloud app deployed in SAP BTP

Implementation

To implement the desired solution, complete the following steps (use the links to explore the actions in detail):

  1. Integrate SAP Alert Notification service for SAP BTP with SAP Cloud ALM and activate the switch in SAP Cloud ALM for "SAP BTP: Application Crash".
  2. Integrate SAP Automation Pilot with SAP Cloud ALM.
  3. Configure SAP Alert Notification service for SAP BTP to start collecting the application audit events for Cloud Foundry.
  4. Create an automation flow in SAP Automation Pilot to enable an automated response to the potential app crash. Execute the following steps:
    • Use content from the provided catalogs to get the latest app state and the most recent 20 events kept for your Cloud Foundry application. Consider using the commands "GetCfAppState" and "GetCfAppEvents";
    • Model a custom command to fetch the last 100 lines from the application’s log file;
    • Create a ticket in a Ticket Management System which stores the collected app insights. This will enable quick access to troubleshooting details that may explain the crash. To implement such a command for Jira, see the commands in the "Jira Catalog".
  5. Configure the "app crash" event in SAP Cloud ALM Health Monitoring and enable the following actions:
    • Send an email notification - an email alert is sent to the DevOps team, ensuring immediate awareness of the issue.
    • Trigger the automation flow in SAP Automation Pilot created in the previous step.

Result

By following the steps outlined above, you have implemented a comprehensive, end-to-end solution for automated incident response in your cloud application on SAP BTP. This solution not only detects and alerts you about issues but also automatically triggers recommended actions for troubleshooting and incident management. By structuring and automating the incident response process without the need for human intervention, you ensure faster problem resolution, more efficient project delivery, and higher client satisfaction.

Summary

You have developed a foundational understanding of the monitoring and automated remediation features offered by local observability and operations tools in SAP BTP, such as SAP Alert Notification service for SAP BTP, SAP Automation Pilot and SAP Cloud Logging, alongside central observability tools like SAP Cloud ALM.

Additionally, you have learned how to implement a basic monitoring mechanism and automated incident responses for cloud applications using SAP tools that support your DevOps tasks, all without requiring coding expertise.

Further Reading

If you want to learn more about this example or implement it in your landscape, a detailed step-by-step implementation guide is available on GitHub.

Log in to track your progress & complete quizzes