Skip to content

Commit

Permalink
Adding email alert rule example
Browse files Browse the repository at this point in the history
  • Loading branch information
mreeve-snl committed Nov 4, 2024
1 parent e76459d commit ea1fed3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/elastalert2/misc/smtp_auth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
user: "[email protected]"
password: "giyq caym zqiw chje" #this is your app password if using gmail
21 changes: 21 additions & 0 deletions config/elastalert2/rules/example-email-rule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: EMAIL
type: frequency
index: wazuh-*
num_events: 1
timeframe:
minutes: 1
filter:
- query:
match_phrase:
agent.ip: "10.1.0.4"
alert: email
alert_text: "ASDFASDF"
alert_text_type: alert_text_only
email:
- "[email protected]"
smtp_ssl: true
smtp_port: 465
smtp_host: "smtp.gmail.com"
from_addr: "[email protected]"
smtp_auth_file: /opt/elastalert/misc/smtp_auth.yml

1 change: 1 addition & 0 deletions quadlet/lme-elastalert.container
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Network=lme
PodmanArgs=--network-alias lme-elastalert2
Volume=lme_elastalert2_logs:/opt/elastalert/logs
Volume=/opt/lme/config/elastalert2/rules:/opt/elastalert/rules:ro
Volume=/opt/lme/config/elastalert2/misc:/opt/elastalert/misc:ro
Volume=/opt/lme/config/elastalert2/config.yaml:/opt/elastalert/config.yaml:ro
Volume=lme_certs:/etc/wazuh-manager/certs:ro
Volume=/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro
Expand Down

0 comments on commit ea1fed3

Please sign in to comment.