parvez / snapshot

Report Generation for ElasticSearch Kibana / Grafana
54 stars 18 forks source link

Enhancement: Automated emailing of the report #4

Open hamelsveld opened 8 years ago

hamelsveld commented 8 years ago

It would be great if we could automatically email the report to one or more recipients after generation.

I think what's needed is at least: General smtp_host: smtp_user: smtp_passwd:

per rule recipients: subject: From:

Alternatively what also would be a great solution is to put the report behind a single time valid download URL and email just the link but this link must in that case be available without userid/passwd. and store the files in the tool for a to configurable time just in case the link failed or other people want to have the report too.
bbczeuz commented 7 years ago

+1 is there any progress on this? @parvez: Are you still working on this code? Emailing would be a nice (speak: fundamentally important in my application) feature.

eperry commented 7 years ago

Well, I would +1 this as well,

My solution, knowing that the generation of the report is based on a cronjob. I was going to create a cron that would find the different reports and just email them. This would be a simple thing to implement.

But as I was thinking about this, we might be able to added it to the helper_generate javascript to email the file prior to exiting. Maybe I will look at this as an idea.

eperry commented 7 years ago

Here is basically the rule I would write. might have to fix it up to wrok correctly

*/5 * * * * find <DATADIR> -name \*.pdf -exec mailx -a {} -s "Report for {}" <email> \;