質問編集履歴

2

参考にした記事を追加

2018/11/06 09:00

投稿

taikishiino
taikishiino

スコア13

test CHANGED
File without changes
test CHANGED
@@ -85,3 +85,13 @@
85
85
  そもそもの理解が不足しているため、漠然とした質問となってしまいましたmm
86
86
 
87
87
  LogStashでMySQLのデータからElasticSearchへのインポートの手順がわかる方いらっしゃいましたら、教えていただけると幸いでございます。よろしくお願い致します。
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ 【参考にした記事】
96
+
97
+ https://medium.com/veltra-engineering/logstash-mysql-elasticsearch-f2c1165801d

1

.confのパス名を変更

2018/11/06 09:00

投稿

taikishiino
taikishiino

スコア13

test CHANGED
File without changes
test CHANGED
@@ -26,13 +26,13 @@
26
26
 
27
27
  jdbc_driver_class => "com.mysql.jdbc.Driver"
28
28
 
29
- jdbc_connection_string => "jdbc:mysql://localhost:3306/redish-development"
29
+ jdbc_connection_string => "jdbc:mysql://localhost:3306/[db名]"
30
30
 
31
31
  jdbc_user => "root"
32
32
 
33
33
  jdbc_password =>
34
34
 
35
- statement => "SELECT * FROM merchants"
35
+ statement => "SELECT * FROM [table名]"
36
36
 
37
37
  type => "jdbc-mysql-processlist"
38
38
 
@@ -42,7 +42,7 @@
42
42
 
43
43
  output {
44
44
 
45
- if [type] == "merchants" {
45
+ if [type] == "[table名]" {
46
46
 
47
47
  elasticsearch {
48
48
 
@@ -50,7 +50,7 @@
50
50
 
51
51
  hosts => ["localhost:9200"]
52
52
 
53
- index => "merchants"
53
+ index => "[table名]"
54
54
 
55
55
  document_type => "%{type}"
56
56