Skip to content

Commit ef3d6d3

Browse files
Enhanced the overview as Daniel proposed
1 parent 45293c0 commit ef3d6d3

1 file changed

Lines changed: 28 additions & 41 deletions

File tree

tutorials/cp-monitoring-alerts-onpremise/cp-monitoring-alerts-onpremise.md

Lines changed: 28 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
2-
title: Receive Alerts in Your On-Premise System Using Java Web Tomcat 8
3-
description: Configure a connection with an on-premise system to receive alert notifications locally.
2+
parser: v2
43
auto_validation: true
54
primary_tag: software-product>sap-business-technology-platform
65
tags: [ tutorial>intermediate, tutorial>license, software-product>sap-business-technology-platform, programming-tool>java ]
@@ -9,6 +8,9 @@ author_profile: https://github.com/nikolasimeonov77
98
time: 50
109
---
1110

11+
# Receive Alerts in Your On-Premise System Using Java Web Tomcat 8
12+
<!-- description --> Configure a connection with an on-premise system to receive alert notifications locally. For example, extend your on-premise application in the corporate network to show alerts for critical or warning metrics of an SAP BTP application in the Neo environment or to take self-healing actions. Furthermore, use the Alerting Channels REST API to configure the channel for receiving such alert notifications.
13+
1214
<!-- loio152a1abd1a1f4618baaa6e43f55e37df -->
1315

