We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A JSON sent by Prometheus could have this format, with more than one alert:
{ "receiver": "test_webhook", "status": "resolved", "alerts": [ { "status": "resolved", "labels": { "alertname": "DiskSpace", "device": "rootfs", "fstype": "rootfs", "instance": "cs30.evilcorp", "job": "fsociety", "mountpoint": "/", "severity": "severe" }, "annotations": { "description": "disk usage 73% on rootfs device", "summary": "Disk usage alert on CS30.evilcorp" }, "startsAt": "2015-05-09T07:01:37.803Z", "endsAt": "2015-05-09T07:08:37.818278068Z", "generatorURL": "my.prometheusserver.url" }, { "status": "resolved", "labels": { "alertname": "DiskSpace", "device": "/dev/mapper/vg1-lv1", "fstype": "ext4", "instance": "cs30.evilcorp", "job": "fsociety", "mountpoint": "/whiterose", "severity": "severe" }, "annotations": { "description": "disk usage 52% on /dev/mapper/vg1-lv1 device", "summary": "Disk usage alert on cs30.evilcorp" }, "startsAt": "2015-05-09T07:01:37.803Z", "endsAt": "2015-05-09T07:08:37.818278068Z", "generatorURL": "my.prometheus.url" } ], "groupLabels": { "alertname": "DiskSpace", "instance": "cs30.evilcorp", "severity": "severe" }, "commonLabels": { "alertname": "DiskSpace", "instance": "cs30.evilcorp", "job": "fsociety", "severity": "severe" }, "commonAnnotations": { "summary": "Disk usage alert on cs30.evilcorp" }, "externalURL": "my.prometheusalertmanager.url", "version": "4", "groupKey": "{}/{severity=~\"^(?:severe)$\"}:{alertname=\"DiskSpace\", instance=\"cs30.evilcorp\", severity=\"severe\"}" }
Problem is that prom2teams, in this line https://github.com/idealista/prom2teams/blob/master/prom2teams/message/parser.py#L13 (and I take the blame for that one, didn't expect Prometheus to send more than one alert per JSON) just parses the first alarm.
So parser.py has to be changed, parse more than one alert and then prom2teams should send these alarms (changes needed as well in server.py, I think)
parser.py
server.py
The text was updated successfully, but these errors were encountered:
#26 Handling several alarms now
ca6af35
jnogol
No branches or pull requests
A JSON sent by Prometheus could have this format, with more than one alert:
Problem is that prom2teams, in this line https://github.com/idealista/prom2teams/blob/master/prom2teams/message/parser.py#L13 (and I take the blame for that one, didn't expect Prometheus to send more than one alert per JSON) just parses the first alarm.
So
parser.py
has to be changed, parse more than one alert and then prom2teams should send these alarms (changes needed as well inserver.py
, I think)The text was updated successfully, but these errors were encountered: