Replies: 2 comments 1 reply
-
Hi, From my perspective, you should
The go program should be very simple and does not need a lot of external libraries, so it will be very small. You can then create a docker container (from alpine or even scratch) and have this as an adapter deployed right next to the signal-REST container. I think this would be of universal value for a lot of people. https://prometheus.io/docs/alerting/latest/alertmanager/#alertmanager |
Beta Was this translation helpful? Give feedback.
-
There is already a solution doing that: https://github.com/schlauerlauer/alertmanager-webhook-signal My problem is the reliability of such a chain. I'm looking for a robust, simple solution with as little complexity as possible. Finally, we want to use it to transmit alarms and that must be as reliable as possible. |
Beta Was this translation helpful? Give feedback.
-
Grafana does have a webhook alert option. However, it won't work out of the box in combination with signal-cli-rest-api. I figured out the reason.
The generated payload in the body does have a "fixed" structure by Grafana. My idea is to add a special api command to parse grafana alerts. I'm not a programmer, so I don't know how to do that based on the source. I know a little bit of Golang, but did never used that in a docker context. Can anybody help?
The Grafana structure (anonymized) is:
{
"receiver": "test",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"alertname": "TestAlert",
"instance": "Grafana"
},
"annotations": {
"summary": "Notification test"
},
"startsAt": "2024-11-22T14:23:51.962833569+01:00",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "",
"fingerprint": "57c6d9296de2ad39",
"silenceURL": "https://grafana.test.local/alerting/silence/new?alertmanager=grafana&matcher=alertname%3DTestAlert&matcher=instance%3DGrafana",
"dashboardURL": "",
"panelURL": "",
"values": null,
"valueString": "[ metric='foo' labels={instance=bar} value=10 ]"
}
],
"groupLabels": {
"alertname": "TestAlert",
"instance": "Grafana"
},
"commonLabels": {
"alertname": "TestAlert",
"instance": "Grafana"
},
"commonAnnotations": {
"summary": "Notification test"
},
"externalURL": "https://grafana.test.local/",
"version": "1",
"groupKey": "test-57c6d9296de2ad39-1732281831",
"truncatedAlerts": 0,
"orgId": 1,
"title": "[FIRING:1] TestAlert Grafana ",
"state": "alerting",
"message": "{"message": "Test via Signal API!", "number": "+31612345678", "recipients": [ "+31698765432" ]}"
}
The last line "message": "{"message..... is the only part I can fill in freely.
Beta Was this translation helpful? Give feedback.
All reactions