diff --git a/tutorials/hana-cloud-alerts/.vscode/settings.json b/tutorials/hana-cloud-alerts/.vscode/settings.json new file mode 100644 index 000000000..aea2d6c64 --- /dev/null +++ b/tutorials/hana-cloud-alerts/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "SAP HANA Database Explorer.Use Objects Definition For SQL Generation": true +} \ No newline at end of file diff --git a/tutorials/hana-cloud-alerts/alert-threshold.png b/tutorials/hana-cloud-alerts/alert-threshold.png index f9f487c33..f6a19e97e 100644 Binary files a/tutorials/hana-cloud-alerts/alert-threshold.png and b/tutorials/hana-cloud-alerts/alert-threshold.png differ diff --git a/tutorials/hana-cloud-alerts/ans-basic.png b/tutorials/hana-cloud-alerts/ans-basic.png index 0e6b16935..d70b52f64 100644 Binary files a/tutorials/hana-cloud-alerts/ans-basic.png and b/tutorials/hana-cloud-alerts/ans-basic.png differ diff --git a/tutorials/hana-cloud-alerts/ans-sub-action-type-email-assign.png b/tutorials/hana-cloud-alerts/ans-sub-action-type-email-assign.png index c7b2f577e..03f7f6052 100644 Binary files a/tutorials/hana-cloud-alerts/ans-sub-action-type-email-assign.png and b/tutorials/hana-cloud-alerts/ans-sub-action-type-email-assign.png differ diff --git a/tutorials/hana-cloud-alerts/ans-sub-action-type-email-confirm2.png b/tutorials/hana-cloud-alerts/ans-sub-action-type-email-confirm2.png index e7e46354a..fd0a97827 100644 Binary files a/tutorials/hana-cloud-alerts/ans-sub-action-type-email-confirm2.png and b/tutorials/hana-cloud-alerts/ans-sub-action-type-email-confirm2.png differ diff --git a/tutorials/hana-cloud-alerts/ans-sub-complete.png b/tutorials/hana-cloud-alerts/ans-sub-complete.png index 59733bf12..74300d719 100644 Binary files a/tutorials/hana-cloud-alerts/ans-sub-complete.png and b/tutorials/hana-cloud-alerts/ans-sub-complete.png differ diff --git a/tutorials/hana-cloud-alerts/ans-sub-condition-assign.png b/tutorials/hana-cloud-alerts/ans-sub-condition-assign.png index 6163e55d2..349749e60 100644 Binary files a/tutorials/hana-cloud-alerts/ans-sub-condition-assign.png and b/tutorials/hana-cloud-alerts/ans-sub-condition-assign.png differ diff --git a/tutorials/hana-cloud-alerts/ans-sub-create.png b/tutorials/hana-cloud-alerts/ans-sub-create.png index 9667dd4cd..bd4e1fd20 100644 Binary files a/tutorials/hana-cloud-alerts/ans-sub-create.png and b/tutorials/hana-cloud-alerts/ans-sub-create.png differ diff --git a/tutorials/hana-cloud-alerts/ans-sub.png b/tutorials/hana-cloud-alerts/ans-sub.png index 20368da28..90afe07b3 100644 Binary files a/tutorials/hana-cloud-alerts/ans-sub.png and b/tutorials/hana-cloud-alerts/ans-sub.png differ diff --git a/tutorials/hana-cloud-alerts/ans.png b/tutorials/hana-cloud-alerts/ans.png index fb48f95cf..3f74eec70 100644 Binary files a/tutorials/hana-cloud-alerts/ans.png and b/tutorials/hana-cloud-alerts/ans.png differ diff --git a/tutorials/hana-cloud-alerts/configure-alert-rules-search.png b/tutorials/hana-cloud-alerts/configure-alert-rules-search.png new file mode 100644 index 000000000..2a51ecb71 Binary files /dev/null and b/tutorials/hana-cloud-alerts/configure-alert-rules-search.png differ diff --git a/tutorials/hana-cloud-alerts/configure-alert-rules.png b/tutorials/hana-cloud-alerts/configure-alert-rules.png new file mode 100644 index 000000000..e2260da6d Binary files /dev/null and b/tutorials/hana-cloud-alerts/configure-alert-rules.png differ diff --git a/tutorials/hana-cloud-alerts/create-action-email-details-advanced.png b/tutorials/hana-cloud-alerts/create-action-email-details-advanced.png index e9c1df0c3..9a323cca9 100644 Binary files a/tutorials/hana-cloud-alerts/create-action-email-details-advanced.png and b/tutorials/hana-cloud-alerts/create-action-email-details-advanced.png differ diff --git a/tutorials/hana-cloud-alerts/create-action-email-details.png b/tutorials/hana-cloud-alerts/create-action-email-details.png index b6102dffb..06a8624fb 100644 Binary files a/tutorials/hana-cloud-alerts/create-action-email-details.png and b/tutorials/hana-cloud-alerts/create-action-email-details.png differ diff --git a/tutorials/hana-cloud-alerts/create-action-email.png b/tutorials/hana-cloud-alerts/create-action-email.png index c32889172..7c5608e79 100644 Binary files a/tutorials/hana-cloud-alerts/create-action-email.png and b/tutorials/hana-cloud-alerts/create-action-email.png differ diff --git a/tutorials/hana-cloud-alerts/create-action.png b/tutorials/hana-cloud-alerts/create-action.png index 77f5065bb..17f4ecd40 100644 Binary files a/tutorials/hana-cloud-alerts/create-action.png and b/tutorials/hana-cloud-alerts/create-action.png differ diff --git a/tutorials/hana-cloud-alerts/create-condition-dl.png b/tutorials/hana-cloud-alerts/create-condition-dl.png index b364f26e4..67854d9d4 100644 Binary files a/tutorials/hana-cloud-alerts/create-condition-dl.png and b/tutorials/hana-cloud-alerts/create-condition-dl.png differ diff --git a/tutorials/hana-cloud-alerts/create-condition.png b/tutorials/hana-cloud-alerts/create-condition.png index 3d2be658a..6f1951667 100644 Binary files a/tutorials/hana-cloud-alerts/create-condition.png and b/tutorials/hana-cloud-alerts/create-condition.png differ diff --git a/tutorials/hana-cloud-alerts/data-lake-condition.png b/tutorials/hana-cloud-alerts/data-lake-condition.png index aab67675e..606fbc67a 100644 Binary files a/tutorials/hana-cloud-alerts/data-lake-condition.png and b/tutorials/hana-cloud-alerts/data-lake-condition.png differ diff --git a/tutorials/hana-cloud-alerts/email-action-enabled.png b/tutorials/hana-cloud-alerts/email-action-enabled.png index 48100fb2e..c1300ccac 100644 Binary files a/tutorials/hana-cloud-alerts/email-action-enabled.png and b/tutorials/hana-cloud-alerts/email-action-enabled.png differ diff --git a/tutorials/hana-cloud-alerts/entitlements-alerts.png b/tutorials/hana-cloud-alerts/entitlements-alerts.png new file mode 100644 index 000000000..cb06a7285 Binary files /dev/null and b/tutorials/hana-cloud-alerts/entitlements-alerts.png differ diff --git a/tutorials/hana-cloud-alerts/entitlements.png b/tutorials/hana-cloud-alerts/entitlements.png index 226ebe596..9633b1e3f 100644 Binary files a/tutorials/hana-cloud-alerts/entitlements.png and b/tutorials/hana-cloud-alerts/entitlements.png differ diff --git a/tutorials/hana-cloud-alerts/hana-cloud-alerts.md b/tutorials/hana-cloud-alerts/hana-cloud-alerts.md index 68564ba21..7d83cc4e6 100644 --- a/tutorials/hana-cloud-alerts/hana-cloud-alerts.md +++ b/tutorials/hana-cloud-alerts/hana-cloud-alerts.md @@ -31,58 +31,44 @@ Alternatively, alert details can be pushed to several configured channels such a ### Examine SAP HANA Cloud, HANA Database alert definitions In this step, the SAP HANA cockpit will be used to examine three alert definitions. -1. Open the SAP HANA cockpit from HANA Cloud Central. +1. Open Alerts from HANA Cloud Central. - ![Open SAP HANA Cockpit](open-cockpit.png) + ![Open Alerts](open-alerts.png) -2. In the Monitoring view, open the Alert Definitions app. + >SAP HANA Cloud Central has an alerts app to view triggered alerts. It displays alerts for all instances in a subaccount and additionally displays additional alerts that do not originate from the SAP HANA embedded statistics server (ESS). Events corresponding to ESS alerts have an alert ID. - ![alerts app in the cockpit](alerts-app-cockpit.png) +2. The three alerts that will be triggered in step 2 of this tutorial are `HDBCSTableRecordCount`, `HDBLongRunningStatement`, and `HDBTestAlert`. - >SAP HANA Cloud Central also has an alerts app to view triggered alerts. It displays alerts for all instances in a subaccount and additionally displays additional alerts that do not originate from the SAP HANA embedded statistics server (ESS). Events corresponding to ESS alerts have an alert ID. + You can find these alerts by selecting Configure Alert Rules. -3. The three alerts that will be triggered in step 2 of this tutorial are shown below. + ![Configure Alert Rules](configure-alert-rules.png) - ![alerts definitions in the cockpit](alert-defintions-cockpit.png) + Then select an instance and search for the alerts. - Notice that alerts have a name, ID, description, category, and a suggested user action such as an SAP Note. + ![Configure Alert Rules Search](configure-alert-rules-search.png) - ![restarted-services-alert-details](alert-definitions-cockpit-details.png) + > Notice that alerts have a name, description, and categories. The categories are shown below. | SAP HANA Database Categories | | ----------- | - | Other | - | Availability | - | Memory | - | Disk | - | Configuration | - | Sessions/Transactions | - | Backup | - | Diagnosis Files | - | Security | - -4. Alerts may have severity and threshold levels. - - | Severity | - | ----------- | - | High | - | Medium | - | Low | - | Information | + | Schedule | + | Interval | + | Threshold | + - As an example, long-running statements (ID 39), has its threshold values set to 60 minutes for Medium, 45 minutes for Low, and 30 minutes for Info. These will be set to much lower thresholds of 3, 2 and 1 minutes in step 2. +3. Alerts may have threshold levels. + As an example, long-running statements, has its threshold values set to 60 minutes for Warning, 45 minutes for Notice, and 30 minutes for Information. These will be set to much lower thresholds of 3, 2 and 1 minutes in step 2. ![long running statement updated thresholds](long-running-thresholds.png) -5. Alert checks are scheduled to run at a specified interval and can be enabled or disabled. For example, record count of non-partitioned column-store tables ( ID 17 ) has an interval value of 1 hour, meaning that this check is performed each hour and is currently enabled. +4. Alert checks are scheduled to run at a specified interval and can be enabled or disabled. For example, record count of non-partitioned column-store tables (`HDBCSTableRecordCount`) has an interval value of 1 hour, meaning that this check is performed each hour and is currently enabled. ![enabled and interval](restarted-services-interval.png) - Note that the check for an alert can be manually triggered by pressing the **Check Now** button. -6. Alerts also have a retention period. Once triggered, depending on their type, they will remain for a set duration such as 14 or 42 days. +5. Alerts also have a retention period. Once triggered, depending on their type, they will remain for a set duration such as 14 or 42 days. For additional details, consult [Alerts in SAP HANA Cloud](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-administration-guide/alerts-in-sap-hana-cloud) in the administration guide for SAP HANA cockpit. @@ -99,33 +85,32 @@ The following instructions demonstrate a few examples of triggering alerts in a 2. Execute the following query in the SQL console to trigger a high (indicated by the parameter value of 4) severity test alert. ```SQL - CALL _SYS_STATISTICS.Trigger_Test_Alert(?, 4, 'High test alert'); + CALL _SYS_STATISTICS.Trigger_Test_Alert(?, 4, 'High test alert'); ``` + ![Severity Test Alert](severity_test_alert.png) > The alert will be viewed in the alerts app in step 3. -3. Trigger the long-running statements (ID 39) alert. +3. Trigger the long-running statements alert. - * Go to the **Long-running statements** alert in the **Alert Definitions** app. - - Click **edit** to set the thresholds and interval. - - Set the thresholds to 180, 120, and 60 seconds with an interval time set to 1 minute. + Click **Configure Alert Rules** and select your instance. Then, search for the **Long-running statements** alert (`HDBLongRunningStatement`) in search bar. + + Select **Edit** and set the thresholds to 180, 120, and 60 seconds. The interval time set to 5 minutes by default. - ![Threshold setting](alert-threshold.png) + ![Threshold setting](alert-threshold.png) - * Execute the following SQL + Execute the following SQL. - ```SQL - DO BEGIN - USING SQLSCRIPT_SYNC AS SYNCLIB; - CALL SYNCLIB:SLEEP_SECONDS( 300 ); --runs for 5 minutes - -- Now execute a query - SELECT * FROM M_TABLES; - END; - ``` + ```SQL + DO BEGIN + USING SQLSCRIPT_SYNC AS SYNCLIB; + CALL SYNCLIB:SLEEP_SECONDS( 300 ); --the SQL runs for 5 minutes + -- Now execute a query + SELECT * FROM M_TABLES; + END; + ``` -4. The record count of non-partitioned column-store tables (ID 17) alert can be triggered by executing the following SQL. +4. The record count of non-partitioned column-store tables alert can be triggered by executing the following SQL. ```SQL --The default threshold for 'Record count of non-partitioned column-store tables' is 300 million @@ -153,23 +138,17 @@ The following instructions demonstrate a few examples of triggering alerts in a -- DROP TABLE MYTABLE; ``` - As the default interval time for this check is 1 hour, the check can be manually trigged by pressing the Check Now button in the alert definitions app within the SAP HANA cockpit. - - ![check now](check-now.png) - > Note that two other alerts may also be triggered by the above SQL: table growth of non-partitioned column-store tables and record count of column-store table partitions. ### View SAP HANA database alerts using the alerts app The following instructions will show how to view a triggered SAP HANA database alert in SAP HANA Cloud Central. -1. In SAP HANA Cloud Central, alerts can be seen for all instances in an SAP BTP subaccount. - - Navigate to the alerts tab. +1. In SAP HANA Cloud Central, alerts can be seen for all instances in an SAP BTP subaccount. Navigate to the alerts tab. ![subaccount alerts view](subaccount-alerts-view.png) - A filter can be set for Type, Severity, Instance, Instance Type, and Time Range. + A filter can be set for Type, Severity, Instance, Instance Type, and Time Range. ![alerts view in HCC](alerts-hcc.png) @@ -267,9 +246,10 @@ In this step, the Alert Notification Service will be configured to act on the in >--- - >If the SAP Alert Notification service does not appear, it may be that the entitlement needs to be added to the subaccount. To do so, navigate to the subaccount, select Entitlements, Configure Entitlements, Add Service Plans, and Alert Notification. + >If the SAP Alert Notification service does not appear, it may be that the entitlement needs to be added to the subaccount. To do so, navigate to the subaccount, select **Entitlements**, **Edit**, **Add Service Plans**, and **Alert Notification**. >![Add entitlements](entitlements.png) + >![Add Alert entitlement](entitlements-alerts.png) 2. Provide a name for the Alert Notification service instance and press the **Create** button. diff --git a/tutorials/hana-cloud-alerts/long-running-thresholds.png b/tutorials/hana-cloud-alerts/long-running-thresholds.png index 2fd0bd5ac..c6489e951 100644 Binary files a/tutorials/hana-cloud-alerts/long-running-thresholds.png and b/tutorials/hana-cloud-alerts/long-running-thresholds.png differ diff --git a/tutorials/hana-cloud-alerts/open-alerts.png b/tutorials/hana-cloud-alerts/open-alerts.png new file mode 100644 index 000000000..8f6e548ec Binary files /dev/null and b/tutorials/hana-cloud-alerts/open-alerts.png differ diff --git a/tutorials/hana-cloud-alerts/restarted-services-interval.png b/tutorials/hana-cloud-alerts/restarted-services-interval.png index c122931d4..0cd75f3b4 100644 Binary files a/tutorials/hana-cloud-alerts/restarted-services-interval.png and b/tutorials/hana-cloud-alerts/restarted-services-interval.png differ diff --git a/tutorials/hana-cloud-alerts/severity_test_alert.png b/tutorials/hana-cloud-alerts/severity_test_alert.png new file mode 100644 index 000000000..01e029018 Binary files /dev/null and b/tutorials/hana-cloud-alerts/severity_test_alert.png differ