I'm trying to create a watcher with a webhook action. I'm using the following:
{
...
"actions": {
"some-webhook": {
"webhook": {
"scheme": "http",
"host": "some_host",
"port": some_port,
"method": "post",
"path": "/some/path",
"headers": {
"Cache-Control": "no-cache",
"Content-Type": "application/json"
},
"body": "some JSON data"
}
}
}
}
When saving this, Elasticsearch will add an empty "params" key, like this:
{
...
"actions": {
"some-webhook": {
"webhook": {
"scheme": "http",
"host": "some_host",
"port": some_port,
"method": "post",
"params": {}, <-- this is added by ES
"path": "/some/path",
"headers": {
"Cache-Control": "no-cache",
"Content-Type": "application/json"
},
"body": "some JSON data"
}
}
}
}
The problem is that the webhook then tries to access the URL http://some_host:some_port/some/path?
, with a question mark, as if URL parameters would follow. This makes my web server respond with a 404 error.
(Just to be clear, the goal is to POST
some data to the URL http://some_host:some_port/some/path
- without the question mark).
Is this a bug, or am I doing something wrong? I'm using version 6.1.1.