Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ppabc committed Jun 13, 2018
1 parent 1660ea0 commit f3ad918
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- 脚本化后,可以结合一些自动化工具,批量部署,比如可以用ansible来批量执行脚本,就可以批量部署服务器业务。
- 这里面的脚本是运维经常使用的脚本,方便大家使用!

# kjyw 快捷运维官方地址
## 快捷运维官方地址
- 开源中国●码云地址:https://gitee.com/aqztcom/docker-alpine
- Github地址:https://github.com/aqzt/docker-alpine
- 相关使用文档:https://bbs.aqzt.com/forum-39-1.html
Expand Down
43 changes: 43 additions & 0 deletions elk/install-filebeat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/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

0 comments on commit f3ad918

Please sign in to comment.