Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 1.44 KB

README.md

File metadata and controls

38 lines (31 loc) · 1.44 KB

Python MS Teams API for Kapacitor Alerts

A respective setting already exists in the kapacitor configuration.

This project is for greater flexibility in relation to proxies and was developed for the Alerting UI in the inspectIT Ocelot - Configuration Server Project.

Installation

Install all dependencies.

pip install -r requirements.txt

Usage

Bundle

Create a zip file with all required files:

make bundle

Create a "/teams-api" directory under the kapacitor load directory (default: /etc/kapacitor/load/handler_scripts), copy and unzip the created zip file there. One or more handlers can be created under the /etc/kapacitor/load/handlers directory.

Optional: Edit the configurations

Example "teams-handler-team1.yml":

id: ms_teams-issue-handler_team_1
topic: ms_teams_team_1
kind: exec
options:
  prog: '/usr/bin/python3'
  args:
    - '/etc/kapacitor/load/handler_scripts/teams-api/main.py' # python file path (required)
    - 'https://outlook.office.com/webhook/xxx' # webhook (required)

This handler will be visible on the inspectIT Ocelot - Configuration Server UI, if the Alerting settings are enabled.

Config

The Log Path can be edited in the configuration.py file.