From a82091bf49f0443e3e3f18e22b22779f7e20ddec Mon Sep 17 00:00:00 2001 From: Haydar KULEKCI Date: Thu, 9 Aug 2018 10:55:25 +0300 Subject: [PATCH] updated log stash configuration --- .docker/logstash/conf/logstash.conf | 4 ++-- data/logstash.conf | 34 ----------------------------- docker-compose.yml | 3 ++- 3 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 data/logstash.conf diff --git a/.docker/logstash/conf/logstash.conf b/.docker/logstash/conf/logstash.conf index 7f87682..3626e4c 100644 --- a/.docker/logstash/conf/logstash.conf +++ b/.docker/logstash/conf/logstash.conf @@ -2,9 +2,9 @@ input { jdbc { jdbc_driver_library => "mysql-connector-java-5.1.36-bin.jar" jdbc_driver_class => "com.mysql.jdbc.Driver" - jdbc_connection_string => "jdbc:mysql://163.172.108.190:8989/node_es_example" + jdbc_connection_string => "jdbc:mysql://mysql:33060/node_es_example" jdbc_user => "root" - jdbc_password => "root" + jdbc_password => "123456" schedule => "* * * * *" statement => "CALL fetchDataForElastic(:sql_last_value);" } diff --git a/data/logstash.conf b/data/logstash.conf deleted file mode 100644 index 3839137..0000000 --- a/data/logstash.conf +++ /dev/null @@ -1,34 +0,0 @@ -input { - jdbc { - jdbc_driver_library => "mysql-connector-java-5.1.36-bin.jar" - jdbc_driver_class => "com.mysql.jdbc.Driver" - jdbc_connection_string => "jdbc:mysql://127.0.0.1:3306/node_es_example" - jdbc_user => "root" - jdbc_password => "" - schedule => "* * * * *" - statement => "CALL fetchDataForElastic(:sql_last_value);" - } -} - -filter { - json { - source => "categories" - target => "categories" - } - mutate { remove_field => [ "@version", "@timestamp" ] } -} - -output { - stdout - { - codec => rubydebug - } - - elasticsearch - { - hosts => ["elasticsearch:9200"] - index => "products" - document_type => "product" - document_id => "%{id}" - } -} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 6c7ab44..5a1ead6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,12 +32,13 @@ services: - "5044:5044" links: - elasticsearch + - mysql mysql: image: "mysql:5.7.19" restart: always ports: - - "33060:3306" + - "33060:33060" environment: MYSQL_ROOT_PASSWORD: "123456" volumes: