kibana

elk搭建记录

☆樱花仙子☆ 提交于 2020-01-20 18:15:13
ELK 搭建记录 为什么用到ELK: 一般我们需要进行日志分析场景:直接在日志文件中 grep、awk 就可以获得自己想要的信息。但在规模较大的场景中,此方法效率低下,面临问题包括日志量太大如何归档、文本搜索太慢怎么办、如何多维度查询。需要集中化的日志管理,所有服务器上的日志收集汇总。常见解决思路是建立集中式日志收集系统,将所有节点上的日志统一收集,管理,访问。 一般大型系统是一个分布式部署的架构,不同的服务模块部署在不同的服务器上,问题出现时,大部分情况需要根据问题暴露的关键信息,定位到具体的服务器和服务模块,构建一套集中式日志系统,可以提高定位问题的效率。 一个完整的集中式日志系统,需要包含以下几个主要特点: 收集-能够采集多种来源的日志数据 传输-能够稳定的把日志数据传输到中央系统 存储-如何存储日志数据 分析-可以支持 UI 分析 警告-能够提供错误报告,监控机制 ELK提供了一整套解决方案,并且都是开源软件,之间互相配合使用,完美衔接,高效的满足了很多场合的应用。目前主流的一种日志系统。 ELK简介: ELK是三个开源软件的缩写,分别表示:Elasticsearch , Logstash, Kibana , 它们都是开源软件。新增了一个FileBeat,它是一个轻量级的日志收集处理工具(Agent),Filebeat占用资源少

ELK学习实验014:Nginx日志JSON格式收集

☆樱花仙子☆ 提交于 2020-01-19 16:04:50
1 Kibana的显示配置 https://demo.elastic.co/app/kibana#/dashboard/welcome_dashboard 环境先处理干净 安装nginx和httpd-tools 2 使用压测工具产生日志 [root@node4 ~]# ab -n 100 -c 100 http://192.168.132.134/ This is ApacheBench, Version 2.3 <$Revision: 1430300 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 192.168.132.134 (be patient).....done Server Software: nginx/1.16.1 Server Hostname: 192.168.132.134 Server Port: 80 Document Path: / Document Length: 612 bytes Concurrency Level: 100 Time taken for tests: 0.011

EFK在windows的安装和使用

二次信任 提交于 2020-01-19 01:02:36
什么是EFK? Elasticsearch:一个分布式、高扩展、高实时的搜索与数据分析引擎。 Filebeat:轻量型日志采集器。 Kibana:是一款开源的数据分析和可视化平台,可以当做是Elasticsearch的可视化操作界面。 EFK可以替代ELK来使用,logstash跑在jvm上,资源消耗比较大,filebeat更轻量,占用资源更少。 下载安装 windows下载后直接解压可直接使用,下载地址如下: Elasticsearch:https://www.elastic.co/downloads/elasticsearch Filebeat:https://www.elastic.co/downloads/beats/filebeat Kibana:https://www.elastic.co/downloads/kibana 使用 1.项目配置 在resources下的application.yml添加配置: logging : config : classpath : logback.xml file : ad - sponsor.log 在resources中添加 logback.xml,内容如下: < ? xml version = "1.0" encoding = "UTF-8" ? > < configuration > < ! -- appender

Windows 下 elasticsearch 安装全程

佐手、 提交于 2020-01-18 22:05:23
文章目录 准备工作 一、安装es 二、安装head插件 三、安装Node.js 四、安装grunt 五、安装ik分词器 六、安装Kinaba elasticsearch的安装,教程大多是Linux版的,对于Windows的朋友不太友好,我就写个Windows版安装全程吧 准备工作 Java 环境(es的运行需要java环境的支持,jdk1.8及以上,这部分教程很多,注意路径按流程配置即可) elasticsearch head插件 Node.js ik分词器 Kibana 一、安装es 1、官网下载 https://www.elastic.co/cn/downloads/ 这里也可以先同时下载Kibana,方便后续安装 ( 注意二者版本需一致 ) 2、es下载完成后解压即可,进入config目录修改elasticsearch.yml 注意:每行开头空一格," : " 后面空一格 3、接下来进入bin目录, 双击运行elasticsearch.bat, 浏览器打开 http://127.0.0.1:9200 出现以下界面说明安装成功 二、安装head插件 1、下载head插件zip包 https://github.com/mobz/elasticsearch-head 2、解压即可,放在自己方便的路径 三、安装Node.js 1、官网地址 https://nodejs.org/en

ELK简单学习

