Implementing Pingdom Webhooks
Actually Pingdom webhooks aren't supported, either in (old) /GET nor (new) /POST flavour.
New /POST format:
FORM/POST PARAMETERS
None
HEADERS
Accept-Encoding: gzip, deflate
Accept: /
Content-Length: 621
X-Request-Id: 23152976-5a56-45b8-9d0a-9a782b57691b
Via: 1.1 vegur
Total-Route-Time: 0
Host: requestb.in
Connection: close
Content-Type: application/json
User-Agent: pingdom-bot
Connect-Time: 1
RAW BODY
{"checkid": 2148165, "checkname": "test", "checktype": "HTTP", "checkparams": {"basicauth": false, "encryption": false, "fullurl": "http://nos.ww12asdfdsfsdfsf.com/", "header": "User-Agent:Pingdom.combotversion1.4(http://www.pingdom.com/)", "hostname": "nos.ww12asdfdsfsdfsf.com", "ipv6": false, "port": 80, "url": "/"}, "tags": [], "previousstate": "UP", "currentstate": "DOWN", "statechangedtimestamp": 1464616436, "statechangedutctime": "2016-05-30T13:53:56", "longdescription": "This is a test message triggered by a user in My Pingdom", "description": "test", "firstprobe": {}, "secondprobe": {}}
Old /GET format:
see http://forum.mattermost.org/t/incoming-webhooks-supporting-get/1472
Would be great to see this soon ;-)
-
Khairul Anwar Hassim commented
Sample POST from Pingdom:
{
"check_id": 12345,
"check_name": "Name of HTTP check",
"check_type": "HTTP",
"check_params": {
"basic_auth": false,
"encryption": true,
"full_url": "https://www.example.com/path",
"header": "User-Agent:Pingdom.com_bot",
"hostname": "www.example.com",
"ipv6": false,
"port": 443,
"url": "/path"
},
"tags": [
"example_tag"
],
"previous_state": "UP",
"current_state": "DOWN",
"importance_level": "HIGH",
"state_changed_timestamp": 1451610061,
"state_changed_utc_time": "2016-01-01T01:01:01",
"long_description": "Long error message",
"description": "Short error message",
"first_probe": {
"ip": "123.4.5.6",
"ipv6": "2001:4800:1020:209::5",
"location": "Stockholm, Sweden"
},
"second_probe": {
"ip": "123.4.5.6",
"ipv6": "2001:4800:1020:209::5",
"location": "Austin, US",
"version": 1
}
} -
Chaim Keren-Tzion commented
And yet Pingdom webhooks work with Slack. So why does the Mattermost documentation say...
"Mattermost incoming webhooks are Slack-compatible. If you’ve used Slack’s incoming webhooks to create integrations, you can copy and paste that code to create Mattermost integrations."
https://docs.mattermost.com/developer/webhooks-incoming.html
?