作者 kevin

update readme

@@ -15,47 +15,48 @@ gostash -f etc/config.yaml @@ -15,47 +15,48 @@ gostash -f etc/config.yaml
15 config.yaml示例如下: 15 config.yaml示例如下:
16 16
17 ```yaml 17 ```yaml
18 -Input:  
19 - Kafka:  
20 - Name: gostash  
21 - Brokers:  
22 - - 172.16.186.16:19092  
23 - - 172.16.186.17:19092  
24 - Topic: k8slog  
25 - Group: pro  
26 - NumProducers: 16  
27 -Filters:  
28 - - Action: drop  
29 - Conditions:  
30 - - Key: k8s_container_name  
31 - Value: "-rpc"  
32 - Type: contains  
33 - - Key: level  
34 - Value: info  
35 - Type: match  
36 - Op: and  
37 - - Action: remove_field  
38 - Fields:  
39 - - message  
40 - - _source  
41 - - _type  
42 - - _score  
43 - - _id  
44 - - "@version"  
45 - - topic  
46 - - index  
47 - - beat  
48 - - docker_container  
49 - - offset  
50 - - prospector  
51 - - source  
52 - - stream  
53 -Output:  
54 - ElasticSearch:  
55 - Hosts:  
56 - - 172.16.141.4:9200  
57 - - 172.16.141.5:9200  
58 - DailyIndexPrefix: k8s_pro- 18 +Processors:
  19 +- Input:
  20 + Kafka:
  21 + Name: gostash
  22 + Brokers:
  23 + - "172.16.186.16:19092"
  24 + - "172.16.186.17:19092"
  25 + Topic: k8slog
  26 + Group: pro
  27 + NumProducers: 16
  28 + Filters:
  29 + - Action: drop
  30 + Conditions:
  31 + - Key: k8s_container_name
  32 + Value: "-rpc"
  33 + Type: contains
  34 + - Key: level
  35 + Value: info
  36 + Type: match
  37 + Op: and
  38 + - Action: remove_field
  39 + Fields:
  40 + - message
  41 + - _source
  42 + - _type
  43 + - _score
  44 + - _id
  45 + - "@version"
  46 + - topic
  47 + - index
  48 + - beat
  49 + - docker_container
  50 + - offset
  51 + - prospector
  52 + - source
  53 + - stream
  54 + Output:
  55 + ElasticSearch:
  56 + Hosts:
  57 + - "172.16.141.4:9200"
  58 + - "172.16.141.5:9200"
  59 + DailyIndexPrefix: k8s_pro-
59 ``` 60 ```
60 61
61 ### 微信交流群 62 ### 微信交流群
@@ -18,7 +18,7 @@ import ( @@ -18,7 +18,7 @@ import (
18 18
19 const dateFormat = "2006.01.02" 19 const dateFormat = "2006.01.02"
20 20
21 -var configFile = flag.String("f", "etc/config.json", "Specify the config file") 21 +var configFile = flag.String("f", "etc/config.yaml", "Specify the config file")
22 22
23 func main() { 23 func main() {
24 flag.Parse() 24 flag.Parse()