Adding Field From MySQL

(TestCandidate) #1

The setup:

I have an Ubuntu 16 server. I've downloaded the ELK stack and configured filebeat to run with logstash. In other words filebeat -> logstash -> elastic.
(mainly the configuration is that is found here)

The CSV File:

I have a CSV file similar to:


My Logstash Filter is as following:

csv {
  separator => ";"
  columns => ["Title1", "Title2", "Title3", "Title4"]

The question

I want to add a "Title5" Column with Value "Value5" fetched from mysql such as:

Select Title5 From ValuesTable Where Title1='Value1' AND Title3='Value3'

Is this possible? and how would you advise me to do it?


(Magnus Bäck) #2

Look into the jdbc_static and jdbc_streaming filters.

(TestCandidate) #3

jdbc streaming looks promising. but can i keep the CSV filter and use parameters from it? since I'm defining the columns there?


(Magnus Bäck) #4

Yes, unless I'm misunderstanding the problem.

(system) #6

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