Thats why I find it so odd, I'm able to use Curl to get the information but not the watcher. The exact curl command I used is:
curl -k -X GET -H "Authorization: ApiKey [key value here]" https://[host url here]:12443/api/v1/platform/infrastructure/allocators
And the watcher query is as follows:
{
"trigger": {
"schedule": {
"interval": "2m"
}
},
"input": {
"http" : {
"request" : {
"scheme": "http",
"host" : "[host url here]",
"port" : 12400,
"path" : "/api/v1/platform/infrastructure/allocators",
"method": "get",
"auth":{
"Authorization": "ApiKey [key value here]"
}
}
}
},
"actions": {
"my-logging-action": {
"logging": {
"text": "{{ctx}}"
}
}
}
}
This gives me the following error:
"status": "failure",
"error": {
"root_cause": [
{
"type": "http_host_connect_exception",
"reason": "Connect to [host url here]:12400 failed: Connection refused"
}
],
"type": "http_host_connect_exception",
"reason": "Connect to [host url here]:12400 failed: Connection refused",
"caused_by": {
"type": "connect_exception",
"reason": "Connection refused"
}
},
When I change the scheme to https
and port to 12443
, I get the certs error:
"type": "http",
"status": "failure",
"error": {
"root_cause": [
{
"type": "s_s_l_handshake_exception",
"reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
}
],
"type": "s_s_l_handshake_exception",
"reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
"caused_by": {
"type": "validator_exception",
"reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",
"caused_by": {
"type": "sun_cert_path_builder_exception",
"reason": "unable to find valid certification path to requested target"
}
}
},