Configure watcher to send email via Linux "mail" utility

alerting

(Kevin Soucy) #1

Is there a way to configure Watcher (v2.3.3) to use the standard Linux "mail" utility to send emails, as opposed to using gmail/outlook/exchange, etc ? We use linux mail to send email from scripts we write to extract data from ES (via "curl"). Would like to do be able to do the same from Watcher. Thks.


(Alexander Reelsen) #2

Hey Kevin,

you cannot trigger external commands from within watcher (the functionality is not added, but would also be rejected by the java security manager, that is enabled in elasticsearch itself).

However you do not need to have an external mail server to connect to (like gmail, exchange, etc). Your mail program very likely also connects to mailserver, and you could just reuse that one and configure it as an account, so the mails are then sent exactly the same way as those send via the mail command. Have you checked if a mail server is running on localhost that is responsible for the delivery of those emails sent using mail?

--Alex


(Kevin Soucy) #3

Thanks Alex, configured as generic email pointing to the smtp server used by linux mail. Works like a charm.


(system) #4