在elasticsearch中存储数据的行为就叫做索引(indexing),不过在索引之前,我们需要明确数据应该存储在哪里。

在elasticsearch中,文档归属于一种类型(type),而这些类型存在于索引(index)中,我们可以画一些简单的对比图来类比传统的关系型数据库。

  relation DB       --  Database ---   Tables    --    Rows    ---Coumns

  elasticsearch   --   Indices     ---    Types      --Documents--Fields

elasticsearch集群可以包含多个索引(indices)(数据库),每一个索引可以包含多个类型(types)(表),每一个类型包含多个文档(documents)(行),然后每个文档包含多个字段(Fields)(行).

ELK的整套解决方案如下:

其中Metrics主要用来监视CPU等系统资源消耗情况。具体安装操作如下:

一、安装metricbeat应用软件

二、导入beats-dashboards模板

A.在线安装时,运行如下命令:

./scripts/import_dashboards -es http://XXX:9200

B.离线安装时,运行如下命令:

./scripts/import_dashboards -file beats-dashboards-5.2.1.zip -es http://XXX:9200

参见:http://wangzhijian.blog.51cto.com/6427016/1878636

一、elasticsearch单机环境搭建

:elasticsearch对JDK版本这有严格的要求,一般建议安装Java: openjdk version  "1.8.0_xx"

配置ElasticSearch

tar -zxvf elasticsearch-5.2.2.tar.gz
cd elasticsearch-5.2.2

编辑ES的配置文件,修改以下配置项:

cluster.name=es_cluster
node.name=node0
path.data=/tmp/elasticsearch/data
path.logs=/tmp/elasticsearch/logs
#当前hostname或IP
network.host=XXX
network.port=9200
bootstrap.memory_lock: false
bootstrap.system_call_filter: false

 启动ES:

./bin/elasticsearch或nohup ./bin/elasticsearch &

  

打开页面IP:9200,将会看到以下内容:

或者使用命令:curl http://IP:9200来检查部署是否成功

集群安装请参见:http://yedward.net/post/416.html

安装过程中碰到的坑如下: http://blog.csdn.net/qq_21387171/article/details/53577115http://www.dajiangtai.com/community/18136.do

参数配置可以参见:bigbo.github.io/pages/2015/04/10/elasticsearch_config

另外在安装5.2.2版本时碰到一个报错及处理方式如下:

ERROR: bootstrap checks failed
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

解决措施如下:在elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面:

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

可以查看issues:https://github.com/elastic/elasticsearch/issues/22899

二、kibana安装

1、安装准备

tar -zxvf kibana-5.2.2.tar.gz

2、配置kibana

server.port: 5601 #监听的端口号
server.host: "172.18.12.XX" #Kibana服务的IP
elasticsearch.url: http://172.18.12.XX:9200 #es服务器的http访问路径
kibana.index: .kibana #kibana在es中的辅助索引名称

3、启动kibana

./bin/kibana

4、验证kibana是否安装成功

kibana安装成功后,通过ps -ef|grep kibana或者ps -ef|grep 5601都找不到,需要通过如下命令来检测:

fuser -n tcp 5601
kill -9 端口

检查http://IP:5601是否可以访问

kibana数据查询:totalTime: [500 TO *] AND monitorName: "KMID-M3001"

参见:http://hqiang.me/2015/08/flume配置导入kafkaelasticsearch/

