Receive Alerts in Your On-Premise System Using Java Web Tomcat 9
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.
You have configured the environment variables as you specify the JAVA HOME variable to the jre folder of the installed SAP JVM and the Path variable to the bin folder of the installed Apache Maven.
You have downloaded and initially configured the Cloud Connector.
For this tutorial, you can use the portable version. For more information, see Cloud Connector.
Steps
Intro
This tutorial describes the configuration with a Java Web Tomcat 9 runtime. However, you can change these settings to match with your runtime environment.
Replace application_URL with the webhook application URL. You can find it in the SAP BTP cockpit when you select the deployed webhook application.
Replace registered_client_ID and registered_client_secret with the client ID and secret created when registering the OAuth client for the webhook application.
These are not the client ID and secret that you created for the platform API.
Replace token_endpoint_URL with the URL shown for the subaccount at Security > OAuth > Branding > Token Endpoint in the SAP BTP cockpit.
Furthermore, use the access token as a bearer token in the Authorization for the REST API call.
Select the application in the SAP BTP cockpit, choose the Update button, and enter the verification token as a JVM argument (-DverificationToken=<verification_token>).
JVM Argument View
Finally, restart the application for your change to take effect.
After you have configured the Cloud Connector as mentioned in Prerequisites, make sure that it connects to the internal system by usingCheck availability of internal host.
Configure the access control.
Go to the Cloud to On-Premise view and add the resource /webhooks.cloud.to.onpremise-1.0.0-SNAPSHOT/backend.
Resource mapping
Step 11Configure cloud destination to the on-premise system
+
Log on to the SAP BTP cockpit.
Select the subaccount.
Go to Connectivity > Destinations.
Create a new destination with the following values:
The virtual host and port are configured in the cloud connector under Cloud To On-Premise > Access Control > Mapping Virtual to Internal System.
Check that the connection to the on-premise destination is successful.
Step 12Test that you receive alerts
+
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).
Share feedback on this tutorial or join the conversation in SAP Community.
Submit detailed feedbackDiscuss in Community
Steps
Step 1 of 12
1. Download the cloud-to-onpremise project2. Go to the folder3. Build the project with Maven to generate a WAR file4. Deploy the WAR file on the cloud5. Register an OAuth client6. Create an OAuth client and obtain access token7. Create POST request to get verification token8. Provide the token as a system property9. Deploy the WAR file locally10. Configure the Cloud Connector11. Configure cloud destination to the on-premise system12. Test that you receive alerts
Joule
AI Notice
Joule is an AI assistant. Generative AI may produce inaccurate, incomplete, or biased information. Always verify important details before acting on them.
Conversations are sent to SAP-hosted large language models for processing. Do not include personal data, credentials, or confidential information in your messages.
Joule's responses are based on the SAP tutorial catalog and may not reflect the latest product changes. For authoritative guidance, consult the linked tutorials and official SAP documentation.