Cannot sending data from mongodb into elasticsearch using logstash
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的更多相关文章
- 1125MySQL Sending data导致查询很慢的问题详细分析
-- 问题1 tablename使用主键索引反而比idx_ref_id慢的原因EXPLAIN SELECT SQL_NO_CACHE COUNT(id) FROM dbname.tbname FORC ...
- mysql索引无效且sending data耗时巨大原因分析
一朋友最近新上线一个项目,本地测试环境跑得好好的,部署到线上却慢得像蜗牛一样.后来查询了一下发现一个sql执行了16秒,有些长的甚至80秒.本地运行都是毫秒级别的查询.下面记录一下困扰了两天的,其中一 ...
- mysql 查询开销 sending data
1.执行一个查询,发现时间开销都在sending data,为什么?2.sending data容易误导,让人以为只是发送数据给客户端,实际上sending data包含两个过程:读取数据并处理,发送 ...
- 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 ...
- 基于netcore实现mongodb和ElasticSearch之间的数据实时同步的工具(Mongo2Es)
基于netcore实现mongodb和ElasticSearch之间的数据实时同步的工具 支持一对一,一对多,多对一和多对多的数据传输方式. 一对一 - 一个mongodb的collection对应一 ...
- MySQL Sending data导致查询很慢的问题详细分析【转载】
转自http://blog.csdn.net/yunhua_lee/article/details/8573621 [问题现象] 使用sphinx支持倒排索引,但sphinx从mysql查询源数据的时 ...
- 使用 Spring Data 进行 MongoDB 4.0 事务处理
使用 Spring Data 进行 MongoDB 4.0 事务处理 原文链接:http://spring.io/blog/2018/06/28/hands-on-mongodb-4-0-transa ...
- mysql查询sending data占用大量时间的问题处理
问题描述:某条sql语句在测试环境执行只需要1秒不到,到了生产环境执行需要8秒以上 在phpmyadmin里面执行性能分析,发现sending data占用了差不多90%以上的时间 查询一下“Send ...
- 【Big Data - ELK】ELK(ElasticSearch, Logstash, Kibana)搭建实时日志分析平台
摘要: 前段时间研究的Log4j+Kafka中,有人建议把Kafka收集到的日志存放于ES(ElasticSearch,一款基于Apache Lucene的开源分布式搜索引擎)中便于查找和分析,在研究 ...
随机推荐
- 使用java代码编辑oracle数据库
package com.hanqi; import java.io.IOException; import java.sql.Connection; import java.sql.DriverMan ...
- Unity5-CacheServer(资源平台切换之缓存服务器)的部署与使用
不管你是个人还是团队,如果你的资源很多, 而且经常切换平台, 那你试试这个吧~~兼职爽爆了,秒秒钟实现平台间的转换. cache server主要用于资源修改后的自动重新导入功能,保证所见即所得,方便 ...
- iis 搭建ftp
1.打开iis,添加FTP站点 2.在电脑上建立的FTP服务器别的电脑不能访问 关闭防火墙即可访问防火墙 程序员的基础教程:菜鸟程序员
- 在Linux(Ubuntu)下安装Arial、Times New Roman等字体
在Linux下做文档.作图的时候,可能需要用到Arial和Times New Roman等字体.但是由于版权问题,Linux一般是不直接提供这些字体的. 注意字体也是有版权的!不过有版权也不代表一定会 ...
- 四元数--结合《real time rendering》中关于四元数部分
四元数产生于1843年,是复数的一个扩展,所以里面包含了一些复数的运算.直到1985年才在图形学中使用. 四元数的优势是,相对与矩阵和欧拉角,四元数更直观和方便.四元数还可以用作某些方向上的插值,而欧 ...
- Java07
/* 定义一个类Demo,其中定义一个求两个数据和的方法, 定义一个测试了Test,进行测试. 变量什么时候定义为成员变量: 如果这个变量是用来描述这个类的信息的,那么,该变量就应该定义为成员变量. ...
- 布局xml文件不能预览
原因:xml文件里,有一些值没有设置属性. 如: <LinearLayout android:layout_width="fill_ ...
- 给力分享新的ORM => Dapper( 转)
出处:http://www.cnblogs.com/sunjie9606/archive/2011/09/16/2178897.html 最近一直很痛苦,想选一个好点的ORM来做项目,实在没遇到好的. ...
- java类加载器的一些测试
package classloader; import java.lang.reflect.Method; import org.junit.Test; import com.example.Samp ...
- java并发编程实战:第十二章---并发程序的测试
并发程序中潜在错误的发生并不具有确定性,而是随机的. 安全性测试:通常会采用测试不变性条件的形式,即判断某个类的行为是否与其规范保持一致 活跃性测试:进展测试和无进展测试两方面,这些都是很难量化的(性 ...