-
Notifications
You must be signed in to change notification settings - Fork 0
/
pillar.example
39 lines (39 loc) · 1.17 KB
/
pillar.example
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
---
logstash:
inputs:
-
plugin_name: file
path:
- /var/log/syslog
- /var/log/auth.log
type: syslog
filters:
-
plugin_name: grok
cond: 'if [type] == "syslog"'
match:
message: '%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}'
add_field:
received_at: '%{@timestamp}'
received_from: '%{host}'
-
plugin_name: grok
cond: 'else if [type] == "nginx"'
match:
message: '%{IPORHOST:clientip} %{USER:ident} %{USER:auth} \[%{HTTPDATE:timestamp}\] \"(?:%{WORD:verb} %{URIPATHPARAM:request}(?: HTTP/%{NUMBER:httpversion})?|-)\" %{NUMBER:response} (?:%{NUMBER:bytes}|-) \"(?:%{URI:referrer}|-)\" %{QS:agent}'
add_field:
received_at: '%{@timestamp}'
received_from: '%{host}'
-
plugin_name: date
match:
- 'syslog_timestamp'
- 'MMM d HH:mm:ss'
- 'MMM dd HH:mm:ss'
outputs:
-
plugin_name: lumberjack
hosts:
- logs.example.com
port: 5000
ssl_certificate: /etc/ssl/certs/lumberjack.crt