当前位置:网站首页>Windows环境下的ELK——Logstash+Mysql(4)
Windows环境下的ELK——Logstash+Mysql(4)
2022-06-27 20:57:00 【有诗亦有远方】
一、JDBC
我们需要下载相应的 JDBC connector。
解压,将mysql-connector-java-8.0.18.jar放到logstash的jars目录中
F:\ELK\ELK8.2.3\logstash-8.2.3\logstash-core\lib\jars
二、准备数据
三、配置conf
在bin同级目录下创建mysql.conf
input {
jdbc {
#链接字符串
jdbc_connection_string => "jdbc:mysql://localhost:3306/elk_01?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai"
#用户
jdbc_user => "root"
#密码
jdbc_password => "123456"
jdbc_validate_connection => true
jdbc_driver_library => "F:/ELK/ELK8.2.3/logstash-8.2.3/logstash-core/lib/jars/mysql-connector-java-8.0.18.jar"
jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
parameters => {
"Product_id" => "Product1" }
statement => "SELECT * FROM SalesJan2009 WHERE Product = :Product_id"
}
}
filter {
mutate {
rename => {
"longitude" => "[location][lon]"
"latitude" => "[location][lat]"
}
}
}
output {
stdout {
}
elasticsearch {
index => "sales"
hosts => "119.3.20.91:9200"
document_type => "_doc"
}
}
四、运行conf
logstash.bat -f mysql.conf
边栏推荐
- Sentinel
- SQL Server 2016详细安装教程(附注册码和资源)
- 【剑指Offer】47. 礼物的最大价值
- Applet referer
- Livox lidar+apx15 real-time high-precision radar map reproduction and sorting
- 电子科大(申恒涛团队)&京东AI(梅涛团队)提出用于视频问答的结构化双流注意网络,性能SOTA!优于基于双视频表示的方法!
- Download versions such as typora 1.2.5
- NDSS 2022 接收的列表
- Bibliothèque d'exploitation / de développement locale open source pour l'outil de dessin en ligne hiplot
- 【Try to Hack】veil-evasion免杀
猜你喜欢
随机推荐
Discuz淘宝客网站模板/迪恩淘宝客购物风格商业版模板
c语言字符指针、字符串初始化问题
Spark BUG实践(包含的BUG:ClassCastException;ConnectException;NoClassDefFoundError;RuntimeExceptio等。。。。)
Aggregation and index optimization of mongodb basic operations
Hiplot 在线绘图工具的本地运行/开发库开源
2022年PMP项目管理考试敏捷知识点(3)
Spatial relation query and graph based query in secondary development of ArcGIS Engine
ClickOnce error deploying ClickOnce application - the reference in the manifest does not match the identity of the downloaded assembly
Open source of local run / development library of hiplot online drawing tool
图的存储结构
Redis principle - string
Discuz小鱼游戏风影传说商业GBK+UTF8版模板/DZ游戏网站模板
陈云pytorch学习笔记_用50行代码搭建ResNet
【tinyriscv verilator】分支移植到正点原子达芬奇开发板
云辅助隐私集合求交(Server-Aided PSI)协议介绍:学习
This year's examinees are more "desperate" than the college entrance examination
First principles (optimal solution theory)
上手了一个自然语言模型BLOOM
【Vim】使用教程,常用命令,高效使用Vim编辑器
Using the cucumber automated test framework










