Hello!
I'm having an issue with a Watcher that I'm try to create that will call the ES /_cluster/health API endpoint.
I'm using the Watcher example from the documentation here pretty much verbatim and am getting a 'no_http_response_exception' failed to respond error.
I've tried using 'localhost' as well as the IP of the master node, with Basic Auth (and no Basic Auth) as well as base64 encoded uname:pw for authentication to no avail.
This is on version 8.13.4 for Kibana and ES. The error happens immediately in the Watcher 'Simulate' feature and doesn't timeout.
Any assistance would be appreciated.
Here is the Watcher code:
{
"trigger": {
"schedule": {
"interval": "10s"
}
},
"input": {
"http": {
"request": {
"host": "172.25.33.193",
"port": 9200,
"method": "get",
"path": "/_cluster/health",
"auth": {
"basic": {
"username": "service",
"password": "[REDACTED]"
}
}
}
}
},
"condition": {
"compare": {
"ctx.payload.status": {
"eq": "green"
}
}
},
"actions": {
"send_email": {
"email": {
"profile": "standard",
"to": [
"adam.meindel@blah.com"
],
"subject": "Cluster Status Warning",
"body": {
"text": "Cluster status is GREEN"
}
}
}
}
}
Here is the response:
{
"watch_id": "_inlined_",
"node": "y3YX2Ia_TrOYjxpkpRvJ_g",
"state": "failed",
"@timestamp": "2024-10-23T13:42:52.100372475Z",
"user": "Adam Meindel",
"status": {
"state": {
"active": true,
"timestamp": "2024-10-23T13:42:52.100Z"
},
"actions": {
"send_email": {
"ack": {
"timestamp": "2024-10-23T13:42:52.100Z",
"state": "awaits_successful_execution"
}
}
},
"execution_state": "failed",
"version": -1
},
"trigger_event": {
"type": "manual",
"triggered_time": "2024-10-23T13:42:52.100Z",
"manual": {
"schedule": {
"scheduled_time": "2024-10-23T13:42:52.100Z"
}
}
},
"input": {
"http": {
"request": {
"scheme": "http",
"host": "172.25.33.193",
"port": 9200,
"method": "get",
"path": "/_cluster/health",
"params": {},
"headers": {},
"auth": {
"basic": {
"username": "service",
"password": "::es_redacted::"
}
}
}
}
},
"condition": {
"compare": {
"ctx.payload.status": {
"eq": "green"
}
}
},
"metadata": {
"name": "Cluster Health",
"xpack": {
"type": "json"
}
},
"result": {
"execution_time": "2024-10-23T13:42:52.100Z",
"execution_duration": 21,
"input": {
"type": "http",
"status": "failure",
"error": {
"root_cause": [
{
"type": "no_http_response_exception",
"reason": "172.25.33.193:9200 failed to respond"
}
],
"type": "no_http_response_exception",
"reason": "172.25.33.193:9200 failed to respond"
},
"http": {
"request": {
"host": "172.25.33.193",
"port": 9200,
"scheme": "http",
"method": "get",
"path": "/_cluster/health",
"auth": {
"basic": {
"username": "service",
"password": "::es_redacted::"
}
}
}
}
},
"actions": []
},
"messages": [
"failed to execute watch input"
]
}
Please let me know if you need any additional information and thanks in advance!
Adam