Closed willz9683 closed 4 years ago
I think that this is the receiver's fault. We use standard go tools for this, and they are accepted by the majority of receivers. What is the receiver?
The receiver is DMaaP Message Router
Reading https://tools.ietf.org/html/rfc7159 I see nothing wrong here. As Julien says, we use the standard Go library to produce the JSON payload and it would be surprising if it were generating incompatible payload.
What did you do? Alertmanager integration with external webhook API interface. Use postman to analysis alertmanager POST request.
What did you expect to see? alert JSON message in one string of POST request payload
What did you see instead? Under which circumstances? alertmanager send extra empty line (newline?) as part of the payload. Payload is considered as invalid JSON format.
Environment
System information:
Alertmanager version:
Prometheus version:
Alertmanager configuration file:
'/etc/prometheus/alertmanager_templates/*.tmpl'
route: group_by: ['alertname', 'cluster', 'service'] group_wait: 5s group_interval: 5m repeat_interval: 3h receiver: "snmp_webhook" routes:
inhibit_rules:
receivers:
level=error ts=2020-11-09T15:10:22.946Z caller=dispatch.go:301 component=dispatcher msg="Notify for alerts failed" num_alerts=3 err="cancelling notify retry for \"webhook\" due to unrecoverable error: unexpected status code 400: http://"