I've created my watcher with the following watch config:
{
"trigger": {
"schedule": {
"interval": "10s"
}
},
"input": {
"simple": {
"color": "red",
"status": "error",
"count": 3
}
},
"condition": {
"compare": {
"ctx.payload.status": {
"eq": "error"
}
}
},
"actions": {
"ses_account": {
"throttle_period": "15m",
"email": {
"to": "isaac@example.com",
"subject": "State {{ctx.payload.status}}",
"body": "The color is now {{ ctx.payload.color }}"
}
}
}
}
My elasticsearch.yml config looks like:
watcher.actions.email.service.account:
ses_account:
smtp:
auth: true
starttls.enable: true
starttls.required: true
host: email-smtp.us-east-1.amazonaws.com
port: 587
user: AKXXXXXXXXXXXXXXXXXX
password: Aj/4XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
When I try running the watch with /_watcher/watch/cluster_health_email/_execute
, I get the following response:
"actions": [
{
"id": "ses_account",
"type": "email",
"status": "failure",
"reason": "MessagingException[failed to send email with subject [State error] via account [ses_account]]; nested: AuthenticationFailedException[535 Authentication Credentials Invalid]; "
}
]
Troubleshooting steps I've taken so far
- Checking policy attached to credentials
- Checking credentials in elasticsearch.yml
- restarting elasticsearch on all aws instances
What other steps should I be taking to get this configured properly? I am not sure how to further troubleshoot if my credentials were invalid when initially generated.