https://github.com/klml/paw2mail
paw2mail
https://github.com/klml/paw2mail
Last synced: about 2 months ago
JSON representation
paw2mail
- Host: GitHub
- URL: https://github.com/klml/paw2mail
- Owner: klml
- Created: 2022-03-18T09:34:19.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-16T11:45:48.000Z (about 3 years ago)
- Last Synced: 2025-02-12T08:40:54.505Z (4 months ago)
- Language: Python
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# prometheus alertreceiver webhook2mail
[Openshift alert receivers](https://docs.openshift.com/container-platform/4.9/monitoring/managing-alerts.html#configuring-alert-receivers_managing-alerts) can only be managed by cluster admins in the secret `alertmanager-main` in the namespace `openshift-monitoring`.
__paw2mail__ is a webservice that accepts alerts and sends them to an email address.## deprecated
So alert routing for user-defined is in Technology Preview.
> In OpenShift Container Platform 4.10, a cluster administrator can enable alert routing for user-defined projects.
from [enabling-alert-routing-for-user-defined-projects](https://docs.openshift.com/container-platform/4.10/monitoring/enabling-alert-routing-for-user-defined-projects.html)
So paw2mail is not needed anymore.
## config
The receiver email adress is defined in `label paw2mail`:
```
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: foo
spec:
groups:
- name: bar
rules:
- alert: foobar_is_bigger_42
expr: 'example_count_total{item_type="/count"} > 42'
labels:
severity: Info
paw2mail: [email protected]
```## Setup
Needed environments
```
export [email protected]
export smtp_host=mail.example.net
export smtp_port=25
```Optional
```
export smtp_user=clustermailer
export smtp_pass=xxxxxxxxxxxxx
```