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.
Install all dependencies.
pip install -r requirements.txt
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.
The Log Path can be edited in the configuration.py file.