Logstash not showing any output while connecting to Oracle DB


(Vishal) #1

I'm starting off with Logstash, working through the tutorials. I ma facing issue while trying to extract data as standard output from oracle.

I have created below sample config file:-
input {
jdbc {
jdbc_validate_connection => true
jdbc_driver_library => "C:/logstash/lib/ojdbc7.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@hostanme:port/DB"
jdbc_user => "userName"
jdbc_password => "PASSWD"
#statement => "SELECT 1 from DUAL"
statement_filepath => "C:/logstash/bin/query.sql"
jdbc_fetch_size => 256
}
}
output {
stdout { codec => rubydebug }
#stdout { codec => json_lines }
}

Query Present on File:-
SELECT
TABLE1.ID,
CASE WHEN TABLE1.SOURCEID='X' then 'X'
WHEN TABLE1.SOURCEID= 'Y' then 'Y'
WHEN TABLE1.SOURCEID='Z' then 'Z'
WHEN TABLE1.SOURCEID='Z' then 'Z'
END AS RecordTYPE,
TABLE1.PRCOESS_ID,
CASE WHEN ERRTB.STATUS IS NULL THEN 'SUCESS' ELSE ERRTB.STATUS END AS FINALSTATUS,
ERRTB.ERROR_ID ,
ERRTB.ERROR_DESCRIPTION AS ERROR_DESC,
ERRTB.ERROR_COLUMN AS ERROR_FIELD_NAME,
ERRTB.PRCOESS_ID AS PRCOESS_ID,
ERRTB.BUSINESS_VALUE_1 AS INVOICE_NUMBER
from TABLE1, (Select STATUS,ERROR_ID,ERROR_DESCRIPTION,ERROR_COLUMN,PRCOESS_ID,BUSINESS_VALUE_1,TECHNICAL_VALUE_1 from TABLE2 Where PRCOESS_ID in ('28420446','27693708')) ERRTB
Where TABLE1.ID =ERRTB.TECHNICAL_VALUE_1(+)
AND TABLE1.PRCOESS_ID in ('28420446','27693708') and rownum <600

Log stash doesn't prints the query output. Please guide me.

Thanks
Vishal


(system) #2

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