Skip to content

Latest commit

 

History

History
 
 

msteams

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

MS Teams Webhook

Receive HttpPOST ack,close and blackout actions via webhook callbacks.

For help, join Slack chat

Installation

Clone the GitHub repo and run:

$ python setup.py install

Or, to install remotely from GitHub run:

$ pip install git+https://github.com/alerta/alerta-contrib.git#subdirectory=webhooks/msteams

Note: If Alerta is installed in a python virtual environment then plugins need to be installed into the same environment for Alerta to dynamically discover them.

Configuration

The custom webhook will be auto-detected and added to the list of available API endpoints.

  • Create apikey with write:webhooks scope.
  • Put apikey to MS_TEAMS_APIKEY config.
  • Configure MS_TEAMS_INBOUNDWEBHOOK_URL to point to your alerta /webhooks/msteams url.
  • Configure msteams plugin MS_TEAMS_PAYLOAD to add potentialaction buttons to msteams alerts. (Example in example-payload.json.j2

Example Request

curl -sSL -X POST -H 'Content-Type: application/json' \
  -H 'X-API-Key: <API_KEY>' \
  -d \
  '
    {
      "action": "ack",
      "alert_id": "32adb117-0045-4626-ad89-a258db98133f"
    }
  ' \
  'http://localhost:8080/api/webhooks/msteams'

References

License

Copyright (c) 2019 Jarno Huuskonen. Available under the MIT License.