Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hoptical/grafana-skype-alerts
A webhook notifier for sending Grafana alerts to Skype
https://github.com/hoptical/grafana-skype-alerts
alerting grafana monitoring skype
Last synced: about 2 months ago
JSON representation
A webhook notifier for sending Grafana alerts to Skype
- Host: GitHub
- URL: https://github.com/hoptical/grafana-skype-alerts
- Owner: hoptical
- License: apache-2.0
- Created: 2023-04-24T15:55:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-28T16:06:10.000Z (6 months ago)
- Last Synced: 2024-06-28T17:33:24.537Z (6 months ago)
- Topics: alerting, grafana, monitoring, skype
- Language: Python
- Homepage:
- Size: 115 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![CI](https://github.com/hoptical/grafana-skype-alerts/actions/workflows/ci.yml/badge.svg)](https://github.com/hoptical/grafana-skype-alerts/actions/workflows/ci.yml)
[![Release](https://github.com/hoptical/grafana-skype-alerts/actions/workflows/release.yml/badge.svg)](https://github.com/hoptical/grafana-skype-alerts/actions/workflows/release.yml)# Grafana Skype Alerts
This repo provides a simple REST API to send Grafana Alert messages to skype group chats. It is designed to be used as a webhook for Grafana alert notification channel. It's response body is based on the [Grafana Webhook](https://grafana.com/docs/grafana/latest/alerting/manage-notifications/webhook-notifier/) format.## Requirements
- Grafana 8.0 and above
- Skype account with username and password
## Installation
You can install the app either by docker compose or helm chart. Additionally its docker image is available at [Docker Hub](https://hub.docker.com/repository/docker/hamedkarbasi/grafana-skype-alerts).### Docker Compose
Provide the skype account username and password in the format of `example.env` file. Then run the following command:
```bash
mv example.env .env
docker compose up --build
```
The app is accessible on `http://localhost:8000`### Helm
Provide the skype account username and password in the format of `example.env` file in a secret named `skype-secrets`. Then run the following command:
```bash
helm upgrade --install skype-notifier helm/
```## Usage
1. Create a group chat in skype.
2. Add the skype account to that group chat.
3. Login with the skype account and accept invitation to that chat group.
4. Fetch the chat id by `/api/skype/grafana_alert/{room_name}` endpoint with GET method.
5. Post your message using `/api/skype/grafana_alert/{chat_id}` and defined body message with POST method for test purposes.
6. In the Grafana Alert Manager, create a webhook notification channel and provide the `/api/skype/grafana_alert/{chat_id}` endpoint as the URL.![firing-alert](static/firing-alert.png)
![resolved-alert](static/resolved-alert.png)> Note: Alerts are posted as summerized messages to Skype by default to make them more readable. However, you can have the whole alert message by using `verbose` option: `/api/skype/grafana_alert/{chat_id}?verbose=true`
## Docs
For endpoints documentation please visit `/docs` URI.## Contributing
Thank you for considering contributing! If you find an issue or have a better way to do something, feel free to open an issue or a PR.
### Test
```
pytest -v
```
### Coverage
```bash
coverage run -m pytest
coverage report
```
## LicenseThis repository is open-sourced software licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).