1 Star 0 Fork 1.4K

ForlceKuang/kjyw

forked from aqztcom/kjyw 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install-filebeat.sh 788 Bytes
一键复制 编辑 原始数据 按行查看 历史
ppabc 提交于 2018-06-13 20:41 . update
#!/bin/bash
# Author: ppabc <ppabc AT qq.com>
# Blog: http://ppabc.cn
#
##添加Elasticsearch 源
cat > /etc/yum.repos.d/elk.repo<<EOF
[elasticsearch-5.x]
name=Elasticsearch repository for 5.x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF
##yum安装filebeat
yum install -y filebeat
##修改filebeat配置文件
cat > /etc/filebeat/filebeat.yml<<EOF
filebeat.prospectors:
- input_type: log
paths:
- /data/nginx/logs/error.log
document_type: nginx-error
- input_type: log
paths:
- /data/nginx/logs/access.log
document_type: nginx-access
output.logstash:
hosts: ["127.0.0.1:5044"]
EOF
##重启filebeat生效
service filebeat restart
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/forlcekuang/kjyw.git
git@gitee.com:forlcekuang/kjyw.git
forlcekuang
kjyw
kjyw
v1.1

搜索帮助