作者 kevin

update readme

... ... @@ -15,47 +15,48 @@ gostash -f etc/config.yaml
config.yaml示例如下:
```yaml
Input:
Kafka:
Name: gostash
Brokers:
- 172.16.186.16:19092
- 172.16.186.17:19092
Topic: k8slog
Group: pro
NumProducers: 16
Filters:
- Action: drop
Conditions:
- Key: k8s_container_name
Value: "-rpc"
Type: contains
- Key: level
Value: info
Type: match
Op: and
- Action: remove_field
Fields:
- message
- _source
- _type
- _score
- _id
- "@version"
- topic
- index
- beat
- docker_container
- offset
- prospector
- source
- stream
Output:
ElasticSearch:
Hosts:
- 172.16.141.4:9200
- 172.16.141.5:9200
DailyIndexPrefix: k8s_pro-
Processors:
- Input:
Kafka:
Name: gostash
Brokers:
- "172.16.186.16:19092"
- "172.16.186.17:19092"
Topic: k8slog
Group: pro
NumProducers: 16
Filters:
- Action: drop
Conditions:
- Key: k8s_container_name
Value: "-rpc"
Type: contains
- Key: level
Value: info
Type: match
Op: and
- Action: remove_field
Fields:
- message
- _source
- _type
- _score
- _id
- "@version"
- topic
- index
- beat
- docker_container
- offset
- prospector
- source
- stream
Output:
ElasticSearch:
Hosts:
- "172.16.141.4:9200"
- "172.16.141.5:9200"
DailyIndexPrefix: k8s_pro-
```
### 微信交流群
... ...
... ... @@ -18,7 +18,7 @@ import (
const dateFormat = "2006.01.02"
var configFile = flag.String("f", "etc/config.json", "Specify the config file")
var configFile = flag.String("f", "etc/config.yaml", "Specify the config file")
func main() {
flag.Parse()
... ...