Watcher condition failure

I configured watcher configuration in elasticsearch.yml as follows

#Watcher Configuration
watcher.actions.email.service.account:
exchange_account:
profile: outlook
email_defaults:
from: abc@gmail.com
smtp:
auth: true
starttls.enable: true
host: abc.com
port: 587
user: xxx
password: xxx

My condition for watcher is as follows

{
"trigger" : {
"schedule" : { "interval" : "10s" }
},
"input" : {
"http" : {
"request" : {
"host" : "localhost",
"port" : 9200,
"path" : "/_cluster/health",
"auth" : {
"basic" : {
"username" : "123",
"password" : "123"
}
}
}
}
},
"condition" : {
"compare" : {
"ctx.payload.status" : { "eq" : "yellow" }
}
},
"actions" : {
"send_email" : {
"email" : {
"to" : "abc@xxx.com",
"subject" : "ES Cluster Status Warning",
"body" : "The Cluster is down."
}
}
}
}

Im getting few errors. So now i changed the host and port number according to my requirement.
Even after changing the host as xyz.com and port as 28 in elasticsearch.yml watcher condition is checking for the previous configuration.

"reason": "MessagingException[failed to send email with subject [ES Cluster Status Warning] via account [exchange_account]]; nested: MailConnectException[Couldn't connect to host, port: abc.com, 587; timeout 120000]; nested: ConnectException[Connection refused]; "

Help me.
thank you

Hey,

please read the message of exception, which is telling you that the other side refused the network connection, when trying to sent the mail. This either means that there is no service listening (it is down, or you confused the host/port combination) or that it is potentially firewalled. This is not an issue with watcher, but with your setup of SMTP.

--Alex

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.