We used Slack before and are now migrating everything to Mattermost. We used alerting from Observium to Slack and I have now reconfigured it to post to Mattermost instead. However it seems Mattermost can not parse the data and I get a 500-response.
This is the POST:
curl -i -X POST -d ‘payload={“username”:“Observium”,“channel”:"#alerts",“attachments”:[{“fallback”:“RECOVER: [mtc-core-1.mgmt.XXXX.com] [port] [HundredGigE0/5/0/0] Interface load went over 80%”,“title”:“RECOVER: [mtc-core-1.mgmt.XXXX.com] [port] [HundredGigE0/5/0/0] Interface load went over 80%”,“title_link”:“https://observium.int.XXXX.com/device/device=3/tab=alert/alert_entry=9015/",“fields”:[{“title”:“Device/Location”,“value”:"mtc-core-1.mgmt.XXXX.com (Cisco IOS-XR 5.3.3 Default)\nMagnus Ladul\u00e5sgatan 63, Stockholm, Sverige”,“short”:true},{“title”:“Entity”,“value”:“port / HundredGigE0/5/0/0\nmtc-peer-1 0/4/0/0”,“short”:true},{“title”:“Alert Message/Duration”,“value”:“Interface load went over 80%\n19s (2016-09-08 12:15:20)”,“short”:true},{“title”:“Metrics”,“value”:“ifInOctets_perc = 16\nifOutOctets_perc = 2”,“short”:true}],“color”:“good”}]}’ https://mattermost.XXXX.com/hooks/XXXXXXXXX
HTTP/1.1 200 Connection established
HTTP/1.1 500 Internal Server Error
Server: nginx/1.10.1
Date: Thu, 08 Sep 2016 11:02:08 GMT
Content-Type: application/json
Content-Length: 167
Connection: keep-alive
X-Cluster-Id:
X-Ratelimit-Limit: 10
X-Ratelimit-Remaining: 9
X-Ratelimit-Reset: 1
X-Request-Id: diyziaadqb8a8yty8g9qcafbew
X-Version-Id: 3.3.0.69519d1de80a9155edf3b2a1dcd3f2cc
{“id”:“web.incoming_webhook.parse.app_error”,“message”:“Unable to parse incoming data”,“detailed_error”:"",“request_id”:“diyziaadqb8a8yty8g9qcafbew”,“status_code”:500}
Does anyone know what part of the payload is not compatible with Mattermost?