Question:

Hi all, i have an issue when i try to get data from mongodb to elasticsearch using logstash-input-mongodb. There is no document that get into elastic but when i stdout using rubydebug, logstash show me the documents in mongodb. After that i check the indices in elastic, they create the index but there is no document. 0 Doc in index that i created.

This my configuration file:

input {
mongodb {
uri => 'mongodb://***:*********@localhost:27017/logs'
placeholder_db_dir => 'E:\ELK\logstash-5.5.0\db_dir'
placeholder_db_name => 'logstash_sqlite.db'
collection => 'tx_log'
batch_size => 5000
generateId => 'true'
parse_method => "simple"
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "tx_logs"
}
stdout { codec => rubydebug }
}

and this is some output from logstash console after they print the data on the console:
s
D, [2017-09-18T14:20:16.807000 #26876] DEBUG -- : MONGODB | localhost:27017 | logs.listCollections | STARTED | {"listCollections"=>1, "cursor"=>{}, "filter"=>{:name=>{"$not"=>/system.|$/}}}
D, [2017-09-18T14:20:16.812000 #26876] DEBUG -- : MONGODB | localhost:27017 | gosdev_logs.listCollections | SUCCEEDED | 0.004s

and it looping forever.
Thanks

Answer:
so ladies and gentlemen, i already solved this problem. just add this filter:

filter {
mutate {
remove_field => [ "_id" ]
}
}

because, logstash generate mongo_id and _id with the same value

Cannot sending data from mongodb into elasticsearch using logstash的更多相关文章

  1. 1125MySQL Sending data导致查询很慢的问题详细分析

    -- 问题1 tablename使用主键索引反而比idx_ref_id慢的原因EXPLAIN SELECT SQL_NO_CACHE COUNT(id) FROM dbname.tbname FORC ...

  2. mysql索引无效且sending data耗时巨大原因分析

    一朋友最近新上线一个项目,本地测试环境跑得好好的,部署到线上却慢得像蜗牛一样.后来查询了一下发现一个sql执行了16秒,有些长的甚至80秒.本地运行都是毫秒级别的查询.下面记录一下困扰了两天的,其中一 ...

  3. mysql 查询开销 sending data

    1.执行一个查询,发现时间开销都在sending data,为什么?2.sending data容易误导,让人以为只是发送数据给客户端,实际上sending data包含两个过程:读取数据并处理,发送 ...

  4. C# Sending data using GET or POST ZZ

    In this short article, I'll show you how to send data to a website from a C# application using GET o ...

  5. 基于netcore实现mongodb和ElasticSearch之间的数据实时同步的工具(Mongo2Es)

    基于netcore实现mongodb和ElasticSearch之间的数据实时同步的工具 支持一对一,一对多,多对一和多对多的数据传输方式. 一对一 - 一个mongodb的collection对应一 ...

  6. MySQL Sending data导致查询很慢的问题详细分析【转载】

    转自http://blog.csdn.net/yunhua_lee/article/details/8573621 [问题现象] 使用sphinx支持倒排索引,但sphinx从mysql查询源数据的时 ...

  7. 使用 Spring Data 进行 MongoDB 4.0 事务处理

    使用 Spring Data 进行 MongoDB 4.0 事务处理 原文链接:http://spring.io/blog/2018/06/28/hands-on-mongodb-4-0-transa ...

  8. mysql查询sending data占用大量时间的问题处理

    问题描述:某条sql语句在测试环境执行只需要1秒不到,到了生产环境执行需要8秒以上 在phpmyadmin里面执行性能分析,发现sending data占用了差不多90%以上的时间 查询一下“Send ...

  9. 【Big Data - ELK】ELK(ElasticSearch, Logstash, Kibana)搭建实时日志分析平台

    摘要: 前段时间研究的Log4j+Kafka中,有人建议把Kafka收集到的日志存放于ES(ElasticSearch,一款基于Apache Lucene的开源分布式搜索引擎)中便于查找和分析,在研究 ...

随机推荐

  1. kubelet disk 压力

    systemctl stop docker mv /var/lib/docker /data/lib ln -s /data/lib/docker /var/lib/docker systemctl ...

  2. 2015年传智播客JavaEE 第168期就业班视频教程17-登录功能业务逻辑实现(代码)

    点击红色在业务层接口EmpEbi创建方法login 按F4弹出类继承层次视图 这些快捷键是条件反射了. 业务层做MD5数据加密,不能放在表现层也不能放在数据层必须放在业务层.它属于业务操作. 数据层的 ...

  3. 77. Combinations (Recursion)

    Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For exampl ...

  4. jquery获得/修改html标签

    1.添加 meta$("head").append('<meta http-equiv="content-type" content="text ...

  5. oracle 分页其实一个子查询就好了,没理解的自然只能见样学样

    .首先rownum是一个查询缓存级别的东西,所以以下写法是错误的 ; 因为rn其实不是student表的内容,看做一个缓存编号就好 但是有些人不服了,加个a.rn<= ;结果还是不行,这下相信了 ...

  6. [.NET] WeakReference的使用

    声明:本篇博客翻译自:http://tipsandtricks.runicsoft.com/CSharp/WeakReferences.html 由于水平(技术水平+英语理解能力)有限/不足,肯定会有 ...

  7. docker跨主机互联

    以下内容只是命令,原理自行百度,google或者官方查阅! 方案一.overlay Consul 三台主机为例(都要安装docker): 192.168.20.20(consul服务) 192.168 ...

  8. R语言中 fitted()和predict()的区别

    fitted是拟合值,predict是预测值.模型是基于给定样本的值建立的,在这些给定样本上做预测就是拟合.在新样本上做预测就是预测. 你可以找一组数据试试,结果如何. fit<-lm(weig ...

  9. 分布式事务,EventBus 解决方案:CAP【中文文档】(转)

    出处:http://www.cnblogs.com/savorboard/p/cap-document.html 前言 很多同学想对CAP的机制以及用法等想有一个详细的了解,所以花了将近两周时间写了这 ...

  10. linux上chrome、vlc等程序root不能运行的解决办法

    which vlc 或者 whereis vlc 输入/geteuid,输入i进入输入模式,将geteuid改成getppid,然后ESC,输入wq,保存退出,这样程序root用户就可以运行了. ch ...