提问要多花一点心思哦

社区日报 第143期 (2017-12-27)

1. elasticsearch recovery 分析
http://t.cn/RH5T64q
2. elasticsearch aggregations 聚合分析
http://t.cn/RH5TCdm
3. logstash-output-jdbc 插件 支持hbase(phoenix)
http://t.cn/RH5HPeD
 
编辑:江水
归档:https://elasticsearch.cn/article/436 
订阅:https://tinyletter.com/elastic-daily  
继续阅读 »
1. elasticsearch recovery 分析
http://t.cn/RH5T64q
2. elasticsearch aggregations 聚合分析
http://t.cn/RH5TCdm
3. logstash-output-jdbc 插件 支持hbase(phoenix)
http://t.cn/RH5HPeD
 
编辑:江水
归档:https://elasticsearch.cn/article/436 
订阅:https://tinyletter.com/elastic-daily  
收起阅读 »

社区日报 第142期 (2017-12-26)

1.如何使用Grafana从Elasticsearch中拉取数据。
http://t.cn/RH2FFXU 
2.基于Elasticsearch的沪江搜索平台。
http://t.cn/RHLZSEk 
3.使用Elasticsearch的五个结论。
http://t.cn/RHLwxM8 
4.Elastic Advent Calendar, Day 25:Elastic Advent Calendar最后一文,一些众所周知的权威建议。
http://t.cn/RHLyzo4 

编辑:叮咚光军
归档:https://elasticsearch.cn/article/435 
订阅:https://tinyletter.com/elastic-daily  
 
继续阅读 »
1.如何使用Grafana从Elasticsearch中拉取数据。
http://t.cn/RH2FFXU 
2.基于Elasticsearch的沪江搜索平台。
http://t.cn/RHLZSEk 
3.使用Elasticsearch的五个结论。
http://t.cn/RHLwxM8 
4.Elastic Advent Calendar, Day 25:Elastic Advent Calendar最后一文,一些众所周知的权威建议。
http://t.cn/RHLyzo4 

编辑:叮咚光军
归档:https://elasticsearch.cn/article/435 
订阅:https://tinyletter.com/elastic-daily  
  收起阅读 »

社区搜索试运行

访问地址:
https://index.elasticsearch.cn

badge.png

 
姑且叫做:Elastic 情报局!
这个东西有什么用?
聚合 Elastic 社区的各种资源,
  • Elastic 官网资料、文档、博客、视频
  • Elastic 中文社区
  • Elastic 英文社区
  • Github 仓库的最新事件
  • 其他社区的相关主题,如 StackOverflow、Reddit等

用来提供一站式的垂直搜索,
方便提供您更好的学习和寻找参考资料。

Snip20171225_3.png

 
基于开源爬虫 GOPAElasticsearch 搭建,目前试运行,功能和数据正在完善中,欢迎反馈。
继续阅读 »
访问地址:
https://index.elasticsearch.cn

badge.png

 
姑且叫做:Elastic 情报局!
这个东西有什么用?
聚合 Elastic 社区的各种资源,
  • Elastic 官网资料、文档、博客、视频
  • Elastic 中文社区
  • Elastic 英文社区
  • Github 仓库的最新事件
  • 其他社区的相关主题,如 StackOverflow、Reddit等

用来提供一站式的垂直搜索,
方便提供您更好的学习和寻找参考资料。

Snip20171225_3.png

 
基于开源爬虫 GOPAElasticsearch 搭建,目前试运行,功能和数据正在完善中,欢迎反馈。 收起阅读 »

社区日报 第141期 (2017-12-25)

1.XPack 6的改动:移除了默认密码。
http://t.cn/RHAyUPV

2.如何构建一个搜索UI。
http://t.cn/RToO9aU

3.使用ELK监控Spark集群。
http://t.cn/RHAA6Me

4.(德语)Elastic Advent Calendar, Day 24:  用Elasticsearch和Kibana进行数据探索
http://t.cn/RHAZZbV 

编辑:cyberdak
归档:https://elasticsearch.cn/article/433
订阅:https://tinyletter.com/elastic-daily
 
继续阅读 »
1.XPack 6的改动:移除了默认密码。
http://t.cn/RHAyUPV

2.如何构建一个搜索UI。
http://t.cn/RToO9aU

3.使用ELK监控Spark集群。
http://t.cn/RHAA6Me

4.(德语)Elastic Advent Calendar, Day 24:  用Elasticsearch和Kibana进行数据探索
http://t.cn/RHAZZbV 

编辑:cyberdak
归档:https://elasticsearch.cn/article/433
订阅:https://tinyletter.com/elastic-daily
  收起阅读 »

