Skip to Content
Technical Articles
Author's profile photo Kiril Gavrailov

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.

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Korlam Venkata Ramana Sai Charan
      Korlam Venkata Ramana Sai Charan

      after creating action i didnt receive any notification on teams can you help me

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      Dear Korlam Venkata Ramana Sai Charan ,

      Thank you for getting in touch.

      As there are multiple reasons(misconfiguration, lack of event conditions, etc.) not to receive an event, I would recommend turning to the options described in this help page to determine what is the reason.

      Thanks,

      Kiril

      Author's profile photo Korlam Venkata Ramana Sai Charan
      Korlam Venkata Ramana Sai Charan

      Thank you for replying me Kiril, Do i need to create subscriptions  and condition after creating action in alert notification service

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      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>].

      Author's profile photo Sandhya Kumari
      Sandhya Kumari

      Hello Kiril,

       

      Can we do this is SAP BTP Trial account. I do not see any action tab in Alert notification in my Trial account. Please help.

      Author's profile photo Kiril Gavrailov
      Kiril Gavrailov
      Blog Post Author

      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

      Author's profile photo vijay kumar
      vijay kumar

      Hi Kiril ,

      In our project we are getting around 10000 error mails per hour due to which our outlook is getting hanged .How to overcome this challenge .Kindly share your views or else best practices.

       

      Regards,

      Vijaykumar.

      Author's profile photo Susmita Moharana
      Susmita Moharana

      Hi Kiril,

      I am able to get message in Teams channel without using ANS service though webhook configuration through our CPI Iflow. But I am looking the message that is sent to teams should be in a specific format(Not the standard format as ANS has provided), wanated to customize the message format.Is it possible?

      Please suggest.

      Regards,

      Susmita.