1416
## Prerequisites
@@ -22,72 +24,64 @@ time: 50
2224
- You have downloaded and initially configured the Cloud Connector.
2325
For this tutorial, you can use the portable version. For more information, see [Cloud Connector](https://help.sap.com/viewer/cca91383641e40ffbe03bdc78f00f681/Cloud/en-US/e6c7616abb5710148cfcf3e75d96d596.html).
2426

25-
## Details
26-
### You will learn
27+
## You will learn
2728
- How to connect with an on-premise system so that your alerts will be processed locally
2829

30+
## Intro
2931
This tutorial describes the configuration with a Java Web Tomcat 8 runtime. However, you can change these settings to match with your runtime environment.
3032

3133
To learn more about the whole scenario, read [Receiving Alerts in the Corporate On-Premise System](https://blogs.sap.com/2021/02/05/receiving-alerts-in-the-corporate-on-premise-system-2/).
3234

3335
---
3436

35-
[ACCORDION-BEGIN [Step 1: ](Download the cloud-to-onpremise project)]
37+
### Download the cloud-to-onpremise project
38+
3639

3740
Download the project as a ZIP file from [https://github.com/SAP/cloud-sample-webhooks](https://github.com/SAP/cloud-sample-webhooks) and extract the files into a local folder.
3841

39-
[DONE]
4042

41-
[ACCORDION-END]
43+
### Go to the folder
4244

43-
[ACCORDION-BEGIN [Step 2: ](Go to the folder)]
4445

4546
Open the Command prompt and go to the project\'s local folder **`cloud-sample-webhooks-main`**.
4647

47-
[DONE]
4848

49-
[ACCORDION-END]
49+
### Build the project with Maven to generate a WAR file
5050

51-
[ACCORDION-BEGIN [Step 3: ](Build the project with Maven to generate a WAR file)]
5251

5352
Run the command `mvn clean install` to compile, test, and package the `cloud-sample-webhooks-main` project.
5453

5554
You can now find your packaged `webhooks.cloud.to.onpremise-1.0.0-SNAPSHOT.war` file in the **target** folder.
5655

5756
In the text area below, enter the command you used to compile, test, and package the `cloud-sample-webhooks-main` project.
5857

59-
[VALIDATE_1]
6058

61-
[ACCORDION-END]
6259

63-
[ACCORDION-BEGIN [Step 4: ](Deploy the WAR file on the cloud)]
60+
### Deploy the WAR file on the cloud
61+
6462

6563
Deploy the file on Java Web Tomcat 8 runtime and then start the application. For more information, see [Deploying Applications](https://help.sap.com/viewer/ea72206b834e4ace9cd834feed6c0e09/Cloud/en-US/e5dfbc6cbb5710149279f67fb43d4e5d.html#loioe5dfbc6cbb5710149279f67fb43d4e5d__deploying).
6664

67-
[DONE]
6865

69-
[ACCORDION-END]
66+
### Register an OAuth client
7067

71-
[ACCORDION-BEGIN [Step 5: ](Register an OAuth client)]
7268

7369
The webhooks application is protected with OAuth. For more information, see [Register an OAuth Client](https://help.sap.com/viewer/ea72206b834e4ace9cd834feed6c0e09/Cloud/en-US/7e658b3e4cea4a79b035d0f1d2798c1f.html#loio61d8095aa39547c7b30d9aeda771497f).
7470

7571
> You also need to select the **Client Credentials** authorization grant.
7672
77-
[DONE]
7873

79-
[ACCORDION-END]
74+
### Create an OAuth client and obtain access token
8075

81-
[ACCORDION-BEGIN [Step 6: ](Create an OAuth client and obtain access token)]
8276

8377
You need the access token to call the Alerting Channels REST API. For more information, see [Using Platform APIs](https://help.sap.com/viewer/ea72206b834e4ace9cd834feed6c0e09/Cloud/en-US/392af9d162694d6595499f1549978aa6.html).
8478

8579
> Select **Monitoring Service** API and make sure that the **Manage Alerting Channels** scope is included.
8680
87-
[VALIDATE_2]
88-
[ACCORDION-END]
8981

90-
[ACCORDION-BEGIN [Step 7: ](Create POST request to get verification token)]
82+
83+
### Create POST request to get verification token
84+
9185

9286
Create a POST request with one of the following URIs:
9387

@@ -122,11 +116,9 @@ Furthermore, use the access token as a bearer token in the Authorization for the
122116

123117
For more information, see [Alerting Channels REST API](https://api.sap.com/api/HCP_Alerting).
124118

125-
[DONE]
126119

127-
[ACCORDION-END]
120+
### Provide the token as a system property
128121

129-
[ACCORDION-BEGIN [Step 8: ](Provide the token as a system property)]
130122

131123
Select the application in the SAP BTP cockpit, choose the **Update** button, and enter the verification token as a JVM argument (`-DverificationToken=<verification_token>`).
132124

@@ -136,17 +128,16 @@ Finally, restart the application for your change to take effect.
136128

137129
In the text area below, enter the text you inserted in the **JVM Arguments** field.
138130

139-
[VALIDATE_3]
140-
[ACCORDION-END]
141131

142-
[ACCORDION-BEGIN [Step 9: ](Deploy the WAR file locally)]
132+
133+
### Deploy the WAR file locally
134+
143135

144136
Use Java Web Tomcat 8 server and deploy the WAR file locally. See [Deploy Locally with the Console Client](https://help.sap.com/viewer/ea72206b834e4ace9cd834feed6c0e09/Cloud/en-US/937c833b72bb101490cf767db0e91070.html).
145137

146-
[DONE]
147-
[ACCORDION-END]
148138

149-
[ACCORDION-BEGIN [Step 10: ](Configure the Cloud Connector)]
139+
### Configure the Cloud Connector
140+
150141

151142
1. Start the cloud connector.
152143

@@ -160,10 +151,10 @@ Use Java Web Tomcat 8 server and deploy the WAR file locally. See [Deploy Locall
160151

161152
In the text area below, enter the text you inserted in the **URL Path** field.
162153

163-
[VALIDATE_4]
164-
[ACCORDION-END]
165154

166-
[ACCORDION-BEGIN [Step 11: ](Configure cloud destination to the on-premise system)]
155+
156+
### Configure cloud destination to the on-premise system
157+
167158

168159
1. Log on to the SAP BTP cockpit.
169160

@@ -189,14 +180,10 @@ In the text area below, enter the text you inserted in the **URL Path** field.
189180

190181
In the text area below, enter the name you used for the destination.
191182

192-
[VALIDATE_5]
193183

194-
[ACCORDION-END]
195184

196-
[ACCORDION-BEGIN [Step 12: ](Test that you receive alerts)]
185+
### Test that you receive alerts
197186

198-
Trigger an alert by setting low threshold values (for example, Warning Threshold = 0.00001 and Critical Threshold = 0.0001 for the availability check of the application). You should receive the alert as an `alert_<timestamp>.json` file locally in the server's workspace folder (usually in the **`…/webapps/webhooks.cloud.to.onpremise-1.0.0-SNAPSHOT`** folder).
199187

200-
[DONE]
188+
Trigger an alert by setting low threshold values (for example, Warning Threshold = 0.00001 and Critical Threshold = 0.0001 for the availability check of the application). You should receive the alert as an `alert_<timestamp>.json` file locally in the server's workspace folder (usually in the **`…/webapps/webhooks.cloud.to.onpremise-1.0.0-SNAPSHOT`** folder).
201189

202-
[ACCORDION-END]

0 commit comments

Comments
 (0)