Skip to content

Commit 5a70fff

Browse files
author
Khanh Nguyen
committed
Added jira rule template
1 parent 4d6843f commit 5a70fff

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Rule name, must be unique
2+
name: Alert on any error
3+
4+
# Index to search, wildcard supported
5+
index: bitsensor
6+
timestamp_field: endpoint.localtime
7+
8+
# Type of alert.
9+
type: any
10+
realert:
11+
seconds: 0
12+
13+
# A list of elasticsearch filters used for find events
14+
# These filters are joined with AND and nested in a filtered query
15+
# For more info: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl.html
16+
filter:
17+
- query:
18+
query_string:
19+
query: "_exists_:errors"
20+
21+
include:
22+
- endpoint.location
23+
- endpoint.name
24+
- context.http.userAgent
25+
- context.ip
26+
- errors
27+
- meta.user
28+
29+
30+
# Enhancement for converting 'detections' array into object, ex. get merged detection type by
31+
# 'detections_parsed.type' or get first detection type by 'detection_parsed.0.type'
32+
match_enhancements:
33+
- "elastalert_modules.bitsensor_enhancement.AlertTextEnhancement"
34+
run_enhancements_first: true
35+
36+
37+
alert_subject: "Error on {}"
38+
alert_subject_args:
39+
- endpoint.name
40+
41+
alert_text_type: alert_text_only
42+
alert_text: "Triggered at _{}_\n\n*Attacker:*\nIP: {} \nUser-Agent: {}\nError: *{}*\n\nId: {}\nUser: {}"
43+
alert_text_args:
44+
- endpoint.localtime
45+
- context.ip
46+
- context.http.userAgent
47+
- errors_parsed.type
48+
- _id
49+
- meta.user
50+
51+
# The alert is use when a match is found
52+
alert:
53+
- jira
54+
55+
jira_server: https://bitsensor.atlassian.net
56+
jira_project: SA
57+
jira_issuetype: Story
58+
jira_labels: error
59+
60+
# Add jira_acct.txt to rules folder
61+
# The file is yaml formatted and must contain fields: 'user', 'password'
62+
jira_account_file: "rules/jira_acct.txt"

0 commit comments

Comments
 (0)