Hello,
I am trying to create a daily index to fetch data from Cassandra DB using JDBC driver logstash.
As soon it creates a new index with new date it is again pulling the whole data , which is already available in yesterday's index. Here is my conf File:
input{
jdbc{
# mysql jdbc connection string to our backup databse
jdbc_connection_string => "jdbc:cassandra://10.113.213.167:9042/imi_datamartdb"
# the user we wish to excute our statement as
jdbc_user => "elk_user"
jdbc_password => "Zsw2@Mji9@elk"
# the path to our downloaded jdbc driver
jdbc_driver_library => "/opt/CassandraJdbcDriver/cassandrajdbc1.1.jar"
# the name of the driver class for mysql
jdbc_driver_class => "com.dbschema.CassandraJdbcDriver"
# the control statement
#record_last_run=>true
#type => "product"
statement => "SELECT * FROM imi_datamartdb.server_performance where time_stamp > :sql_last_value ALLOW Filtering"
use_column_value => true
tracking_column => "time_stamp"
record_last_run => true
schedule => "*/5 * * * *"
clean_run => true
last_run_metadata_path => "/opt/elk/.logstash_jdbc_last_run"
}
}
filter{ }
output
{
if [kpi_name] in ["DiskFilesystemUtilization","CpuUtilization","MemoryUtilization"]{
elasticsearch{
#protocol => https
index => "imiperformance-%{+YYYY.MM.dd}"
}
Could you please suggest on this.