拟墨画扇 提交于 2020-01-18 19:18:54
ELK下载 https://www.elastic.co/cn/downloads/ Elasticsearch搭建 Elasticsearch 集群 Logstash搭建 因为没有真实的环境的,我就手动上传了两个log日志文件做测试使用 在Logstash/config下面新增一个配置文件config-log-1.conf input { # 从文件读取日志信息 输送到控制台 file { path => "/yangk/ELK/logs/2019-08-02.log" codec => "json" ## 以JSON格式读取日志 type => "elasticsearch" start_position => "beginning" } } output { # 标准输出 # stdout {} # 输出进行格式化,采用Ruby库来解析日志 stdout { codec => rubydebug } elasticsearch { #ES的复制 hosts => ["192.168.100.151:9201"] # 根据每天创建索引 index => "es-%{+YYYY.MM.dd}" } } 启动命令,到bin目录 ./logstash -f ../config/config-log-1.conf logstash启动很慢的,而且内存要配置大一点。不然会报错。启动不成功

Beats:如何使用Filebeat将MySQL日志发送到Elasticsearch

好久不见. 提交于 2020-01-18 05:12:36
在今天的文章中,我们来详细地描述如果使用Filebeat把MySQL的日志信息传输到Elasticsearch中。为了说明问题的方便,我们的测试系统的配置是这样的: 我有一台MacOS机器。在上面我安装了Elasticsearch及Kibana。在这个机器里,我同时安装了一个Ubuntu 18.04的虚拟机。在这个Ubunutu机器上,我安装了MySQL及Filebeat。它们的IP地址分别显示如上。针对你们自己的测试环境,你们的IP地址可能和我的不太一样。 准备工作 安装Elasticsearch 如果大家还没安装好自己的Elastic Stack的话,那么请按照我之前的教程“ 如何在Linux,MacOS及Windows上进行安装Elasticsearch ” 安装好自己的Elasticsearch。由于我们的Elastic Stack需要被另外一个Ubuntu VM来访问,我们需要对我们的Elasticsearch进行配置。首先使用一个编辑器打开在config目录下的elasticsearch.yml配置文件。我们需要修改network.host的IP地址。在你的Mac及Linux机器上,我们可以使用: $ ifconfig 来查看到我们的机器的IP地址。针对我的情况,我的机器的IP地址是:192.168.0.100。 我们也必须在elasticsearch

elasticsearch service stop after adding x-pack plugin [Failed to load plugin class [org.elasticsearch.xpack.XPackPlugin]

家住魔仙堡 提交于 2020-01-17 08:06:13
问题 I am using Elastic stack 5.1. I had elasticsearch and kibana installed with xpack installed on them, and they were working . I also installed logstash and beats, in the required order of installation. After installing beats, and after some changes in my company VPN and proxy, my elasticsearch and kibana stopped working, the service does not even start. I removed x-pack which got the ES and kibana to work, but again when I install x-pack, ES and kibana stop working. What should I do? The log

How can I safely move Elasticsearch indices to another mount in Linux?

只愿长相守 提交于 2020-01-17 06:36:10
问题 I'm having a number of indices which are actually causing some space issues at the moment in my Ubuntu machine. The indices keep growing on a daily basis. So I thought of moving it to another mount directory which has more space apparently. How can I do this safely? And I have to make sure that the existing ES indices and the Kibana graphs would be safe enough after the doing the move. What I did : Followed this SO and moved my data directory of Elasticsearch somehow to the directory (/data

docker-compose搭建单机多节点es + kibana

为君一笑 提交于 2020-01-16 08:58:42
docker-compose.yml配置如下: version: '2.2' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.7.1 container_name: esearch environment: - cluster.name=docker-cluster - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms512m -Xmx512m" restart: always ulimits: memlock: soft: -1 hard: -1 nofile: soft: 65536 hard: 65536 mem_limit: 1g cap_add: - IPC_LOCK volumes: - $PWD/esdata1:/usr/share/elasticsearch/data ports: - 9200:9200 networks: - esnet elasticsearch2: image: docker.elastic.co/elasticsearch/elasticsearch:6.7.1 container_name: elasticsearch2 environment: - cluster.name

windows系统安装运行filebeat

 ̄綄美尐妖づ 提交于 2020-01-16 08:57:25
1、安装docker前安装pip sudo yum -y install epel-release sudo yum install python-pip 2、安装docker #安装依赖包 yum install -y yum-utils device-mapper-persistent-data lvm2 #添加docker yum源 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo #可选操作:允许拓展最新的不稳定的repository yum-config-manager --enable docker-ce-edge #安装Docker yum -y install docker-ce #安装docker-compose sudo pip install -U docker-compose #启动Docker systemctl start docker 安装ELK: 1、下载镜像 这里我们使用elk集成镜像,地址: https://hub.docker.com/r/sebp/elk/tags [root@centos-mq ~]# docker pull sebp/elk:660 注:660为elk版本 2、启动 [root@centos-mq ~]