Skip to Content
Technical Articles

Microsoft Teams Integration and Neo Java App Status Changed Alerts from SAP Cloud Platform Alert Notification

Pre-read

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

We are going to introduce a couple of new features of the service that we delivered during the previous weeks.

Microsoft Teams Integration

You are now able to post alerts to MS Teams with SAP Cloud Platform Alert Notification. To do so, you need to execute couple of configurations in your MS Teams and ANS instances.

In MS Teams

  1. Open your MS Teams and locate the Incoming WebHook application
  2. Click Add to a team button and select the team you want the webhook in.
  3. Then choose Set up a connector.
  4. Once you do so, enter a name for the Incoming Webhook, and optionally upload an image for it. Then Click on Create
  5. Copy the provided Webhook URL and save it somewhere

In Alert Notification

  1. Create a new Action
  2. From the Actions, list select Microsoft Teams
  3. Name the action and paste the WebHook URL
  4. Click Create and you are done.
  5. In your MS Teams channel, you are going to receive a confirmation message. Click on the Confirm Action button
  6. In the new browser window click on the Confirm button.
  7. You are all set. Once you start receiving alerts they are going to look like this.

App Status Changed Alert

We have enhanced the catalogue of alerts provided from Alert Notification with the Java Application Status changed alerts. This means that from now you can receive alerts whenever your app changes in status from example from Started to Stopped.

Supported status changes are:

  • UNKNOWN
  • PENDING
  • STARTING
  • STOPPING
  • STARTED
  • STOPPED
  • FAILED
  • APP_TIMEOUT
  • APP_SERVER_STARTED

For this purpose, you need two things:

  1. Enabled Alert Notification in your Neo Environment 
  2. Configured Alert Subscription in your Alert Notification UI. To do this simply:
    1. Navigate to Alert Notification UI -> Export or Import tab and import this JSON:
      {
        "conditions": [
          {
            "name": "AppStatusIsChanged",
            "propertyKey": "eventType",
            "predicate": "EQUALS",
            "propertyValue": "ApplicationStatusChange",
            "labels": [],
            "description": ""
          }
        ],
        "actions": [
          {
            "name": "SendNotificationToMyEmail",
            "state": "ENABLED",
            "labels": [],
            "description": "",
            "destination": "your.email",
            "type": "EMAIL"
          }
        ],
        "subscriptions": [
          {
            "name": "MyAppStatusHasChanged",
            "conditions": [
              "AppStatusIsChanged"
            ],
            "actions": [
              "SendNotificationToMyEmail"
            ],
            "labels": [],
            "state": "ENABLED",
            "description": ""
          }
        ]
      }​
    2. Don’t forget to change “your.email” with your actual email in the JSON.
    3. Alternatively, you can create the subscription manually. Click here for the alert information that you are going to need.

What’s Next?

We are working on extending our catalogue with Mobile Services, MTA Deploy Service and many more alerts. Also, stay tuned for integrations with VictorOps and ServiceNow. Meanwhile, you can explore all the new features of Alert Notification.

6 Comments
You must be Logged on to comment or reply to a post.
        • Yes, indeed you have. Think about it the following way - the Conditions are the way of you telling ANS "what you want to receive", as ANS works on pub/sub principle and in that way you filter the alerts you are interested it. The Actions is you telling ANS "where you want to receive it" and then the Subscription unites the Conditions and Actions into one like a sentence [If <Condition> then <Action>] and of course you can build more complex subscriptions like [If <Condition A> and <Condition B> or <Condition C>, then <Action A> and <Action B>].

    • Dear Sandhya,

      Sandhya Kumari  - can you point me on which trial landscape do you experience this?

      you should be able to access ANS via trial. I will check with the dev team and will get back to you.

      Thanks,

      Kiril