-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathauth.conf
45 lines (42 loc) · 1.25 KB
/
auth.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
filter {
if [type] == "shell" {
grok {
patterns_dir => "/etc/logstash/patterns"
match => ["message", "%{SSH_PUB_LOGIN}"]
add_tag => ["ssh_successful_login", "ssh_pub_login", "ssh_parse"]
}
grok {
patterns_dir => "/etc/logstash/patterns"
match => ["message", "%{SSH_PASSWORD_LOGIN}"]
add_tag => ["ssh_successful_login", "ssh_password_login", "ssh_parse"]
}
grok {
patterns_dir => "/etc/logstash/patterns"
match => ["message", "%{SSH_FAILED_LOGIN}"]
add_tag => ["ssh_failed_login", "ssh_parse"]
}
grok {
patterns_dir => "/etc/logstash/patterns"
match => ["message", "%{SSH_DISCONNECT}"]
add_tag => ["ssh_disconnect", "ssh_parse"]
}
grok {
patterns_dir => "/etc/logstash/patterns"
match => ["message", "%{SSH_SNOOPY}"]
add_tag => ["ssh_snoopy", "ssh_parse"]
}
if "ssh_parse" not in [tags] {
grok {
patterns_dir => "/etc/logstash/patterns"
match => ["message", "%{AUTH_LOG_LINE}"]
}
}
mutate {
remove_tag => ["ssh_parse", "_grokparsefailure"]
}
date {
timezone => "Europe/Amsterdam"
match => ["timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss", "ISO8601"]
}
}
}