Hi,
I am fetching data from another database server.
data is fetching but not inserted into elastcisearch,
No error is showing in logstash cmd
Hi,
I am fetching data from another database server.
data is fetching but not inserted into elastcisearch,
No error is showing in logstash cmd
Hi @swati_dupare
Thank you for reaching out. I've moved you topic from kibana to logstash, since it's logstash related, could you add some details, e.g. your logstash pipeline configuration, this would help debugging your problem
Best,
Matthias
input {
jdbc {
jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://remote-ip-address:3306/testdb?serverTimezone=Asia/Kolkata"
jdbc_user => "root"
jdbc_password => "xxxx"
tracking_column => "unix_ts_in_secs"
use_column_value=>true
statement => "select * from user"
schedule => "0 */15 * * * *"
}
}
output {
elasticsearch {
document_type => "doc"
document_id=> "%{id}"
index => "testindex"
hosts => ["http://localhost:9200"]
}
stdout{
codec => rubydebug
}
}
so it's written to stdout, but not to Elasticsearch?
Means..?
Actually,If connect to localhost , it's working fine ,but when i trying to connect it to remote database server data is not pushed to elasticsearch
You're receiving the data from localhost successfully, so it's written into Elasticsearch. But it doesn't work when the database is remote? thx!
so, What I need to do.??
You need to make sure that logstash can connect to that remote db server, first you could check it it's possible to connect to the db instance without logstash.
Actually,when I run my logstash configuration file "select * from user" statement is executed and it shows data from remote server database in logstash cmd,but not pushing into elasticsearch
so i misunderstood this, it doesn't work when Elasticsearch is remote, just when local?
yes.. when connected to local, it's works properly.
then you should try if you can connect to your remote ES machine without logstash (e.g. with curl )
my logstash and elasticsearch are on same server only database which I am trying to connect is on another server
So the data is displayed in logstash (how?) but not stored in elasticsearch? could you try to remove document_id=> "%{id}"
to see if it works in this case?
thx
Yeah... It's working now.. issue with duplicate document ID.
Thanx
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.