赞
踩
1、elasticsearch-7.9.3 |
修改配置:
#ubuntu需要加上node.name sentos7可以不需要,尽量还是加上吧
node.name: node-1
network.host: 0.0.0.0
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
#这里可以换未cluster.initial_master_nodes: ["node-1"]
cluster.initial_master_nodes: ["192.168.28.129:9300"]
filebeat.inputs:
- type: log
enabled: true
paths:
# 配置我们要读取的 Spring Boot 应用的日志
- /home/aisys/logs/member-service/*.log
fields:
# #定义日志来源,添加了自定义字段
log_topic: member-service
- type: log
enabled: true
paths:
- /home/aisys/logs/yoostar-gateway/*.log
fields:
log_topic: yoostar-gateway
#----------------------------- kafka output --------------------------------
output.kafka:
enabled: true
hosts: [“192.168.28.128:9092”]
topic: ‘tv-%{[fields][log_topic]}’
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
server.host: “0.0.0.0”
elasticsearch.hosts: [“http://10.20.22.30:9200”]
i18n.locale: “zh-CN”
input {
kafka {
bootstrap_servers =>“192.168.28.128:9092”
topics_pattern =>“tv-.*”
consumer_threads =>5
decorate_events =>true
codec =>“json”
auto_offset_reset =>“earliest”
#集群需要相同
group_id =>“logstash1”
}
}
filter{
json{
source =>“message”
target =>“doc”
}
}
output{
elasticsearch{
action =>“index”
hosts =>[“192.168.28.128:9200”]
#索引里面如果有大写字母就无法根据topic动态生成索引,topic也不能有大写字母
index =>“%{[fields][log_topic]}-%{+YYYY-MM-dd}”
}
stdout{
codec =>rubydebug
}
}
// 下载
v10.9.0
配置环境变量
vim /etc/profile
export PATH=$PATH:/usr/local/node-v10.9.0-linux-x64/bin
刷新配置
source /etc/profile
执行npm install -g grunt-cli 编译源码
执行npm install 安装服务
如果查询install.js错误执行npm -g install phantomjs-prebuilt@2.1.16 –ignore-script
执行grunt server启动服务。或者 nohup grunt server >output 2>&1 &
启动服务之后访问http声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/706285
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。