1
|
- filebeat.prospectors:
|
|
|
2
|
- - input_type: log
|
1
|
+filebeat.prospectors:
|
|
|
2
|
+- input_type: log
|
3
|
paths:
|
3
|
paths:
|
4
|
- /Data/logs/nginx/api.yoho.cn_access.log
|
4
|
- /Data/logs/nginx/api.yoho.cn_access.log
|
5
|
document_type: nginx_access
|
5
|
document_type: nginx_access
|
6
|
fields:
|
6
|
fields:
|
7
|
source_ip: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
|
7
|
source_ip: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
|
8
|
- {% if dc == 'qcloud-az3' %}
|
|
|
9
|
- region: "az3"
|
|
|
10
|
- {% elif dc == 'qcloud-az2' %}
|
|
|
11
|
- region: "az2"
|
|
|
12
|
- {% elif dc == 'qcloud-az1' %}
|
|
|
13
|
region: "az1"
|
8
|
region: "az1"
|
14
|
- {% else %}
|
|
|
15
|
- region: "unknown"
|
|
|
16
|
- {% endif %}
|
|
|
17
|
fields_under_root: true
|
9
|
fields_under_root: true
|
18
|
tail_files: true
|
10
|
tail_files: true
|
19
|
|
11
|
|
20
|
- - input_type: log
|
12
|
+- input_type: log
|
21
|
paths:
|
13
|
paths:
|
22
|
- /Data/logs/nginx/api.yoho.cn_error.log
|
14
|
- /Data/logs/nginx/api.yoho.cn_error.log
|
23
|
- /Data/logs/nginx/nginx_error.log
|
15
|
- /Data/logs/nginx/nginx_error.log
|
24
|
document_type: nginx_access_error
|
16
|
document_type: nginx_access_error
|
25
|
fields:
|
17
|
fields:
|
26
|
source_ip: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
|
18
|
source_ip: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}"
|
27
|
- {% if dc == 'qcloud-az3' %}
|
|
|
28
|
- region: "az3"
|
|
|
29
|
- {% elif dc == 'qcloud-az2' %}
|
|
|
30
|
- region: "az2"
|
|
|
31
|
- {% elif dc == 'qcloud-az1' %}
|
|
|
32
|
region: "az1"
|
19
|
region: "az1"
|
33
|
- {% else %}
|
|
|
34
|
- region: "unknown"
|
|
|
35
|
- {% endif %}
|
|
|
36
|
fields_under_root: true
|
20
|
fields_under_root: true
|
37
|
tail_files: true
|
21
|
tail_files: true
|
38
|
multiline.pattern: '^\d{4}'
|
22
|
multiline.pattern: '^\d{4}'
|
39
|
multiline.negate: true
|
23
|
multiline.negate: true
|
40
|
multiline.match: after
|
24
|
multiline.match: after
|
41
|
|
25
|
|
42
|
- output.kafka:
|
26
|
+output.kafka:
|
43
|
enabled: true
|
27
|
enabled: true
|
44
|
hosts: ["10.66.105.67:9092"]
|
28
|
hosts: ["10.66.105.67:9092"]
|
45
|
topic: '%{[type]}'
|
29
|
topic: '%{[type]}'
|