Skip to Content
Technical Articles

Receive Notifications for Failed SAP Cloud Platform Integration Flows via Any Channel with Alert Notification

Pre-read

This blog post is part of a series of blog posts related to SAP Cloud Platform Alert Notification service.

You can relate to the parent blog post for more detailed information about the service itself.

Very often, we have multiple Integration Flows running in our SAP Cloud Platform Integration environment. Depending on their setup and dependencies, those can fail due to numerous reasons.

We are happy to tell you that SAP Cloud Platform Alert Notification is now integrated with SAP Cloud Platform Integration. You are now able to understand about every Integration Flow failure that happens via the alert management channel you like.

How does it work?

What we have done so far is that we have introduced a package, available on SAP API Business Hub. Once you configure this package into your SAP Cloud Platform Integration tenant, it is going to start reading the Message Processing Logs for you. Then it is going to send failures to SAP Cloud Platform Alert Notification. On the Alert Notification side, you can subscribe to receive that notifications.

The whole process of the configuration takes about 30 minutes. Read on to find out a short tutorial of how to configure your Cloud Platform Integration and Alert Notification.

Configure and receive your first alerts

Prerequisites

  1. You need to have an active subscription for SAP Cloud Platform Integration
  2. You need to have an active subscription for SAP Cloud Platform Alert Notification

Configure SAP Cloud Platform Alert Notification

What we are going to do first is to obtain credentials which Cloud Platform Integration needs.

Also, we are going to create the subscriptions for receiving an alert. In our example, we are going to use email. However, Alert Notificaitton supports multiple channels such as – SAP Solution Manager or Focused Run for Solution Manager, Slack. And virtually any alert management tool which supports WebHook such as ServiceNow, Jira, etc.

 

Obtain Credentials from Alert Notification

Let’s obtain the credentials that we are going to need. Depending on your setup, you can use either BASIC or OAuth authentication. In this example, I am going to use BASIC.

  1. Navigate to Alert Notification UI in your Cloud Cockpit. This you can find in the Subscriptions tab of your CF Space or Neo Subaccount.
  2. Click on the Service Key section and then on the Create Service Key button
  3. In the popup give the credentials a meaningful name and also put the following lines if you want basic authentication in the Configuration Parameter input field.
    {"type":"BASIC"}​

  4. Click on the Save button. Once you do that you will see your credentials for a given landscape. You are going to need those later on when you configure your CPI.

 

Configure Subscription in Alert Notification

We have prepared the configuration for you all you have to do is to import it. With this configuration, you are going to receive a notification for each failed integration flow in your CPI tenant. You can fine-tune this and filter it for particular integration flows. This is explained later in that blog post.

  1. In the JSON below replace <Your Email> with the email you want to receive a notification to.
    {
      "conditions": [
        {
          "name": "CPIIntegrationFlowIsFailed",
          "propertyKey": "eventType",
          "predicate": "EQUALS",
          "propertyValue": "CPIIntegrationFlowExecutionFailure",
          "labels": [],
          "description": ""
        }
      ],
      "actions": [
        {
          "name": "SendMeAnEmail",
          "state": "ENABLED",
          "labels": [],
          "description": "",
          "destination": "<Your Email>",
          "type": "EMAIL"
        }
      ],
      "subscriptions": [
        {
          "name": "FailedIFlow",
          "conditions": [
            "CPIIntegrationFlowIsFailed"
          ],
          "actions": [
            "SendMeAnEmail"
          ],
          "labels": [
            "CPI"
          ],
          "state": "ENABLED",
          "description": ""
        }
      ]
    }
  2. Click on the Import/Export section of the Alert Notification UI and paste the JSON. Then click import.
  3. Note: You need to confirm your email. To do so, go to the Actions tab, click on the SendMeEmail action, click on the action and click the Confirm Action button. Then follow the instructions.
  4. Optional: Once you are done, you can also send a test alert. Go your subscription in the Subscriptions section and click on Send Test Event button.

 

Configure SAP Cloud Platform Integration

