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
|
<
source
>
type
tail
format
apache2
path
/var/log/httpd/access_log
pos_file
/var/log/td-agent/access_log
.pos
time_format %Y-%m-%d %H:%M:%S
localtime
tag apache.access
<
/source
>
#Log Forwarding to node1 server
<match apache.access>
type
forward
# time_slice_format %Y%m%d
# time_slice_wait 10m
# localtime
#定义日志入库日志的时间;
time_format %Y-%m-%d %H:%M:%S
#localtime非常重要,不设置日志时间和系统时间相差8小时;
localtime
#定义入库日志的时间;
<server>
host node1
port 24224
<
/server
>
flush_interval 1s
<
/match
>
|
1
2
3
4
|
<
source
>
type
forward
port 24224
<
/source
>
|