How does one know if a scheduled logstash upload went through to the index on ES?
For example, lets say I have a conf file that is scheduled to upload data from a mysql database to an ElasticSearch index daily. If one day, the logstash upload didn't go through, is there some kind of notification setting built in logstash or do I have to code something manually to warn me about this potential situation.
Ok. Is there a way for the timestamps for newly added rows in the mysql tables to dynamically change everyday so we can just keep logstash conf file running and not have to manually change the timestamp on the sql statement in the conf file?
It sounds like you should be using the sql_last_value parameter to keep track of which rows Logstash has processed and only select new rows, but you're not providing much details about your setup.
Ok. Right now I just set up a simple test using current_timestamp method to import newly added sql rows into Elasticsearch index using logstash every 10 minutes. So right now I am adding new rows of information with a timestamp and logstash is able to successfully upload the new data into the same existing Elasticsearch index.
I am curious to know if logstash fails between a scheduled session, is there a way to load the old (past 10 minutes) and new data (new 10 minutes) to Elasticsearch index in the conf file?
I don't think you understand the point of the sql_last_value parameter. The idea is that it records e.g. the timestamp the was processed last so that the query can select everything that has happened since then. That way you can have Logstash make the query at any frequency you like.
Is there a way to pass arguments on the command line to the logstash conf file when I run logstash? Say if I want to pass in the argument of my username and password to my mysql account through the command line rather than the logstash conf file. It seems like you can't combine -f and -e paths in the new version of logstash. Is there another way to pass arguments in logstash?
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.