社区日报 第140期 (2017-12-24)

1.宣布Kibana比赛的胜者。
http://t.cn/RHhL7ss
2.(自备梯子)用Zipkin和Kibana跟踪微服务。
http://t.cn/RHPkfsi
3.(自备梯子)Apache Kafka的区块链实验。
http://t.cn/RHPsx09
4.(英语)Elastic Advent Calendar, Day 23:  新用户的Kibana小贴士
http://t.cn/RHhAlGm

编辑:至尊宝
归档:https://elasticsearch.cn/article/432
订阅:https://tinyletter.com/elastic-daily
继续阅读 »
1.宣布Kibana比赛的胜者。
http://t.cn/RHhL7ss
2.(自备梯子)用Zipkin和Kibana跟踪微服务。
http://t.cn/RHPkfsi
3.(自备梯子)Apache Kafka的区块链实验。
http://t.cn/RHPsx09
4.(英语)Elastic Advent Calendar, Day 23:  新用户的Kibana小贴士
http://t.cn/RHhAlGm

编辑:至尊宝
归档:https://elasticsearch.cn/article/432
订阅:https://tinyletter.com/elastic-daily 收起阅读 »

Elasticsearch关于unassigned shards修复

ES 版本: 5.2.1

步骤:

  • curl localhost:9200/_cat/shards > shards
  • 跑脚本:nohup python recovery.py &

    注意:跑脚本过程会返回大量json,时间较长,请注意放入后台

  • 查看修复shard进度:curl 127.0.0.1:9200/_cat/recovery/你修复shard对应的索引
  • 结果: 找到索引对应的shard,看到existing_store done说明已经从本地修复
     index 19 268ms existing_store done n/a        n/a                    10.0.58.67 node_name
#!/usr/bin/env python
#name: recovery.py

import requests
import json
host = "http://localhost:9200/_cluster/allocation/explain"
s= requests.Session()
def reroute_shard(index,shard,node):
    data = {
    "commands" : [
        {
          "allocate_stale_primary" : {
              "index" : index, "shard" : shard, "node" : node, "accept_data_loss": True
          }
        }
    ]
   }
    print data
    url = "http://localhost:9200/_cluster/reroute"
    res = s.post(url,json=data)
    print res

def get_node(line):
    if "UNASSIGNED" in line:
        line = line.split()
        index = line[0]
        shard = line[1]
        if line[2] != "p":
            return
        body = {
           "index": index,
           "shard": shard,
           "primary": True
               }
        res = s.get(host, json = body)
        for store in res.json().get("node_allocation_decisions"):
            if store.get("store").get("allocation_id"):
               node_name = store.get("node_name")
               reroute_shard(index,shard,node_name)
    else:
        return

with open("shards", 'rb') as f:
    map(get_node,f)

相关文档:

继续阅读 »

ES 版本: 5.2.1

步骤:

  • curl localhost:9200/_cat/shards > shards
  • 跑脚本:nohup python recovery.py &

    注意:跑脚本过程会返回大量json,时间较长,请注意放入后台

  • 查看修复shard进度:curl 127.0.0.1:9200/_cat/recovery/你修复shard对应的索引
  • 结果: 找到索引对应的shard,看到existing_store done说明已经从本地修复
     index 19 268ms existing_store done n/a        n/a                    10.0.58.67 node_name
#!/usr/bin/env python
#name: recovery.py

import requests
import json
host = "http://localhost:9200/_cluster/allocation/explain"
s= requests.Session()
def reroute_shard(index,shard,node):
    data = {
    "commands" : [
        {
          "allocate_stale_primary" : {
              "index" : index, "shard" : shard, "node" : node, "accept_data_loss": True
          }
        }
    ]
   }
    print data
    url = "http://localhost:9200/_cluster/reroute"
    res = s.post(url,json=data)
    print res

def get_node(line):
    if "UNASSIGNED" in line:
        line = line.split()
        index = line[0]
        shard = line[1]
        if line[2] != "p":
            return
        body = {
           "index": index,
           "shard": shard,
           "primary": True
               }
        res = s.get(host, json = body)
        for store in res.json().get("node_allocation_decisions"):
            if store.get("store").get("allocation_id"):
               node_name = store.get("node_name")
               reroute_shard(index,shard,node_name)
    else:
        return

with open("shards", 'rb') as f:
    map(get_node,f)

相关文档:

收起阅读 »

社区日报 第139期 (2017-12-23)

