how to connect cassandra with logstash input?

一世执手 提交于 2019-12-13 07:32:29

问题


Logstash.conf

input { tcp { port => 7199 } } output { elasticsearch { hosts => ["localhost"] } }

Cassandra running on 7199 port and jhipster application running on localhost:8080. we are unable to add into logstash by my_application

No log4j2 file found.


回答1:


I think you can use the JDBC plugin:

https://github.com/logstash-plugins/logstash-input-jdbc

input {
   jdbc {
      jdbc_connection_string => "jdbc:cassandra://hostname:XXXX" # Your port
      jdbc_user => "user" # The user value
      jdbc_password => "password" # The password
      jdbc_driver_library => "$PATH/cassandra_driver.jar" # Jar path
      jdbc_driver_class => "org.apache.cassandra.cql.jdbc.CassandraDriver" # Driver
      statement => "SELECT * FROM keyspace.my_table" # Your query
   }
}


来源:https://stackoverflow.com/questions/46219027/how-to-connect-cassandra-with-logstash-input

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!