Hi ,
i am able to add watcher action but seeing execution error .
Can someone help
PUT _xpack/watcher/watch/my-watch
{
"trigger": {
"schedule": {
"interval": "10s"
}
},
"input": {
"http": {
"request": {
"host": "10.62.8.15",
"port": 9200,
"path": "/_cluster/health"
}
}
},
"actions": {
"logging": {
"logging": {
"text": "executed at {{ctx.execution_time}}"
}
},
"notify-slack": {
"slack": {
"account": "monitoring",
"message": {
"from": "ELK Stack",
"to": [ "#elastic-test" ],
"text": "Watcher Alert Triggered!",
"attachments": [
{
"title": "HSM_DISCONNECTED",
"text": "Watch [{{ctx.metadata.name}}] threshold alert",
"color": "danger"
}
]
}
}
}
}
}
Execution output
Execution Status:
Error!
{
"watch_id": "my-test-watch",
"node": "Qd-MDj8XTjuPpD0En1VMKw",
"state": "failed",
"status": {
"state": {
"active": true,
"timestamp": "2018-03-02T19:16:33.337Z"
},
"actions": {
"logging": {
"ack": {
"timestamp": "2018-03-02T19:16:33.337Z",
"state": "awaits_successful_execution"
}
},
"notify-slack": {
"ack": {
"timestamp": "2018-03-02T19:16:33.337Z",
"state": "awaits_successful_execution"
}
}
},
"execution_state": "failed",
"version": -1
},
"trigger_event": {
"type": "schedule",
"triggered_time": "2018-03-02T19:28:23.754Z",
"schedule": {
"scheduled_time": "2018-03-02T19:28:23.473Z"
}
},
"input": {
"http": {
"request": {
"scheme": "http",
"host": "10.62.8.15",
"port": 9200,
"method": "get",
"path": "/_cluster/health",
"params": {},
"headers": {}
}
}
},
"condition": {
"always": {}
},
"result": {
"execution_time": "2018-03-02T19:28:23.754Z",
"execution_duration": 1,
"input": {
"type": "http",
"status": "failure",
"error": {
"root_cause": [
{
"type": "no_http_response_exception",
"reason": "10.62.8.15:9200 failed to respond"
}
],
"type": "no_http_response_exception",
"reason": "10.62.8.15:9200 failed to respond"
},
"http": {
"request": {
"host": "10.62.8.15",
"port": 9200,
"scheme": "http",
"method": "get",
"path": "/_cluster/health"
}
}
},
"actions": []
},
"messages": [
"failed to execute watch input"
]
}