Skip to content

Commit ef4e437

Browse files
authored
Merge pull request #23910 from danielva/master
Updates to the Alerts and ECN tutorials
2 parents 3b670db + b8fc39f commit ef4e437

16 files changed

Lines changed: 392 additions & 14 deletions

tutorials/hana-cloud-alerts-rest-api/hana-cloud-alerts-rest-api.md

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ The following steps are required to create a bearer token that will be used in s
8686

8787
![HANA Cloud instance](HANA-Cloud-service.png)
8888

89-
Create a service binding if one does not exist.
89+
Create a service binding (Other Environments) or service key (Cloud Foundry) if one does not exist.
9090

9191
![Create service key](create-service-key.png)
9292

93-
When creating a service key, a JSON file or parameters section is not needed and can be left empty.
93+
When creating a service binding or service key, a JSON file or parameters section is not needed and can be left empty.
9494

9595
2. View the created service key. The next step will require the `host`, `uaa.url`, `clientid`, and `clientsecret` values.
9696

@@ -352,7 +352,7 @@ The following instructions will show a few examples of how to view metering deta
352352
For additional details on the metering service REST API, see [Metrics in SAP HANA Cloud](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-administration-guide/metrics), [Metering Metrics](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-administration-guide/metering-metrics), and [Metering Service on the Business Accelerator Hub](https://api.sap.com/api/MeteringAPI/overview).
353353

354354
### Access alerts, metrics, and metering for multiple instances
355-
If you wish to access alerts, metrics, and metering for multiple instances with one API call, the service plan admin-api-access can be used as shown below. This service plan is not available for trial instances. For non trial instances, it supports both SAP HANA Cloud, SAP HANA database instances and data lake instances.
355+
If you wish to access alerts, metrics, and metering for multiple instances with one API call or update alert thresholds, the service plan admin-api-access can be used as shown below. This service plan is not available for trial instances. For non trial instances, it supports both SAP HANA Cloud, SAP HANA database instances and data lake instances.
356356

357357
1. Ensure the service plan **admin-api-access** appears under the service **SAP HANA Cloud**. If required, select **Add Service Plans** and enable the entitlement.
358358

@@ -453,6 +453,65 @@ If you wish to access alerts, metrics, and metering for multiple instances with
453453
454454
###
455455
456+
#Update the threshold of a specific alert for a specific instance
457+
PATCH {{gateway_url}}/alerts/v1/serviceInstances/{{instanceID}}/rules
458+
Authorization: Bearer {{bearer}}
459+
460+
{
461+
"data": [
462+
{
463+
"alertRule": "HDBDiskUsage",
464+
"severities": {
465+
"NOTICE": {
466+
"threshold": "91"
467+
},
468+
"WARNING": {
469+
"threshold": "96"
470+
},
471+
"ERROR": {
472+
"threshold": "99"
473+
}
474+
},
475+
"enabled": true
476+
}
477+
]
478+
}
479+
480+
###
481+
482+
#Verify the threshold values have changed for an alert rule for a specific instance
483+
GET {{gateway_url}}/alerts/v1/serviceInstances/{{instanceID}}/rules/HDBDiskUsage
484+
Authorization: Bearer {{bearer}}
485+
486+
###
487+
488+
#Update the threshold of a specific alert for specific instance(s)
489+
PATCH {{gateway_url}}/alerts/v1/rules
490+
Authorization: Bearer {{bearer}}
491+
492+
{
493+
"data": [
494+
{
495+
"serviceInstanceID": "{{instanceID}}",
496+
"alertRule": "HDBDiskUsage",
497+
"severities": {
498+
"NOTICE": {
499+
"threshold": "89"
500+
},
501+
"WARNING": {
502+
"threshold": "94"
503+
},
504+
"ERROR": {
505+
"threshold": "97"
506+
}
507+
},
508+
"enabled": true
509+
}
510+
]
511+
}
512+
513+
###
514+
456515
#Metrics REST API calls -------------------------
457516
458517
#Get the metric HDBMemoryUsed for multiple SAP HANA Cloud instances (values)
@@ -483,7 +542,7 @@ If you wish to access alerts, metrics, and metering for multiple instances with
483542
484543
#Get the metric DefaultNodeStorage for multiple SAP HANA Cloud data lake instances (values)
485544
GET {{gateway_url}}/metering/v1/values?names=DefaultNodeStorage&$filter=resourceType eq hana-cloud-hdl&startTimestamp={{startTSMetering}}&endTimestamp={{endTSMetering}}
486-
Authorization: Bearer {{bearer}}&$orderby=values/value desc
545+
Authorization: Bearer {{bearer}}
487546
488547
###
489548
```

tutorials/hana-cloud-alerts/hana-cloud-alerts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ The following instructions will show how to view a triggered SAP HANA database a
169169

170170
![subaccount alerts view](subaccount-alerts-view.png)
171171

172-
Filter can be set for Type, Severity, Instance, Instance Type, and Time Range.
172+
A filter can be set for Type, Severity, Instance, Instance Type, and Time Range.
173173

174174
![alerts view in HCC](alerts-hcc.png)
175175

176176
Alerts can be filtered by Current or All. Current Alerts have a Start Time value but no End Time value, as the end time is added when the alert is closed. Closed alerts appear in type filter All rather than Current.
177177

178-
Additional details can be found in [Monitoring Alerts in SAP HANA Cloud Central](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/alerts).
178+
Additional details can be found in [Open Alerts in SAP HANA Cloud Central](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/alerts).
179179

180180
2. Details about a SQL statement from a long-running statement alert can be found out with the following query. The statement hash can be found in the alert description.
181181

113 KB
Loading
117 KB
Loading
83.9 KB
Loading
108 KB
Loading
166 KB
Loading
139 KB
Loading
128 KB
Loading
74.2 KB
Loading

0 commit comments

Comments
 (0)