title: save whole database to elasticsearch using logstash
body: <p>i am new to ELK, what am currently doing is:
  <br></p>
  
  <ol>
  <li>Using <code>configuration.conf</code> file to set jdbc in logstash (input>filter>output)</li>
  <li>For each <code>MySQL</code> query having separate <code>input{}</code> in logstash config file  </li>
  <li>Or using <code>pipilines.yml</code> for separat config file to run in separate thread (i.e. each MySQL query has (is stored in) different configuration file)</li>
  <li>running command <code>logstash -f config.conf</code> (Windows) or just <code>logstash</code> for pipeline
  <br></li>
  </ol>
  
  <p>How can i fetch all tables of a database using logstash and index them to ElatsticSeach<b> <em>in one go</em> </b>where index for each table has the same name as table name in MySQL Database (Windows). Can i run a query as show tables, get list and use a for loop and define .conf for each table and save them as .conf files? but how would i modify .yml file then? as files are .conf and .yml and not .py?</p>
  
  <p><a href="https://i.stack.imgur.com/vB9G5.png" rel="nofollow noreferrer">Logstash configuration file image</a></p>
  
  <p></p>