当前位置:网站首页>Logstash+jdbc data synchronization +head display problems
Logstash+jdbc data synchronization +head display problems
2022-07-03 09:23:00 【Great you don't know】
Have a problem
- head UI Show only one piece of data , The index cannot be filtered
- reason : document_id => “%{user_id}” in user_id The reference tutorial has not been changed
- solve : According to its own primary key, it is changed into an object %{ The primary key of your own table }
- follow-up : What if multiple tables are synchronized ? - When the synchronization sql_last_value Has always been a 0, see logstash_jdbc_last_run And indeed 0
- reason : use_column_value=> false Is the default value , The reference tutorial is set to true
- solve : shielding use_column_value=> true - Example synchronization file :
input{
jdbc {
# jdbc_driver_library => "mysql-connector-java-5.1.44-bin.jar"
# drive
jdbc_driver_library => "/usr/local/soft/logstash-input-jdbc-master/lib/mysqljdbc-5.1.18.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://172.16.0.178:3308/mtp_dev"
jdbc_user => "mtp_dev"
jdbc_password => "mtp_dev"
jdbc_paging_enabled => "true"
jdbc_page_size => "1000"
jdbc_default_timezone =>"Asia/Shanghai"
schedule => "* * * * *"
statement => "SELECT * FROM user_sys_user where latest_time > :sql_last_value"
# record_last_run => true
# use_column_value=> false
tracking_column => "latest_time"
last_run_metadata_path => "./logstash_jdbc_last_run"
clean_run => "false"
}
}
output{
elasticsearch {
hosts => "172.16.0.94:9200"
user => "elastic"
password => "changme"
index => "sys_user"
document_id => "%{user_id}"
}
stdout {
codec => json_lines
}
}
边栏推荐
- 【Kotlin疑惑】在Kotlin类中重载一个算术运算符,并把该运算符声明为扩展函数会发生什么?
- C language programming specification
- LeetCode 57. Insert interval
- Beego learning - Tencent cloud upload pictures
- [set theory] order relation (chain | anti chain | chain and anti chain example | chain and anti chain theorem | chain and anti chain inference | good order relation)
- We have a common name, XX Gong
- [point cloud processing paper crazy reading frontier version 8] - pointview gcn: 3D shape classification with multi view point clouds
- Go language - IO project
- Instant messaging IM is the countercurrent of the progress of the times? See what jnpf says
- Jenkins learning (I) -- Jenkins installation
猜你喜欢

Temper cattle ranking problem

教育信息化步入2.0,看看JNPF如何帮助教师减负,提高效率?

【点云处理之论文狂读经典版8】—— O-CNN: Octree-based Convolutional Neural Networks for 3D Shape Analysis

Hudi 快速体验使用(含操作详细步骤及截图)

AcWing 785. 快速排序(模板)

Crawler career from scratch (II): crawl the photos of my little sister ② (the website has been disabled)
【毕业季|进击的技术er】又到一年毕业季,一毕业就转行,从动物科学到程序员,10年程序员有话说

剑指 Offer II 029. 排序的循环链表

2022-2-13 learning xiangniuke project - version control

Solve POM in idea Comment top line problem in XML file
随机推荐
浅谈企业信息化建设
Sword finger offer II 091 Paint the house
Explanation of the answers to the three questions
[graduation season | advanced technology Er] another graduation season, I change my career as soon as I graduate, from animal science to programmer. Programmers have something to say in 10 years
dried food! What problems will the intelligent management of retail industry encounter? It is enough to understand this article
The less successful implementation and lessons of RESNET
Vs2019 configuration opencv3 detailed graphic tutorial and implementation of test code
LeetCode 515. Find the maximum value in each tree row
一个优秀速开发框架是什么样的?
Go language - Reflection
LeetCode 57. Insert interval
Tag paste operator (#)
Jenkins learning (I) -- Jenkins installation
How to check whether the disk is in guid format (GPT) or MBR format? Judge whether UEFI mode starts or legacy mode starts?
网络安全必会的基础知识
2022-2-14 learning the imitation Niuke project - send email
Basic knowledge of network security
AcWing 787. 归并排序(模板)
Numerical analysis notes (I): equation root
低代码前景可期,JNPF灵活易用,用智能定义新型办公模式