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
Copy file name to clipboardExpand all lines: tutorials/hana-cloud-alerts-rest-api/hana-cloud-alerts-rest-api.md
+63-4Lines changed: 63 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,11 +86,11 @@ The following steps are required to create a bearer token that will be used in s
86
86
87
87

88
88
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.
90
90
91
91

92
92
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.
94
94
95
95
2. View the created service key. The next step will require the `host`, `uaa.url`, `clientid`, and `clientsecret` values.
96
96
@@ -352,7 +352,7 @@ The following instructions will show a few examples of how to view metering deta
352
352
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).
353
353
354
354
### 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.
356
356
357
357
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.
358
358
@@ -453,6 +453,65 @@ If you wish to access alerts, metrics, and metering for multiple instances with
453
453
454
454
###
455
455
456
+
#Update the threshold of a specific alert for a specific instance
#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
+
456
515
#Metrics REST API calls -------------------------
457
516
458
517
#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
483
542
484
543
#Get the metric DefaultNodeStorage for multiple SAP HANA Cloud data lake instances (values)
485
544
GET {{gateway_url}}/metering/v1/values?names=DefaultNodeStorage&$filter=resourceType eq hana-cloud-hdl&startTimestamp={{startTSMetering}}&endTimestamp={{endTSMetering}}
Filter can be set for Type, Severity, Instance, Instance Type, andTime Range.
172
+
A filter can be set for Type, Severity, Instance, Instance Type, andTime Range.
173
173
174
174

175
175
176
176
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.
177
177
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).
179
179
180
180
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.
0 commit comments