Hi,
I'm trying to call a public endpoint (p-log.herokuapp.com), sending the json-body in the request, using a sentinl watcher
The service p-log.herokuapp.com show me the request with headers but the body is always empty. Why???
Here below the code of my watcher:
{
"actions": {
"call_external_endPoint": {
"webhook": {
"method": "POST",
"host": "p-log.herokuapp.com",
"port": 80,
"path": "/endpoint/",
"params": {},
"body": "{{#toJson}}ctx.payload{{/toJson}}",
"headers": {
"Content-type": "application/json"
}
}
}
},
"input": {
"search": {
"request": {
"index": [
"logstash*"
],
"body": {
"size": 0,
"query": {
"bool": {
"must": [
{
"match": {
"fields.EnvironmentName": "Production"
}
},
{
"range": {
"@timestamp": {
"gte": "now-10d/d",
"lt": "now/d"
}
}
}
]
}
},
"aggs": {
"Applications": {
"terms": {
"field": "fields.ApplicationName.raw"
},
"aggs": {
"Level": {
"terms": {
"field": "level.raw"
}
}
}
}
}
}
}
}
},
"condition": {
"script": {
"script": "payload.hits.total > 0"
}
},
"trigger": {
"schedule": {
"later": "every 24 hours"
}
},
"title": "TEST - Call External EndPoint",
}
Could someone help me?
Thanks.