我正在创建一个需要为我的日志发送电子邮件警报的应用程序。这是创建观察者的输入:
PUT _xpack/watcher/watch/log_error_watch
{
"trigger" : {
"schedule" : { "interval" : "10s" }
},
"input" : {
"search" : {
"request" : {
"indices" : [ "testindexv4" ],
"body" : {
"query" : {
"match" : { "log_level": "ERROR" }
}
}
}
}
}
,
"actions" : {
"send_email" : {
"email" : {
"to" : "<mailId>@gmail.com",
"subject" : "Watcher Notification",
"body" : "error logs found"
}
}
}
}
这是 elasticsearch.yml 的配置
xpack.security.enabled: false
xpack.notification.email.account:
standard_account:
profile: standard
smtp:
auth: false
starttls.enable: false
starttls.required: false
host: smtp.gmail.com
port: 587
当我尝试运行我的观察者时,我收到以下错误:
reason": "530 5.7.0 Must issue a STARTTLS command first. o63-v6sm4041934ywc.36 - gsmtp\n
请问有什么解决方案吗?