title: Elasticsearch Data Insertion with Python
body: <p>I'm brand new to using the Elastic Stack so excuse my lack of knowledge on the subject. I'm running the Elastic Stack on a Windows 10, corporate work computer. I have Git Bash installed for a bash cli, and I can successfully launch the entire Elastic Stack. My task is to take log data that is stored in one of our databases and display it on a Kibana dashboard.</p>
  
  <p>From what my team and I have reasoned, I don't need to use Logstash because the database that the logs are sent to is effectively our 'log stash', so to use the Logstash service would be redundant. I found this nifty diagram <img src="https://i.stack.imgur.com/RSwes.jpg" alt="1]"> </p>
  
  <p>on freecodecamp, and from what I gather, Logstash is just the intermediary for log retrieval different services. So instead of using Logstash, since the log data is already in a database, I could just do something like this</p>
  
  <pre><code>USER ---&gt; KIBANA &lt;---&gt; ELASTICSEARCH &lt;--- My Python Script &lt;--- [DATABASE]
  </code></pre>
  
  <p>My python script successfully calls our database and retrieves the data, and a function that molds the data into a dict object (as I understand, Elasticsearch takes data in a JSON format).</p>
  
  <p>Now I want to insert all of that data into Elasticsearch - I've been reading the Elastic docs, and there's a lot of talk about indexing that isn't really indexing, and I haven't found any API calls I can use to plug the data right into Elasticsearch. All of the documentation I've found so far concerns the use of Logstash, but since I'm not using Logstash, I'm kind of at a loss here.</p>
  
  <p>If there's anyone who can help me out and point me in the right direction I'd appreciate it. Thanks</p>
  
  <p>-Dan</p>