.es(q='log.level.keyword:information').label(information).lines(fill=1,width=2).color(#006837).title("Event Levels ECS"),
.es(q='log.level.keyword:warning').label(warning).lines(fill=1,width=2).color(#ffffbe),
.es(q='log.level.keyword:error').label(error).lines(fill=1,width=2).color(#a50026).legend(columns=3, position=nw)
name: Windows Login Failed 3 times
# Alert on x events in y seconds
type: frequency
# Alert when this many documents matching the query occur within a timeframe
num_events: 3
# num_events must occur within this amount of time to trigger an alert
timeframe:
minutes: 10
buffer_time:
minutes: 10
run_every:
minutes: 1
realert:
seconds: 0
query_key: 'related.user'
# Index to search, wildcard supported
index: winlogbeat-*
timestamp_field: "@timestamp"
filter:
- query:
query_string:
query: "event.action:\"logon-failed\""
include:
- event.action
- event.code
- host.name
- related.user
- "@timestamp"
- _index
- _id
alert_text: |-
Action: {}
Event code: {}
The host name: {}
The user name: {}
Time: {}
alert_text_args:
- event.action
- event.code
- host.name
- related.user
- "@timestamp"
# The alert is use when a match is found
alert:
- telegram
alert_text_type: alert_text_only
telegram_bot_token: ********
telegram_room_id: "*********"