Logstash logstash-jdbc-input queries (mapping and type)

(Navneet Mathpal) #1

hi ,
I have some queries about logstash-input-jdbc

  1. how to specify the type : lets us suppose I have already a mapping available for index . Lets say type is "mydata". If i talk about csv filter in Logstash it has the feature to specify the type => "mycsv", so that data will indexed on that type only. Is is not possible in case of jdbc plugin ?
    by default jdbc-input creates type "logs", if I am explicitly defining the type logs in index first and then trying to index the data using jdbc-input it is not indexing the data instead it is showing some unusual behavior..
    Any idea why ?
    And how to resolve it

Logstash-jdbc-input mapping issues [bug ]
(Tal Levy) #2

I agree, it is valuable to set this per input.

I have made the issue and hope to resolve it soon!

(Tal Levy) #3

Actually, my mistake.

a type can be configured by way of configuration parameter

jdbc {
  type => "jdbc-my-query"

(Navneet Mathpal) #4

@talevy that was my concern that if you put type parameter , it behaviors very differently. Rather than indexing the document into elastic it starts showing them into console .. and one logstash node gets created ...
Again i have tried the same but same issue
Have you actually tried it ?

(Tal Levy) #5

I am not completely following how that is happening. mind sharing your configuration?

(system) #6