Yelp / elastalert

Easy & Flexible Alerting With ElasticSearch
https://elastalert.readthedocs.org
Apache License 2.0
7.97k stars 1.73k forks source link

Force Elastalert to send mail in a specific font #869

Open Alexwii opened 7 years ago

Alexwii commented 7 years ago

Hello everyone,

Thank you so much for Elastalert, it's beautifuf and very powerful.

I have a problem, when I want use "summary_table_fields" my mail look like this: tableau

And the problem it's that the font is not appropriate for the table.

It's not possible to specify at Elastalert to use a font like consolas ?

Thank you so much for your answer

AnderssonPeter commented 7 years ago

In my case Elastalert sends emails in the Text mode and i don't think you can force a specific font there.

Alexwii commented 7 years ago

I will am create an alert in HTML, thank for your answer !

AnderssonPeter commented 7 years ago

@Alexwii if you do manage to create a html alerter please share it here in case someone else gets the same problem!

Alexwii commented 7 years ago

Yes of course :)

nejczupan commented 7 years ago

Could you share how you accomplished this? I have pretty much the same wish.

Alexwii commented 7 years ago

I can, but it's not perfect, I should have work again on this. I post this when I think it will be ready but I have not time.

LAChristopher commented 7 years ago

I am trying to style my Elastalert alerts with html coding and I can't seem to get it working. @Alexwii did you mange to get your html code working?

Alexwii commented 7 years ago

It's not perfect but it's works. But I need a little time for continue to perfect him.

sathishdsgithub commented 7 years ago

@Alexwii

Could you please share the example of html alert email rule ? And the output

LAChristopher commented 7 years ago

@Alexwii ah I understand. I haven't managed to get anything close to working though, if possible can you share your working code, even if not perfect; and I will also work on it to try help get it better.

Alexwii commented 7 years ago

@sathishdsgithub I don't understand your question ? @LAChristopher Yes, if I have time today, I will upload it here

LAChristopher commented 7 years ago

@Alexwii thank you so much, really appreciate it.

sathishdsgithub commented 6 years ago

@Alexwii

Did you manage to get the proper format of the summary_table_field in email output? I'm also experiencing the same issue. My email output looks ugly, also I get more blank spaces in the bottom of the outlook email. summary_table

Alexwii commented 6 years ago

Yes I fix it.

But I have not the time for share it here, because I need to write a documentation and I have a lot of work this month.

Maybe end of august... I'm sorry for that.

sathishdsgithub commented 6 years ago

@Alexwii

Thanks for the update. Meanwhile, could you please share at least the steps to get the proper output with creating an alert in HTML

sathishdsgithub commented 6 years ago

@LAChristopher @nejczupan @AnderssonPeter

For those looking for a decent table in email output, you can import the below alerts.py and give it a try. It gives a pretty table output. It uses the python from prettytable import PrettyTable https://github.com/qianghaohao/elastalert/blob/master/elastalert/alerts.py

Thanks to @qianghaohao for helping this accomplish.

LAChristopher commented 6 years ago

@sathishdsgithub thanks so much... will look into it. Really looking for how to change text, add logos, etc. Basically how to make the e-mail alert look good, so something that uses HTML code and not plain text.

YoavBZ commented 6 years ago

Guys check this issue: https://github.com/Yelp/elastalert/issues/391 It works pretty well for me. Hope it helps