-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilebeat.config
118 lines (117 loc) · 4.04 KB
/
filebeat.config
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
files:
"/etc/filebeat/filebeat.yml":
mode: "000755"
owner: root
group: root
content: |
output.elasticsearch:
hosts: ['${ELK_HOSTNAME}:9200']
username: '${ELK_USERNAME}'
password: '${ELK_PASSWORD}'
filebeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: true
reload.period: 10s
fields:
environment: ${ENVIRONMENT_TYPE}
application: ${APPLICATION_NAME}
fields_under_root: true
filebeat.prospectors:
- type: log
paths:
- /var/log/eb-commandprocessor.log
multiline.pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}
multiline.negate: true
multiline.match: after
fields:
environment: ${ENVIRONMENT_TYPE}
application: ${APPLICATION_NAME}
document_type: eb-commands
fields_under_root: true
ignore_older: 3h
- type: log
paths:
- /var/log/eb-version-deployment.log
multiline.pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}
multiline.negate: true
multiline.match: after
fields:
environment: ${ENVIRONMENT_TYPE}
application: ${APPLICATION_NAME}
document_type: eb-version-deployment
fields_under_root: true
ignore_older: 3h
- type: log
paths:
- /var/log/eb-activity.log
multiline.pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}
multiline.negate: true
multiline.match: after
fields:
environment: ${ENVIRONMENT_TYPE}
application: ${APPLICATION_NAME}
document_type: eb-activity
fields_under_root: true
ignore_older: 3h
- type: log
paths:
- /var/log/eb-docker/containers/eb-current-app/eb-*-stdouterr.log
multiline.pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}
multiline.negate: true
multiline.match: after
fields:
environment: ${ENVIRONMENT_TYPE}
application: ${APPLICATION_NAME}
document_type: eb-current-app-stdouterr
multiline.pattern: "^[[:space:]]+(at|\\.{3})\\b|^Caused by:"
multiline.negate: false
multiline.match: after
fields_under_root: true
ignore_older: 3h
- type: log
paths:
- /var/log/docker-events.log
multiline.pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}
multiline.negate: true
multiline.match: after
fields:
environment: ${ENVIRONMENT_TYPE}
application: ${APPLICATION_NAME}
document_type: docker-events
fields_under_root: true
ignore_older: 3h
- type: log
paths:
- /var/log/docker.log
multiline.pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}
multiline.negate: true
multiline.match: after
fields:
environment: ${ENVIRONMENT_TYPE}
application: ${APPLICATION_NAME}
document_type: docker
fields_under_root: true
ignore_older: 3h
- type: log
paths:
- /var/log/docker-ps.log
multiline.pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}
multiline.negate: true
multiline.match: after
fields:
environment: ${ENVIRONMENT_TYPE}
application: ${APPLICATION_NAME}
document_type: docker-ps
fields_under_root: true
ignore_older: 3h
commands:
1_download_filebeat:
command: "curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-oss-6.8.0-x86_64.rpm"
cwd: /home/ec2-user
2_install_filebeat:
command: "rpm -e -ivh --replacepkgs --replacefiles filebeat-oss-6.8.0-x86_64.rpm"
cwd: /home/ec2-user
3_enable_nginx_module:
command: "mv /etc/filebeat/modules.d/nginx.yml.disabled /etc/filebeat/modules.d/nginx.yml"
4_enable_system_module:
command: "mv /etc/filebeat/modules.d/system.yml.disabled /etc/filebeat/modules.d/system.yml"