Here is output of execute command:
{
"_id": "cluster_health_watch_ok_57c07aa4-fce1-42cf-8fcb-22b7a6b09c39-2018-01-24T12:09:51.609Z",
"watch_record": {
"watch_id": "cluster_health_watch_ok",
"state": "executed",
"status": {
"state": {
"active": true,
"timestamp": "2018-01-24T12:09:49.681Z"
},
"last_checked": "2018-01-24T12:09:51.609Z",
"last_met_condition": "2018-01-24T12:09:51.609Z",
"actions": {
"send_emails": {
"ack": {
"timestamp": "2018-01-24T12:09:51.609Z",
"state": "ackable"
},
"last_execution": {
"timestamp": "2018-01-24T12:09:51.609Z",
"successful": true
},
"last_successful_execution": {
"timestamp": "2018-01-24T12:09:51.609Z",
"successful": true
}
},
"my_webhook": {
"ack": {
"timestamp": "2018-01-24T12:09:49.681Z",
"state": "awaits_successful_execution"
},
"last_execution": {
"timestamp": "2018-01-24T12:09:51.609Z",
"successful": false,
"reason": "SSLHandshakeException[Received fatal alert: handshake_failure]"
}
}
}
},
"trigger_event": {
"type": "manual",
"triggered_time": "2018-01-24T12:09:51.609Z",
"manual": {
"schedule": {
"scheduled_time": "2018-01-24T12:09:51.609Z"
}
}
},
"input": {
"http": {
"request": {
"scheme": "http",
"host": "<elasticsearch-host>",
"port": 9200,
"method": "get",
"path": "/_cluster/health",
"params": {},
"headers": {}
}
}
},
"condition": {
"compare": {
"ctx.payload.status": {
"eq": "green"
}
}
},
"result": {
"execution_time": "2018-01-24T12:09:51.609Z",
"execution_duration": 266,
"input": {
"type": "http",
"status": "success",
"payload": {
"number_of_pending_tasks": 0,
"cluster_name": "testxpack",
"active_shards": 40,
"active_primary_shards": 20,
"unassigned_shards": 0,
"delayed_unassigned_shards": 0,
"timed_out": false,
"relocating_shards": 0,
"_headers": {
"content-length": [
"388"
],
"content-type": [
"application/json; charset=UTF-8"
]
},
"initializing_shards": 0,
"task_max_waiting_in_queue_millis": 0,
"number_of_data_nodes": 3,
"number_of_in_flight_fetch": 0,
"active_shards_percent_as_number": 100,
"_status_code": 200,
"status": "green",
"number_of_nodes": 5
},
"http": {
"request": {
"host": "<elasticsearch-host>",
"port": 9200,
"scheme": "http",
"method": "get",
"path": "/_cluster/health"
},
"status_code": 200
}
},
"condition": {
"type": "compare",
"status": "success",
"met": true,
"compare": {
"resolved_values": {
"ctx.payload.status": "green"
}
}
},
"actions": [
{
"id": "send_emails",
"type": "email",
"status": "success",
"email": {
"account": "work",
"message": {
"id": "cluster_health_watch_ok_57c07aa4-fce1-42cf-8fcb-22b7a6b09c39-2018-01-24T12:09:51.609Z",
"from": "<myemailid>",
"sent_date": "2018-01-24T12:09:51.619Z",
"to": [
"<myanotheremailid>"
],
"subject": "Cluster Status OK",
"body": {
"text": "Cluster status is GREEN"
}
}
}
},
{
"id": "my_webhook",
"type": "webhook",
"status": "failure",
"reason": "SSLHandshakeException[Received fatal alert: handshake_failure]"
}
]
},
"messages": []
}
}