1、iPrice集团使用elasticsearch集群经验分享
http://t.cn/RTkTb0f
2、使用Elassandra(Elasticsearch+Apache  Cassandra)进行NBA球员数据探索
http://t.cn/RTkT7SV
3、如何使用kibana基于时间序列的Visual  Builder展示数据
http://t.cn/RTkJX5s
4、Elastic Advent Calendar Day 22:忘记elastic密码的解决办法
http://t.cn/RTkWoRR

编辑:bsll
归档:https://elasticsearch.cn/article/430
订阅:https://tinyletter.com/elastic-daily
继续阅读 »
1、iPrice集团使用elasticsearch集群经验分享
http://t.cn/RTkTb0f
2、使用Elassandra(Elasticsearch+Apache  Cassandra)进行NBA球员数据探索
http://t.cn/RTkT7SV
3、如何使用kibana基于时间序列的Visual  Builder展示数据
http://t.cn/RTkJX5s
4、Elastic Advent Calendar Day 22:忘记elastic密码的解决办法
http://t.cn/RTkWoRR

编辑:bsll
归档:https://elasticsearch.cn/article/430
订阅:https://tinyletter.com/elastic-daily 收起阅读 »

社区日报 第138期 (2017-12-22)

1、 NMAP扫描结果同步到Elasticsearch
http://t.cn/R94eGiz
2、elasticsearch对gmail建立索引?
http://t.cn/RZbYIug
3、es6.1的变化清单
http://t.cn/RTS7BcU
4、Elastic Advent Calendar Day 21:高性能Elasticsearch建议
http://t.cn/RTezts5

编辑:铭毅天下
归档:https://elasticsearch.cn/article/429
订阅:https://tinyletter.com/elastic-daily
继续阅读 »
1、 NMAP扫描结果同步到Elasticsearch
http://t.cn/R94eGiz
2、elasticsearch对gmail建立索引?
http://t.cn/RZbYIug
3、es6.1的变化清单
http://t.cn/RTS7BcU
4、Elastic Advent Calendar Day 21:高性能Elasticsearch建议
http://t.cn/RTezts5

编辑:铭毅天下
归档:https://elasticsearch.cn/article/429
订阅:https://tinyletter.com/elastic-daily 收起阅读 »

Filebeat使用的若干问题

1、日志文件是json格式(对应ES的索引的字段),如果输出到ES,那么对应ES的格式数据(mapping)应该怎么定义,放到哪个目录,怎么引用。
 
2、为了方便我每条日志生成一个文件,这样文件多了会不会影响Filebeat的性能。
 
3、接第2问怎么配置可以“读取并输出成功”就删除该日志文件。
继续阅读 »
1、日志文件是json格式(对应ES的索引的字段),如果输出到ES,那么对应ES的格式数据(mapping)应该怎么定义,放到哪个目录,怎么引用。
 
2、为了方便我每条日志生成一个文件,这样文件多了会不会影响Filebeat的性能。
 
3、接第2问怎么配置可以“读取并输出成功”就删除该日志文件。 收起阅读 »

社区日报 第137期 (2017-12-21)

1.如何将CSV文件导入Elasticsearch并使用Hive运行SQL查询
http://t.cn/RTBFA3B
2.关于elastic stack 6,你必须知道的事情
http://t.cn/RTBgYrd
3.elasticsearch relevance scoring 检索相关性计算
http://t.cn/RTr7PNT
4.Elastic Advent Calendar Day 20, 使用Elasticsearch和Gopa快速构建属于自己的Google 
http://t.cn/RTmW1XF

编辑:金桥
归档:https://elasticsearch.cn/article/427
订阅: https://tinyletter.com/elastic-daily
继续阅读 »
1.如何将CSV文件导入Elasticsearch并使用Hive运行SQL查询
http://t.cn/RTBFA3B
2.关于elastic stack 6,你必须知道的事情
http://t.cn/RTBgYrd
3.elasticsearch relevance scoring 检索相关性计算
http://t.cn/RTr7PNT
4.Elastic Advent Calendar Day 20, 使用Elasticsearch和Gopa快速构建属于自己的Google 
http://t.cn/RTmW1XF

编辑:金桥
归档:https://elasticsearch.cn/article/427
订阅: https://tinyletter.com/elastic-daily 收起阅读 »

社区日报 第136期 (2017-12-20)

1. druid vs elasticsearch(旧闻)
http://t.cn/RTmtXBL 
2. elasticsearch 5.x 字段折叠的使用
http://t.cn/RTn0hJO
3. (英文)Elastic Advent Calendar, Day 19: 用 Elastic Stack 监控 Kubernetes
http://t.cn/RTmcU1S