Before you start with this section, you should have:

  1. Credentials name for a user that has permissions in the CPI tenant. The default value is CPI_USER.
  2. Service Technical Client Name: Credentials name for the technical client created in SAP Cloud Platform Alert Notification. Supported types are Basic Authentication or OAuth2 Client Credentials flow. The default value is SERVICE_TECHNICAL_CLIENT. It should hold the basic or OAuth credentials that we have configured in the previous section.

 

Once you have done this, follow the steps below:

  1. Go to the Discover section in SAP Cloud Platform integration and search for SAP Cloud Platform Alert Notification
  2. Once you find the integration flow click on it then click on the Copy button.
  3. Once you have copied the integration flow, you should be able to find it in the Design section.
  4. Click on the Integration Flow it should look like this.
  5. Click on the Configure button. On the first screen, set a timer to point how often do you want it to run. The default is 5 minutes.
  6. In the Receiver tab, you should configure your CPI tenant and also point to the user who has permissions in that tenant.
  7. In the More tab, configure the Alert Notification endpoint and authentication from the previous steps.
  8. Click on the Deploy button. Once the integration flow is deployed, and some integration flow in your tenant fails, you will receive an email with similar content.

If you want to filter the notifications for specific integration flows you can simply play a little with the conditions in Alert Notification and filter by cpi:integrationArtificat.Id

What’s Next?

We are working on ever seamless integration between Alert Notification and SAP Cloud Platform Integration, so stay tuned.

A lot of new features will come in Alert notification amongst which are – SMS and ServiceNow integration.

We are looking forward to trying this out and give us feedback.

19 Comments
You must be Logged on to comment or reply to a post.
  • Thanks Kiril. Alert Notification is always there in every flow. It is exciting that we have separate service for it now.

    I tried to replicate the steps, however, I can’t see Alert Notification service under DevOps. Am I missing a step?

    Kind regards,

    Bala

    /
    • Dear Bala,

      thanks for the comment.
      can you contact me at: k.gavrailov at sap dot com I am going to take to the technical team.
      also can you mention which is this landscape?

      Thanks,

      Kiril

    • Dear Sri,

      thank you for your comment.
      It is possible to get the service everywhere. We are providing it based on customer demand for CF, for Neo it is going to be configured for all available Neo landscapes during Q4.

      Next in line is the US3 region (US Chandler) which is planned to be available next Friday (25.10), of course, delays might occur.

      Next in our priority are Sao Paolo and Sydney for both CF and Neo environments. We are working on a detailed roadmap for this.

      Can I ask you which are the regions that are an interest for you in order to provide you with more accurate timelines? You can drop me an email to – k.gavrailov at sap dot com in order to discuss details.

      Thank you,

      Kiril

       

    • Dear Adam,

      thank you for the comment.

      Currently, Alert Notification is available on the Cloud Foundry Trial. However, the CPI scenario should work fine with that, as it is a matter of configuration, so you can simply configure CPI to work agains CF trial. We do not have plans for getting ANS on Neo Trial at this moment.

       

      Thanks,

      Kiril

  • Hello Kiril,

    On our Alert Notification overview page, I couldn’t find the “Service Keys” option.

    I could not find that under the Sub-account Subscriptions too. Can you please help?

    Best Regards,

    Anirban

    /
  • Hi Kiril,

    Could you please let me know if this particular feature is applicable in the CPI trial account.

    I have followed your post & could complete till the part where we create an Alert Instance.
    After that I could not find the Import/Export option in the Alert Notification UI.

    /
    • Dear Shreyashri,

      thank you for your question.

      We are experiencing some challenges with trial landscape. We are working on a fix. I will keep you posted once we have this.

      Thanks,

      Kiril

  • Hi Kiril,

    We are planning to subscribe for SAP CPI over Neo with Enterprise Edition. Do we have this alert service bundled with Enterprise edition ? Can you share any source for this information ?

     

    BR

    shobhit

     

    • Dear Shobbit,

      Please excuse me for the delayed response, I was on vacation.

      We are working into bundling the ANS into Enterprise Edition, it should happen very soon, I will keep you posted once we have it.

      Cheers,

      Kiril