Use HTML in email alerts
Yes. Logit.io alerting supports HTML email content through ElastAlert 2 email settings.
Example: HTML email body
name: html-email-example
type: frequency
index: "*-*"
num_events: 1
timeframe:
minutes: 5
filter:
- query:
query_string:
query: "log.level:error OR level:error"
alert:
- email
email:
- "alerts@example.com"
email_format: html
alert_subject: "Error events detected in the last 5 minutes"
alert_text_type: alert_text_only
alert_text: |
<h2 style="margin:0 0 8px 0;">Log alert</h2>
<p style="margin:0 0 8px 0;">A matching error event was found.</p>
<p style="margin:0;">Rule: <strong>{0}</strong></p>
alert_text_args:
- nameNotes
- Keep HTML simple and email-client friendly (inline styles, basic tags).
- Test with Test only first, then choose Update to apply.
- Use destination-specific settings from the Email destination reference.
If you are unsure whether missing notifications are formatting-related or query-related,
use the validation guide and check
execution logs in the elastalert index.