编辑:江水
归档:https://elasticsearch.cn/article/426
订阅:https://tinyletter.com/elastic-daily 

 
继续阅读 »
1. druid vs elasticsearch(旧闻)
http://t.cn/RTmtXBL 
2. elasticsearch 5.x 字段折叠的使用
http://t.cn/RTn0hJO
3. (英文)Elastic Advent Calendar, Day 19: 用 Elastic Stack 监控 Kubernetes
http://t.cn/RTmcU1S

编辑:江水
归档:https://elasticsearch.cn/article/426
订阅:https://tinyletter.com/elastic-daily 

  收起阅读 »

社区日报 第135期 (2017-12-19)

1.ElasticSearch Bulk 源码解析。
http://t.cn/RTYMZn8 
2.Elasticsearch 5.X集群多节点角色配置深入详解。
http://t.cn/RTY62ym 
3.使用JestClient连接elasticsearch-5.x对数据进行分组聚合。
http://t.cn/RTQbUhu 
4.(韩语)Elastic Advent Calendar, Day 18:解析Doc Value的魔法。
http://t.cn/RTYN1n8 

编辑:叮咚光军
归档:https://elasticsearch.cn/article/425 
订阅:https://tinyletter.com/elastic-daily  
 
继续阅读 »
1.ElasticSearch Bulk 源码解析。
http://t.cn/RTYMZn8 
2.Elasticsearch 5.X集群多节点角色配置深入详解。
http://t.cn/RTY62ym 
3.使用JestClient连接elasticsearch-5.x对数据进行分组聚合。
http://t.cn/RTQbUhu 
4.(韩语)Elastic Advent Calendar, Day 18:解析Doc Value的魔法。
http://t.cn/RTYN1n8 

编辑:叮咚光军
归档:https://elasticsearch.cn/article/425 
订阅:https://tinyletter.com/elastic-daily  
  收起阅读 »

logstash date不支持BJT时区


人生日历截图20171218102703.png

收集网络设备的日志,但是格式不统一,很苦恼,而且仅仅时间戳格式就有快10种不同格式,测试发现date不支持BJT时区

人生日历截图20171218102703.png

收集网络设备的日志,但是格式不统一,很苦恼,而且仅仅时间戳格式就有快10种不同格式,测试发现date不支持BJT时区

社区日报 第134期 (2017-12-18)

1.Elastic 现在提供14天的ELK Stack云服务试用,还在犹豫不决的同学快来体验吧。
http://t.cn/RTlWVit

2.filebeat 5.X关于使用通配符的性能讨论。
http://t.cn/RTlEsRp

3.(英语)Elastic Advent Calendar, Day 17:  运维Elastic Cloud Enterprise的各种要点
http://t.cn/RTlTIYF 

编辑:cyberdak
归档:https://elasticsearch.cn/article/423
订阅:https://tinyletter.com/elastic-daily
 
继续阅读 »
1.Elastic 现在提供14天的ELK Stack云服务试用,还在犹豫不决的同学快来体验吧。
http://t.cn/RTlWVit

2.filebeat 5.X关于使用通配符的性能讨论。
http://t.cn/RTlEsRp

3.(英语)Elastic Advent Calendar, Day 17:  运维Elastic Cloud Enterprise的各种要点
http://t.cn/RTlTIYF 

编辑:cyberdak
归档:https://elasticsearch.cn/article/423
订阅:https://tinyletter.com/elastic-daily
  收起阅读 »

社区日报 第133期 (2017-12-17)

1.使用ELK监控OpenStack。
http://t.cn/RTpfMIR
2.(自备梯子)在Kubernetes上使用ELK记录日志。
http://t.cn/RTpMOnw
3.(自备梯子)算法是新的药物。
http://t.cn/RTpiSiE
4.(法语)Elastic Advent Calendar, Day 16:  Elasticsearch插件的测试表现
http://t.cn/RTpJjwF

编辑:至尊宝
归档:https://elasticsearch.cn/article/422
订阅:https://tinyletter.com/elastic-daily
继续阅读 »
1.使用ELK监控OpenStack。
http://t.cn/RTpfMIR
2.(自备梯子)在Kubernetes上使用ELK记录日志。
http://t.cn/RTpMOnw
3.(自备梯子)算法是新的药物。
http://t.cn/RTpiSiE
4.(法语)Elastic Advent Calendar, Day 16:  Elasticsearch插件的测试表现
http://t.cn/RTpJjwF

编辑:至尊宝
归档:https://elasticsearch.cn/article/422
订阅:https://tinyletter.com/elastic-daily 收起阅读 »