To install and configure prometheus-msteams for sending notifications from alertmanager to microsoft teams
This role was created to install and configure prometheus-msteams when I figured out there is no direct way we can use microsoft teams as receiver in alertmanager config. I didn't find any existing ansible role for this thats how this role was created. This role is inspired from ansible-node-exporter.
- Ansible >= 2.9 (Earlier versions may work, but I haven't tested)
All variables in default/main.yml can be overrided
Name | Default Value | Description |
---|---|---|
prometheus_msteams_version |
latest | prometheus-msteams version to install |
prometheus_msteams_binary_local_dir |
"" | To allow to use local packages from controller machine instead of github packages |
prometheus_msteams_template_local_dir |
"" | To allow to use local teams card template on controller machine than from github |
prometheus_msteams_config_dir |
"/etc/prometheus_msteams" | Location to store server configs |
prometheus_msteams_web_listen_address |
"0.0.0.0:2000" | prometheus_msteams listen addrress |
prometheus_msteams_request_uri |
"alertmanager" | teams-request-uri |
prometheus_msteams_channels |
[] | Channels to which alerts to send from alert manager |
Nil
ansible-galaxy install slashpai.ansible_prometheus_msteams
To add as submodule to your project instead of pulling from galaxy
git submodule add -b main https://github.com/slashpai/ansible-prometheus-msteams.git roles/prometheus-msteams
To get role updates
git submodule update --remote
- hosts: all
roles:
- slashpai.ansible_prometheus_msteams
Example playbook using git submodule
- Fork the project on GitHub
- Clone the project
- Add changes (and tests)
- Commit and push
- Create a pull request
- Add tests for ubuntu and figure out which inspec version to use due to licencing difference