git地址: https://github.com/Yourdream/rsbeat
gitg地址: 改进支持sentinel https://github.com/154650362/rsbeat
1、安装
mkdir rsbeat
cd rsbeat
curl -L https://ghproxy.com/https://github.com/Yourdream/rsbeat/releases/download/v5.3.2/rsbeat-linux-amd64 -o rsbeat
chmod +x rsbeat
#下载ES的template
curl -L https://ghproxy.com/https://raw.githubusercontent.com/Yourdream/rsbeat/master/rsbeat.template.json -o rsbeat.template.json
curl -L https://ghproxy.com/https://github.com/Yourdream/rsbeat/blob/master/rsbeat.template-es2x.json -o rsbeat.template-es2x.json
2、配置rsbeat
rsbeat.yml
rsbeat:
# Defines how often an event is sent to the output
period: 1s
redis: ["127.0.0.1:6379"]
slowerThan: 100
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
# Optional protocol and basic auth credentials.
#protocol: "https"
#username: "elastic"
#password: "changeme"
# Overwrite existing template
template.overwrite: true
3、启动
./rsbeat -configtest
./rebeat -e
</article>