正在显示
1 个修改的文件
包含
76 行增加
和
1 行删除
| 1 | -# go-stash项目介绍 | 1 | +# go-stash |
| 2 | 2 | ||
| 3 | go-stash is a free and open server-side data processing pipeline that ingests data from Kafka, transforms it, and then sends it to ElasticSearch. | 3 | go-stash is a free and open server-side data processing pipeline that ingests data from Kafka, transforms it, and then sends it to ElasticSearch. |
| 4 | 4 | ||
| 5 | +## Quick Start | ||
| 6 | + | ||
| 7 | +```shell | ||
| 8 | +gostash -f etc/config.json | ||
| 9 | +``` | ||
| 10 | + | ||
| 11 | +config.json looks like: | ||
| 12 | + | ||
| 13 | +```json | ||
| 14 | +{ | ||
| 15 | + "Input": { | ||
| 16 | + "Kafka": { | ||
| 17 | + "Name": "gostash", | ||
| 18 | + "Brokers": [ | ||
| 19 | + "172.16.186.16:19092", | ||
| 20 | + "172.16.186.17:19092" | ||
| 21 | + ], | ||
| 22 | + "Topic": "k8slog", | ||
| 23 | + "Group": "pro", | ||
| 24 | + "NumProducers": 16, | ||
| 25 | + "MetricsUrl": "http://localhost:2222/add" | ||
| 26 | + } | ||
| 27 | + }, | ||
| 28 | + "Filters": [ | ||
| 29 | + { | ||
| 30 | + "Action": "drop", | ||
| 31 | + "Conditions": [ | ||
| 32 | + { | ||
| 33 | + "Key": "k8s_container_name", | ||
| 34 | + "Value": "-rpc", | ||
| 35 | + "Type": "contains" | ||
| 36 | + }, | ||
| 37 | + { | ||
| 38 | + "Key": "level", | ||
| 39 | + "Value": "info", | ||
| 40 | + "Type": "match", | ||
| 41 | + "Op": "and" | ||
| 42 | + } | ||
| 43 | + ] | ||
| 44 | + }, | ||
| 45 | + { | ||
| 46 | + "Action": "remove_field", | ||
| 47 | + "Fields": [ | ||
| 48 | + "message", | ||
| 49 | + "_source", | ||
| 50 | + "_type", | ||
| 51 | + "_score", | ||
| 52 | + "_id", | ||
| 53 | + "@version", | ||
| 54 | + "topic", | ||
| 55 | + "index", | ||
| 56 | + "beat", | ||
| 57 | + "docker_container", | ||
| 58 | + "offset", | ||
| 59 | + "prospector", | ||
| 60 | + "source", | ||
| 61 | + "stream" | ||
| 62 | + ] | ||
| 63 | + } | ||
| 64 | + ], | ||
| 65 | + "Output": { | ||
| 66 | + "ElasticSearch": { | ||
| 67 | + "Hosts": [ | ||
| 68 | + "172.16.141.4:9200", | ||
| 69 | + "172.16.141.5:9200" | ||
| 70 | + ], | ||
| 71 | + "DailyIndexPrefix": "k8s_pro-" | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | +} | ||
| 75 | +``` | ||
| 76 | + | ||
| 77 | +### 微信交流群 | ||
| 78 | + | ||
| 79 | +添加我的微信:kevwan,请注明go-stash,我拉进go-stash社区群🤝 |
-
请 注册 或 登录 后发表评论