How to create if conditional statement in logstash config file

Hi,

how to select the mysql query in elasticsearch config file based on if condition statement?

There is no MySQL query in the elasticsearch.yml file and no conditionals. What are you trying to do?

Actually i fetch the data from mysql.

is there any alter option available?

One way to move data from MySQL to Elasticsearch is using Logstash. Elasticsearch has no built in way to do this.

Absolutely i tried in this way only.

now i can able to make conditional statement?

What type of conditional statement?

If conditional statement

As I said earlier, you most likely need to use Logstash to move data from MySQL to Elasticsearch. Have a look at the Logstash documentation and this blog post and the official documentation on how to use the jdbc input plugin. If you have any further questions on this, create a thread in the Logstash category.

Eg:
if [status_id] == 1 means i need to change this name to "lowest version"

can u explain how to do this?

If this is a Logstash question, please create a new thread under the Logstash category where you describe what you want to do and what you have got so far in terms of configuration. The more specific questions you have the more likely you are to get a response, so make sure you have gone through the documentation and understand how Logstash works. This blog post may also be a good resource even though it does not use the jdbc input plugin.

thank you

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.