How to send mail to matched username from rule
See original GitHub issueHi, I have rule (type change) to detect user login from new IP. Now i want send mail to that user. How can ? for example :
filter:
- query:
query_string:
query: "type: ssh"
#- term:
# type: "ssh"
# (Required)
# The alert is use when a match is found
alert_text: |
New login from {0} for user {1} at {2}
alert_text_args:
- src_ip
- username
- timestamp
alert_text_type: alert_text_only
I want to send mail to {username}
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Mail flow rule conditions and exceptions (predicates) in ...
In the EAC, in the Properties of this rule section, click Match sender address in message. Note that you might need to click...
Read more >Email routing and delivery options for Google Workspace
Use Default routing to set up the default mail delivery for your organization. For example, if you want to send all or most...
Read more >Enforcing a match between FROM address and sasl username
This article explains how to ensure that the from address matches the sender's username.
Read more >Rule-based matching · spaCy Usage Documentation
All you know is that they are listed as “User name: {username}“. The name itself may contain any character, but no whitespace –...
Read more >Content filtering in Amazon EventBridge event patterns
You can combine multiple matching rules into a more complex event pattern. For example, the following event pattern combines anything-but and numeric ....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you need to normalize the data, either do it before it goes into Elasticsearch (like with logstash), or you need to write an enhancement.
http://elastalert.readthedocs.io/en/latest/recipes/adding_enhancements.html#enhancements
In the enhancement, do something like
match['username_field'] = normalize(match['username_field'])
You need to add a default email.
email: "something@example.com"