9

[ BTP DevOps ] : Auto remediation with SAP Alert Notification service and Autom...

 1 year ago
source link: https://blogs.sap.com/2023/01/01/btp-devops-auto-remediation-with-sap-alert-notification-service-and-automation-pilot-part2/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
January 1, 2023 2 minute read

[ BTP DevOps ] : Auto remediation with SAP Alert Notification service and Automation Pilot – Part2

Draft post : To be updated

This blog post is part of a series of blog posts related to SAP BTP  Alert Notification service.
In Part 1 Use case was ” how to catch application crashes in SAP BTP by utilizing Alert Notification” . The idea of Part 2 is   to “React Proactively & automatically remediate application instance crashes by using integration of a state-of-the-art DevOps tools, such as SAP Automation Pilot“.

SAP BTP Alert Notification provides out-of-the-box integration with SAP Automation Pilot

Document  Reference  : SAP Automation Pilot Integrate with SAP Alert Notification Service for SAP BTP

As you know , the primary goal of SAP Automation Pilot is to simplify and automate complex manual processes , automate multiple DevOps tasks in order to minimize the cloud operational effort behind any cloud solution in the SAP Business Technology Platform

In this blog post , we would like to illustrate Auto remediation With simple use case

Auto Restart Application instance when Application Crashed/Stopped

Usecase-BlogPost.png

Configurations in SAP Automation Pilot

Step1 ) Create Service Account with Execute privileges.

 Step2 ) Build Trigger URL

  1. Go to the Executions section in the Automation Pilot’s UI and choose the Build Event Trigger
  2. Choose Alert Notifications a trigger type.
  3. Select your desired command by specifying the catalog, command and version fields.
  • For Restarting and re-staging applications: You have below commands
    RestartCfApp, RestageCfApp, StartCfApp, StopCfApp
    TriggerStartCfApp,TriggerStopCfApp​

    4. After all fields are set in the desired way, you can scroll back to the top and copy the automatically generated URL (To any notepad)

Configurations in Alert Notification

Let’s start by creating a SAP Automation Pilot action for the Alert Notification.

  1. Navigate to Alert Notification’s service instance UI in your Cloud Cockpit, tab Actions, click the Create
  2. Choose SAP Automation Pilot action type
6-Alert-SubScription-Actions-Select-Automation-1.png

         3. In the displayed form, enter the name of the target table in Automation Pilot

6-Alert-SubScription-Actions-Automation-1.png

        4. You can now paste URL you copied from the Automation Pilot in additional URL property field, user name and password for authentication

6-Alert-SubScription-Actions-AutomationURL-2.png
 

   Here I would like to share one good news for you thatIt is possible to share an instance of the    Automation URL between different sub-accounts or different spaces

Complex Scenario

BTP Automation  provided commands are generic – they do exactly one thing

(restart your app, start your app, create a jira ticket, etc…). If you have a more complex scenarios which includes multiple steps – you need to create a custom command

For example

If you would like to handle Quota issues on BTP in case if BTP Organisation memory usage is over

75% then you can configure Subscription “Monitor Quota Usage on BTP Alert Notification Service”

Reference : Resource Quota Utilization 

Then BTP Alert Notification service will trigger an event if Org memory usage is over 75%

Create Action of Type Automation Pilot integrate with servicenow (refer Blog Post) or create IT Support Ticket/JIRA using API Integration in Automation Pilot

Here custom command can use other commands along with provided commands

So basically you need to create a new command that used StartCfApp and then CreateJiraIssue

In this way you can build Own Custom commands.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK