Skip to content

Commit

Permalink
Merge pull request #2 from frack113/elastalert
Browse files Browse the repository at this point in the history
feat: Add elastert template with logsource
  • Loading branch information
frack113 authored Nov 21, 2023
2 parents dec4506 + b3131b6 commit b84b208
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions elastalert/elastalert_any_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
postprocessing:
- type: template
template: |+
name: {{ rule.id }}
description: {{ rule.title }}
owner: {{ rule.author }}
type: any
priority:{% set priority = ({"critical":4, "high":3, "medium":2, "low":1, "informational":0 })%} {{ priority["%s" % rule.level]}}
alert:
- debug
{% macro index() -%}
{% if rule.logsource.product == 'windows' -%}
{% set index = 'winlogbeat-*' -%}
{% elif rule.logsource.product == 'linux' -%}
{% set index = 'linux-*' -%}
{% else -%}
{% set index = 'logs-*' -%}
{% endif -%}
{{- index }}{% endmacro -%}
index: {{ index() }}
filter:
- query:
query_string:
query: '{{ query }}'


finalizers:
- type: concat

0 comments on commit b84b208

Please sign in to comment.