You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Take Action Following a SAP HANA Cloud Database Alert with SAP Automation Pilot
10
-
<!-- description --> Learn how the SAP Automation Pilot can be used together with the SAP Alert Notification Service to react to a SAP HANA database alert.
10
+
<!-- description --> Learn how the SAP Automation Pilot can be used together with the SAP Alert Notification service for SAP BTP to react to a SAP HANA database alert.
11
11
12
12
## Prerequisites
13
-
- Have completed the tutorial [Alerts in SAP HANA Database and Data Lake](hana-cloud-alerts) that covers alerts and the Alert Notification Service.
14
-
- Access to the SAP Business Technology Platform (BTP) that includes the SAP HANA Cloud service, SAP Alert Notification Service, and SAP Automation Pilot. These services are available in the free tier.
13
+
- Have completed the tutorial [Alerts in SAP HANA Database and Data Lake](hana-cloud-alerts) that covers alerts and the Alert Notification service.
14
+
- Access to the SAP Business Technology Platform (BTP) that includes the SAP HANA Cloud, SAP Alert Notification service, and the SAP Automation Pilot. These services are available in the free tier.
15
+
- An SAP HANA Cloud instance deployed to the Cloud Foundry runtime.
15
16
16
17
## You will learn
17
18
- How to setup and become familiar with the SAP Automation Pilot
18
19
- How to create a catalog, an input, and a custom command with multiple executors that will request a storage resize of a SAP HANA database instance
19
-
- How to trigger a SAP Automation Pilot command from the Alert Notification Service
20
+
- How to trigger a SAP Automation Pilot command from the Alert Notification service
20
21
21
22
## Intro
22
-
A SAP HANA Cloud database or a data lake Relational Engine instance have a set of built-in alerts that when triggered, are sent to the SAP Alert Notification Service (ANS). This service, in addition to being able to forward details of the alert to various channels (email, Microsoft Teams, Slack, etc.), can trigger a [SAP Automation Pilot](https://discovery-center.cloud.sap/serviceCatalog/automation-pilot?region=all) command. In this tutorial, a command will be created to attempt to resolve a disk use alert.
23
+
A SAP HANA Cloud database or a data lake Relational Engine instance have a set of built-in alerts that when triggered, are sent to the SAP Alert Notification service (ANS). This service, in addition to being able to forward details of the alert to various channels (email, Microsoft Teams, Slack, etc.), can trigger a [SAP Automation Pilot](https://discovery-center.cloud.sap/serviceCatalog/automation-pilot?region=all) command. In this tutorial, a command will be created to attempt to resolve a disk use alert.
23
24
24
25

25
26
26
27
SAP Automation Pilot includes [provided commands](https://help.sap.com/viewer/de3900c419f5492a8802274c17e07049/Cloud/en-US/5bbe7dba99d24caeafddf7fa62dc63b9.html) for various services in the BTP, a [scheduler](https://help.sap.com/viewer/de3900c419f5492a8802274c17e07049/Cloud/en-US/96863a2380d24ba4bab0145bbd78e411.html), and the ability to create new commands. Examples of the provided commands for a SAP HANA Cloud, SAP HANA database include start, stop, and restart and for Cloud Foundry include `GetCfServiceInstance` and `UpdateCfServiceInstance`. Commands can be created using a BASH script, Python, Node.js or Perl as described at [Execute Script](https://help.sap.com/viewer/de3900c419f5492a8802274c17e07049/Cloud/en-US/d0854dbb80d84946bb57791db94b7e20.html).
27
28
28
-
This tutorial will demonstrate the integration between a triggered database alert, SAP Alert Notification Service, SAP Automation Pilot, and concludes with an example of requesting a storage resize of a SAP HANA database instance based on a disk usage alert.
29
+
This tutorial will demonstrate the integration between a triggered database alert, SAP Alert Notification service, SAP Automation Pilot, and concludes with an example of requesting a storage resize of a SAP HANA database instance based on a disk usage alert.
29
30
30
31
31
32
---
@@ -45,7 +46,7 @@ The following steps demonstrate how to subscribe to the SAP Automation Pilot ser
45
46
46
47
> ---
47
48
48
-
> The SAP Automation Pilot subscription can be located in a different global account or sub account from the SAP Alert Notification service and SAP HANA Cloud database.
49
+
> The SAP Automation Pilot subscription can be located in a different global account or sub account from the SAP Alert Notification service and the SAP HANA Cloud database.
49
50
50
51

51
52
@@ -122,6 +123,7 @@ The following steps demonstrate how to subscribe to the SAP Automation Pilot ser
122
123

123
124
124
125
The output will appear in a pop-up.
126
+
125
127

126
128
127
129
This value is coming from the output of the `welcomeScriptExecutor` whose base command `ExecuteScript` has a parameter named output.
@@ -242,18 +244,18 @@ This step will create a catalog that contains a command and an input. The input
242
244
243
245
244
246
245
-
### Trigger a command from a SAP Alert Notification Service alert
247
+
### Trigger a command from a SAP Alert Notification service alert
246
248
247
249
248
-
This step will configure the SAP Alert Notification Service to invoke the previously created command when a database alert is received.
250
+
This step will configure the SAP Alert Notification service to invoke the previously created command when a database alert is received.
249
251
250
252
1. Create a new service account named `AutoPi`with**Execute** permission and**Basic** Authentication.
251
253
252
254

253
255
254
256
**Save the username and password**as they will be required in sub-step 3.
255
257
256
-
This username and password can be used by another service such as the SAP Alert Notification Service to trigger an execution of a command.
258
+
This username and password can be used by another service such as the SAP Alert Notification service to trigger an execution of a command.
257
259
258
260
2. Under Executions select Build Event Trigger.
259
261
@@ -310,7 +312,7 @@ This step will configure the SAP Alert Notification Service to invoke the previo
310
312

311
313
312
314
313
-
5. Update the conditions and action of an Alert Notification Service subscription, such as the one created in step 5 of the [Alerts inSAPHANA Database and Data Lake](hana-cloud-alerts) tutorial to use the newly created conditions and action.
315
+
5. Update the conditions and action of an Alert Notification service subscription, such as the one created in step 5 of the [Alerts inSAPHANA Database and Data Lake](hana-cloud-alerts) tutorial to use the newly created conditions and action.
314
316
315
317
<!-- border -->
316
318
@@ -327,7 +329,7 @@ This step will configure the SAP Alert Notification Service to invoke the previo
327
329
CALL_SYS_STATISTICS.Trigger_Test_Alert(?, 4, 'High test alert');
328
330
```
329
331
330
-
An alert will appear in the SAPHANA Cockpit and a notification will be sent to the SAP Alert Notification Service. In the SAP Alert Notification Service, the previously edited subscription will trigger the command in the SAP Automation Pilot.
332
+
An alert will appear in the SAPHANA Cockpit and a notification will be sent to the SAP Alert Notification service. In the SAP Alert Notification service, the previously edited subscription will trigger the command in the SAP Automation Pilot.
331
333
332
334
7. Open **Executions**in the SAP Automation Pilot. Notice that this time, the execution succeeded. Select the just run execution.
333
335
@@ -497,7 +499,7 @@ This step will add an executor to calculate a new storage size for the SAP HANA
497
499
498
500
>Note that there may be restrictions on how often an instance can have its storage resized within a period of time. There may be downtime required. For additional details see [Change the Size of a SAPHANA Database Instance Using the CLI](https://help.sap.com/viewer/9ae9104a46f74a6583ce5182e7fb20cb/hanacloud/en-US/5f4823c45d654d1da28682f03f58ccf7.html).
499
501
500
-
10. Now that the test of this command was successful using the `HDBTestAlert`, disable the action in the subscription in the SAP Alert Notification Service*or* change the condition in the subscription to use `HDBDiskUsage`.
502
+
10. Now that the test of this command was successful using the `HDBTestAlert`, disable the action in the subscription in the SAP Alert Notification service*or* change the condition in the subscription to use `HDBDiskUsage`.
501
503
Additional details on this alert can be found at [HDB Disk Usage](https://help.sap.com/viewer/5967a369d4b74f7a9c2b91f5df8e6ab6/Cloud/en-US/807a9f0021354fcc856cbf29cb4f7f18.html). By default, the disk usage alert will create an alert with severity ERROR on 98% disk usage, which then triggers a storage increase of 40GB.
# Execute SQL Commands and Create Custom Notifications with SAP Automation Pilot and SAP Alert Notification Service
10
-
Learn an approach to schedule SQL statements which are run against an SAP HANA Cloud database and send an email based on the results of the execution.
10
+
<!-- description -->Learn an approach to schedule SQL statements which are run against an SAP HANA Cloud database and send an email based on the results of the execution.
11
11
12
12
## Prerequisites
13
13
- Access to the SAP Business Technology Platform (BTP) that includes SAP HANA Cloud, SAP Alert Notification Service, and SAP Automation Pilot. These services are available in the SAP BTP free tier.
@@ -29,14 +29,16 @@ An SAP Automation Pilot command will be created to check if any maintenance item
29
29

30
30
31
31
>If you do not already have the `HOTEL.MAINTENANCE` table in an SAP HANA Cloud database, please create it now by following the first 2 steps in the [Create Database Objects with SAP HANA Database Explorer](hana-dbx-create-schema) tutorial.
32
-
32
+
>
33
33
>---
34
-
34
+
>
35
35
>If you do not have a subscription to the SAP Automation Pilot service, step 1 of the tutorial [Take Action Following a SAP HANA Cloud Database Alert with SAP Automation Pilot](hana-cloud-alerts-autopilot) provides details on how to so.
36
-
36
+
>
37
37
>---
38
-
38
+
>
39
39
>If you do not have an instance of the SAP Alert Notification service, see step 5 of the tutorial [Alerts in SAP HANA Database and Data Lake](hana-cloud-alerts).
# Access SAP HANA Cloud Alerts and Metrics using a REST API
10
-
Learn how to access details of triggered alerts, as well as how to access the list of available database metrics and values of a specified metric using a REST API.
10
+
<!-- description -->Learn how to access details of triggered alerts, a list of available database metrics, and values of a specified metric using a REST API.
11
11
12
12
## Prerequisites
13
-
- Access to an SAP HANA Cloud trial or production instance with a version of 2021 QRC 3 or higher.
13
+
- Access to an SAP HANA Cloud free tier, trial or production instance.
14
14
- A tool such as the REST Client extension for Visual Studio Code enabling the calling of a REST API.
0 commit comments