kibana

How to import/export a dashboard in Kibana using a RESTful API

Deadly 提交于 2020-01-02 06:29:12
问题 I would like to use a HTTP method to post new dashboards to my local Kibana instance, but I couldn't find much documentation on using an API to do this. There was a pull request on Kibana that mentioned it was adding this functionality, but there was limited documentation on how to use it: https://github.com/elastic/kibana/pull/10858 An example of a dashboard I'm trying to post: { "_id": "12345678-1234-1234-1234-1234567890op", "_type": "dashboard", "_source": { "title": "my-app", "hits": 0,

分布式搜索引擎ElasticSearch+Kibana (Marvel插件安装详解)

无人久伴 提交于 2020-01-01 18:41:11
在安装插件的过程中,尤其是安装Marvel插件遇到了很多问题,要下载license、Marvel-agent,又要下载安装Kibana 版本需求 Java 7 or later Elasticsearch 2.4.2 Kibana 4.5 Elasticsearch License 2.4.2 plugin 系统版本是:CentOS release 6.6 一、简介 Marvel插件介绍 Marvel插件:在簇中从每个节点汇集数据。这个插件必须每个节点都得安装。 Marvel是Elasticsearch的管理和监控工具,在开发环境下免费使用。它包含了一个叫做Sense的交互式控制台,使用户方便的通过浏览器直接与Elasticsearch进行交互。 kibana 插件介绍 kibana 插件提供了Marvel监控的UI界面。 kibana是一个与elasticsearch一起工作的开源的分析和可视化的平台。使用kibana可以查询、查看并与存储在elasticsearch索引的数据进行交互操作。使用kibana能执行高级的数据分析,并能以图表、表格和地图的形式查看数据。 kibana使得理解大容量的数据变得非常容易。它非常简单,基于浏览器的接口使我们能够快速的创建和分享显示elasticsearch查询结果实时变化的仪表盘。 二、elasticsearch的简单安装 配置更新源

Kibana - How to extract fields from existing Kubernetes logs

纵饮孤独 提交于 2020-01-01 18:19:06
问题 I have a sort of ELK stack, with fluentd instead of logstash, running as a DaemonSet on a Kubernetes cluster and sending all logs from all containers, in logstash format, to an Elasticsearch server. Out of the many containers running on the Kubernetes cluster some are nginx containers which output logs of the following format: 121.29.251.188 - [16/Feb/2017:09:31:35 +0000] host="subdomain.site.com" req="GET /data/schedule/update?date=2017-03-01&type=monthly&blocked=0 HTTP/1.1" status=200 body

Build a Kibana Histogram with buckets dynamically created by ElasticSearch terms aggregation

无人久伴 提交于 2020-01-01 04:01:08
问题 I want to be able to combine the functionality of the Kibana Terms Graph (be able to create buckets based on uniqueness of values from a particular attribute) and Histogram Graph (separate data into buckets based on queries and then illustrate the date based on time). Overall, I want to create a Histogram, but I only want to create the Histogram based on the results of one query, not multiple queries like it's being done in the Kibana demo app. Instead, I want each bucket to be dynamically

docker部署elk日志采集系统(tcp方式)

不打扰是莪最后的温柔 提交于 2020-01-01 03:11:38
一、elk 概念 ELK是 Elasticsearch、Logstash、Kibana的简称,这三者是核心套件,但并非全部。 Elasticsearch :实时全文搜索和分析引擎,提供搜集、分析、存储数据三大功能。Elasticsearch是一套开放REST和JAVA API等结构提供高效搜索功能,可扩展的分布式系统。它构建于Apache Lucene搜索引擎库之上。 Logstash :用来搜集、分析、过滤日志的工具。它支持几乎任何类型的日志,包括系统日志、错误日志和自定义应用程序日志。它可以从许多来源接收日志,这些来源包括 syslog、消息传递(例如 RabbitMQ)和JMX,它能够以多种方式输出数据,包括电子邮件、websockets和Elasticsearch。 Kibana :基于Web的可视化图形界面,用于搜索、分析和可视化存储在 Elasticsearch指标中的日志数据。它利用Elasticsearch的REST接口来检索数据,不仅允许用户创建他们自己的数据的定制仪表板视图,还允许他们以特殊的方式查询和过滤数据。 二、docker 安装 elk 1、拉镜像,运行 docker pull sebp/elk docker run -d -it --name elk --restart always -p 5601:5601 -p 9200:9200 -p 5044

ubuntu搭建elk服务器

北城余情 提交于 2020-01-01 00:34:20
转载自:http://blog.topspeedsnail.com/archives/4825 如果是自己试验的性质,可考虑不装ssh。 Ubuntu 16.04 搭建 ELK 日志分析平台 我要搭建的ELK S tack图示: ELK服务器建议配置: 内存不少于4G CPU:2 Ubuntu 16.04 #1 安装Java JDK Elasticsearch和Logstash都是使用java写的,所以我们需要安装Java, Elasticsearch建议安装 Oracle Java 8(OpenJdk应该也行) : Ubuntu 16.04安装Java JDK #2 安装 Elasticsearch 导入 Elasticsearch的GPG公钥: 1 $ wget - qO - https : / / packages .elastic .co / GPG - KEY - elasticsearch | sudo apt - key add - 添加 Elasticsearch仓库源: 1 $ echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee - a / etc / apt / sources .list .d / elasticsearch - 2.x

Kibana query exact match

人走茶凉 提交于 2019-12-31 11:02:13
问题 I would like to know how to query a field to exactly match a string. I'm actually trying to query like this: url : "http://www.domain_name.com" Which returns all string starting with http://www.domain_name.com . 回答1: I had a similar issue, and ifound that ".raw" fixed it - in your example, try url.raw : "http://www.domain_name.com" 回答2: Just giving more visibility to @dezhi's comment. in newer version of ES(5.x, 6.x), you should use `url.keyword` instead, as they have changed to a new keyword

Elasticsearch index much larger than the actual size of the logs it indexed?

有些话、适合烂在心里 提交于 2019-12-31 10:04:30
问题 I noticed that elasticsearch consumed over 30GB of disk space over night. By comparison the total size of all the logs I wanted to index is only 5 GB...Well, not even that really, probably more like 2.5-3GB. Is there any reason for this and is there a way to re-configure it? I'm running the ELK stack. 回答1: There are a number of reasons why the data inside of Elasticsearch would be much larger than the source data. Generally speaking, Logstash and Lucene are both working to add structure to

elasticSearch 时间类型

天涯浪子 提交于 2019-12-30 20:33:30
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Elasticsearch Date类型使用技巧 elasticsearch原生支持date类型,结合该类型和Kibana可以做出漂亮有用的图表。这里简单记录下使用的方法。 使用date类型可以用如下两种方式: 使用毫秒的时间戳,直接将毫秒值传入即可。 传入格式化的字符串,默认是ISO 8601标准,例如2015-02-27T00:07Z(零时区)、2015-02-27T08:07+08:00(东八区),这两个时间实际是同一个,只是时区不同,关于时间戳,可以参见我之前的文章。另外还可以自定义时间格式,参见es的文档。但个人不建议使用自定义格式,设置不当容易遇到时区问题。在php中获取ISO 8601标准的时间很简单,date('c',time())即可。 elasticsearch默认会自动识别date类型,如果想关闭该功能,修改mapping的设置'date_detection' => false即可 。 elasticsearch原生支持date类型,json格式通过字符来表示date类型。所以在用json提交日期至elasticsearch的时候,es会隐式转换,把es认为是date类型的字符串直接转为date类型。至于什么样的字符串es会认为可以转换成date类型,参考elasticsearch官网介绍

【elasticsearch】数据早8小时Or晚8小时,你知道为什么吗,附解决方案

筅森魡賤 提交于 2019-12-30 20:32:33
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 前言 这篇文章,不会解释什么是本初子午线,只想以做实验的方式来理解数据差8小时的问题。下面就先说结论,再来谈原理。 解决方案 想必大家都很清楚:中国标准时间= UTC + 8小时。 那么所有和时区有关的地方,都有可能成为“凶手”。 如果是java写入es怎么解决时区问题? 如果你使用java程序来写入es,我推荐你写入带T的时间字符串。提供程序如下: /** * String timeZoneConvert = timeZoneConvert( * new Date().getTime() * , "yyyy-MM-dd'T'HH:mm:ss.SSSZ", * "Asia/Shanghai"); * * @param date 毫秒 * @param pattern format时间格式 * @param timeZone 时区 * @return 如:2019-12-30T16:32:07.616+0800 */ public static String timeZoneConvert(Long date,String pattern,String timeZone){ SimpleDateFormat simpleDateFormat=new SimpleDateFormat(pattern);