flume+elasticsearch+kibana遇到的坑的更多相关文章

  1. 使用logstash+elasticsearch+kibana快速搭建日志平台

    日志的分析和监控在系统开发中占非常重要的地位,系统越复杂,日志的分析和监控就越重要,常见的需求有: * 根据关键字查询日志详情 * 监控系统的运行状况 * 统计分析,比如接口的调用次数.执行时间.成功 ...

  2. logstash+elasticsearch+kibana快速搭建日志平台

    使用logstash+elasticsearch+kibana快速搭建日志平台   日志的分析和监控在系统开发中占非常重要的地位,系统越复杂,日志的分析和监控就越重要,常见的需求有: 根据关键字查询日 ...

  3. 快速搭建应用服务日志收集系统(Filebeat + ElasticSearch + kibana)

    快速搭建应用服务日志收集系统(Filebeat + ElasticSearch + kibana) 概要说明 需求场景,系统环境是CentOS,多个应用部署在多台服务器上,平时查看应用日志及排查问题十 ...

  4. Logstash+ElasticSearch+Kibana处理nginx访问日志(转)

    ELK似乎是当前最为流行的日志收集-存储-分析的全套解决方案. 去年年初, 公司里已经在用, 当时自己还山寨了一个统计系统(postgresql-echarts, 日志无结构化, json形式存储到p ...

  5. (原)logstash-forwarder + logstash + elasticsearch + kibana

    [logstash-forwarder + logstash + elasticsearch + kibana]-------------------------------------------- ...

  6. 【转载】使用logstash+elasticsearch+kibana快速搭建日志平台

    原文链接:http://www.cnblogs.com/buzzlight/p/logstash_elasticsearch_kibana_log.html 日志的分析和监控在系统开发中占非常重要的地 ...

  7. 【最新】docker 安装elasticsearch + kibana步骤【第一篇_elasticsearch】

     最近在用docker 安装elasticsearch + kibana 遇到了很多坑,最后成功安装elasticsearch + kibana (6.8.1)版本   安装了一下午,现总结过程中遇到 ...

  8. elasticsearch kibana logstash(ELK)的安装集成应用

    官网关于kibana的学习指导网址是:https://www.elastic.co/guide/en/kibana/current/index.html Kibana是一个开源的分析和可视化平台,设计 ...

  9. 安装logstash,elasticsearch,kibana三件套

    logstash,elasticsearch,kibana三件套 elk是指logstash,elasticsearch,kibana三件套,这三件套可以组成日志分析和监控工具 注意: 关于安装文档, ...

随机推荐

  1. (纪录片)鸟瞰中国 China from Above

    简介: 类型: 纪录片官方网站: natgeotv.com/uk/china-from-above制片国家/地区: 美国语言: 英语集数: 2单集片长: 44分钟IMDb链接: tt4872012 主 ...

  2. 大量带BPM的跑步歌曲/跑步音乐下载

    20150110停止更新告知:不知不觉本帖更新有近半年了.从最开始跑步已经四年多,一直是听着音乐跑的,音乐支持.陪伴.丰富着我的跑步之旅.直到上个月因一次觉得音乐吵,我开始有意地摘掉耳机去跑步,并开始 ...

  3. phpstudy 开启apache反向代理

    vhosts.conf 1 2 3 4 5 6 7 8 9 10 11 <VirtualHost *:8080> ServerAdmin webmaster@dummy-host.exam ...

  4. 视图控制器生命周期中各个重要的方法(Swift) (Important Methods during the Lifecycle of a View Controller)

    1. init(coder:) 它是视图控制器从故事板创建实例的默认初始化函数.(It is the initializer for UIViewController instances create ...

  5. 【Ubuntu】Ubuntu网络配置DNS失效问题处理

    安装了Ubuntu Server版本,配置了静态IP地址,并配置了DNS.但重启之后,发现连接外网时候,还是存在问题. 找了一下,是DNS的问题. 可以这样处理: lifeccp@ubuntu:~/w ...

  6. 第九周(1) Word邮件合并2

    第九周(1) Word邮件合并2 教学时间 2013-4-22 教学课时 2 教案序号 15 教学目标 1.进一步掌握邮件合并的技巧和方法.2.利用邮件合并制作准考证.3.掌握在同一页生成多个记录的方 ...

  7. C++ 第三课:常量转义字符

    常量转义字符 以下的转义字符使普通字符表示不同的意义. 转义字符 描述 \' 单引号 \" 双引号 \\ 反斜杠 \0 空字符 \a 响铃 \b 后退 \f 走纸 \n 换行 \r 回车 \ ...

  8. 数据库中truncate与delete的区别与联系

    昨天被问到truncate与delete的区别,truncate没用过,回去百度了一下,才知道还有这个一种语句. truncate table命令将快速删除数据表中的所有记录(保留数据表结构).这种快 ...

  9. Python学习笔记_04:Django框架简介

    目录 1 什么是Django? 2 Django框架的开发环境搭建 3 Django操作MySql数据库简介 4 功能强大的Django管理工具应用 1 什么是Django? Django是应用于We ...

  10. 这是一份很详细的 Retrofit 2.0 使用教程(含实例讲解)(转)

    前言 在Andrroid开发中,网络请求十分常用 而在Android网络请求库中,Retrofit是当下最热的一个网络请求库 今天,我将献上一份非常详细Retrofit v2.0的使用教程,希望你们会 ...