Hello there:
We face issue when integrating watcher webhook to integrate with ServiceNow.
Here is what we did and got…. If possible we’d prefer to set up a session so I may show you the details and learn from you.
We tested using Curl on linux commandline on kibana Server, we were able to create incidents on ServiceNow (working fine we can see the incidents there)
We tested using POSTMan, it works fine…
Here is how we set up the webhook...
Here is how we set up the webhook.
{
"EventList": [
{
"severity": "Minor",
"incidentImpact": 4,
"title": "IPopov2TestELK5",
"node": "PdxcTestCI-DoNotDelete-3",
"eventsourcesendingserver": "testhostRD2ELK1",
"eventsourcebacksyncserver": "",
"eventsourceexternalid": "testhostRD2ELK1",
"eventsourcecreatedtime": "2019-12-11-09-20-38",
"category": "OOSS",
"application": "APP_NAME_RD2ELK1",
"incidentCategory": "SoftwaretestRD2ELK1",
"incidentSubcategory": "ApplicationtestRD2ELK1"
}
]
}
////////////////////////////
If we use port 443, we got “received [400] status code”
The kibana log generated following event when use port 443. The method we used was “POST” but it seems in the log it shows as “PUT”.
{"type":"response","@timestamp":"2019-12-11T19:49:08Z","tags":,"pid":93202,"method":"put","statusCode":200,"req":{"url":"/api/watcher/watch/execute","method":"put","headers":{"host":"104.46.57.143:5601","connection":"keep-alive","content-length":"1503","accept":"application/json, text/plain, /","origin":"http://logstash.143:5601","kbn-version":"7.3.2","user-agent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36","content-type":"application/json;charset=UTF-8","referer":"http://104.46.57.143:5601/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.9"},"remoteAddress":"24.14.147.207","userAgent":"24.14.147.207","referer":"http://104.46.57.143:5601/app/kibana"},"res":{"statusCode":200,"responseTime":63,"contentLength":9},"message":"PUT /api/watcher/watch/execute 200 63ms - 9.0B"}
If we use port 80, we got
"Sample request sent to api.xxxx-d0.com:80/eve3-dev/yyy/events/R1/create"
It seems the request was sent to ServiceNow, but it didn't show up on ServiceNow. The ServiceNow Admin checked and said the request even didn't reach to servicenow.
The kibana log generated following event when use port 443. The method we used was “POST” but it seems in the log it shows as “PUT”. Both entries in the kibana log are same…
{"type":"response","@timestamp":"2019-12-11T19:49:30Z","tags":,"pid":93202,"method":"put","statusCode":200,"req":{"url":"/api/watcher/watch/execute","method":"put","headers":{"host":"104.46.57.143:5601","connection":"keep-alive","content-length":"1501","accept":"application/json, text/plain, /","origin":"http://logstash:5601","kbn-version":"7.3.2","user-agent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36","content-type":"application/json;charset=UTF-8","referer":"http://104.46.57.143:5601/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.9"},"remoteAddress":"24.14.147.207","userAgent":"24.14.147.207","referer":"http://104.46.57.143:5601/app/kibana"},"res":{"statusCode":200,"responseTime":30,"contentLength":9},"message":"PUT /api/watcher/watch/execute 200 30ms - 9.0B"}
Any help would be highly appreciated...
Thanks
Li