安装filebeat服务(在需要收集日志的主机安装filebeat)

下载和安装key文件

rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

创建yum源文件(版本要和elasticsearch和kibana一样)

[root@localhost ~]# vim /etc/yum.repos.d/elk-elasticsearch.repo
[elastic-.x]
name=Elastic repository for .x packages
baseurl=https://artifacts.elastic.co/packages/5.x/yum
gpgcheck=
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=
autorefresh=
type=rpm-md

开始安装并启动服务

yum install filebeat
systemctl start filebeat
systemctl status filebeat

收集日志

[root@localhost ~]# grep "^\s*[^# \t].*$" /etc/filebeat/filebeat.yml
filebeat.prospectors:
- type: log
enabled: true
paths:
- /var/xxx/*.log
- /var/xxx/*.out
multiline.pattern: ^\[ //multiline这三行是读取多行日志的,不把注释去掉,在kibana查看日志格式会很乱
multiline.negate: true //false改为true
multiline.match: after
setup.kibana:
host: "192.168.1.191:5601"
output.elasticsearch:
hosts: ["192.168.1.191:9200"]

重启服务

systemctl restart filebeat

安装Kibana

安装

docker pull docker.io/kibana:5.6.
docker run -it -d -e ELASTICSEARCH_URL=http://192.168.1.191:9200 --name kibana --restart=always -p 5601:5601 kibana:5.6.12

docker+kibana+filebeat的安装的更多相关文章

  1. docker efk(filebeat+logstash+es+kibana)

    ​ 1.系统架构 ​ 通常我们说的elastic stack,也就是elk,通过es 收集日志数据,存到elasticsearch,最后通过kibana进行统计分析,但是elastic公司后续又推出了 ...

  2. 【linux】【ELK】搭建Elasticsearch+Logstash+Kibana+Filebeat日志收集系统

    前言 ELK是Elasticsearch.Logstash.Kibana的简称,这三者是核心套件,但并非全部. Elasticsearch是实时全文搜索和分析引擎,提供搜集.分析.存储数据三大功能:是 ...

  3. Docker的ubuntu镜像安装的容器无ifconfig和ping命令的解决

    Docker的Ubuntu镜像安装的容器无ifconfig命令和ping命令 解决: apt-get update apt install net-tools       # ifconfig apt ...

  4. Docker教程:docker的概念及安装

    http://blog.csdn.net/pipisorry/article/details/50754385 Why docker 对于运维来说,Docker提供了一种可移植的标准化部署过程,使得规 ...

  5. docker(一) Centos7下安装docker

    docker(一) Centos7下安装dockerdocker(二) windows10下安装dockerdocker(三) 镜像和容器常用命令 docker(四) 使用Dockerfile构建镜像 ...

  6. linux上安装Docker(非常简单的安装方法)

    Docker的三大核心概念:镜像.容器.仓库 镜像:类似虚拟机的镜像.用俗话说就是安装文件. 容器:类似一个轻量级的沙箱,容器是从镜像创建应用运行实例, 可以将其启动.开始.停止.删除.而这些容器都是 ...

  7. Docker基础教程(安装篇)

    Linux安装: 1.yum -y install docker-io 2.service docker start 3.chkconfig docker on Window安装: Docker 引擎 ...

  8. Docker初次使用与安装过程

    Docker入门 Docker 简介 Docker有两个版本: 社区版(CE) 企业版(EE) Docker Community Edition(CE)非常适合希望开始使用Docker并尝试使用基于容 ...

  9. Docker 学习应用篇之二: Docker的介绍和安装

    之前说过Docker的好处,Docker可以集装箱化的部署应用程序.那么Docker是通过什么实现的呢.要理解Docker内部构建,需要先理解Docker的四种部件 1)images:镜像,docke ...

随机推荐

  1. uni-app hbuilderX ios离线打包,启动图修改没反应

    最后还是没反应 删除app从新安装, 可参考https://www.jianshu.com/p/47c1377c61d6

  2. iOS开发多线程之GCD

    Grand Central Dispatch(GCD)是异步执行任务的技术之一.一般将应用程序中记述的线程管理用的代码在系统级中实现.开发者只需要定义想执行的任务并追加到适当的Dispatch Que ...

  3. 阿里云OSS 获取目录下所有文件

    public class AliyunHandle { public static string accessKeyId = "a1uI5xxxxxxxxxrP4H"; publi ...

  4. 常用Mysql或者PostGresql或者Greenplum的语句总结。

    1.使用mysql的union all可以同时查询出所有自己想要查询数据表的数据量. select 'user' as tablename, count(*) from user union all ...

  5. 【BZOJ4589】Hard Nim(FWT)

    题解: 由博弈论可以知道题目等价于求这$n$个数$\^$为0 快速幂$+fwt$ 这样是$nlog^2$的 并不能过 而且得注意$m$的数组$\^$一下会生成$2m$ #include <bit ...

  6. A tuple is defined as a function

    In James Munkres "Topology", the concept for a tuple, which can be \(m\)-tuple, \(\omega\) ...

  7. CSS 实现左侧固定,右侧自适应两栏布局的方法

    "左边固定,右边自适应的两栏布局",其中有老生常谈的float方法,BFC方法,也有CSS3的flex布局与grid布局.并非所有的布局都会在开发中使用,但是其中也会涉及一些知识点 ...

  8. js 30Dom应用

    1.open() 方法用于打开一个新的浏览器窗口或查找一个已命名的窗口. 给open传网址 如果是外站就加个http  <input type="button" value= ...

  9. hdu5701-中位数计数

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5701 题目: Problem Description 中位数定义为所有值从小到大排序后排在正中间的那个 ...

  10. vitualbox中的centos7与主机共享文件

    我在vitualbox中安装了一个centos7,最小安装.主机是win10操作系统.那么如何在虚拟机和主机之间进行文件共享呢,下面是本人实现过程,以及过程中遇到的一些问题. 1.在主机中选择一个文件 ...