Hi,
First, sorry my english not be good,
I made a jdbc connection in the logstash, collecting information from an oracle bank, the query consists of searching the size of the bank and the name of the instance in a single query (using join), when I start the data goes up to the kibana, but the values the types of the fields come out wrong, the size of the bank needed it to come with the type number and it comes in string, so I can't create graphics with this field, I tried to change this existing index with the api mapping, I tried to create an idexe via api, but when I will recognize it in the indexes pathers it just doesn't appear, I tried to run two jdbc entries with the separate queries and even so it doesn't change the field that I need to be in number
Config JDBC
input {
jdbc {
jdbc_driver_library => "/opt/elk/applications/logstash/config/ojdbc6.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@IP:1521/RUNDECK"
jdbc_user => "xxxxxxx"
jdbc_password => "zzzzzzzzz"
statement => "select cold_used_mb FROM V$ASM_DISKGROUP WHERE name LIKE ('%DATA%')"
}
}
filter {
}
output {
elasticsearch {
hosts => ["elk1:9200", "elk2:9200"]
index => "size_db-%{+YYYY.MM.dd}"
}
}
Version Logstash 6.5