1. Home
  2. Getting Started
  3. FileGPS Client Sample File

FileGPS Client Sample File

  FileGPS Client setup sample files for the database and logs 

FileGPS Client database config file:

input {

jdbc {
jdbc_driver_library => “path for jdbc driver library”
# ORACLE Driver Class
jdbc_driver_class => “Java::oracle.jdbc.driver.OracleDriver”
jdbc_default_timezone => “America/New_York”
# ORACLE jdbc connection string to our database, ORACLE jdbc:oracle:thin:@hostname:PORT/SERVICE
jdbc_connection_string => “jdbc:oracle:thin:@cdldftff2-scan.es.ad.adp.com:1521/mft11d_svc1”
# The user and password we wish to execute our statement as
jdbc_user => “username”
jdbc_password => “password”
schedule => “* * * * *”
statement => “SELECT trim(FGA._KEY) as processId,FGA.FILE_NAME as localFileName,FGA.FILE_SIZE as filesize,FGA.MAILBOX_PATH as srcmailboxPath,FGA.MAILBOX_PATH as mailboxPath> :sql_last_value”
}
}
filter {
mutate {
add_field => {“read_timestamp” => “%{@timestamp}”}
remove_field => [“@version”,”removekey”,”type”]
rename => { “msgtxt” => “msgTxt” “processid” =>”processId” “localfilename” => “localFileName” “remotefilename” => “remoteFileName” “clientid” => “clientId” “clientname” => “clientName” “nodeid” => “nodeId”}
}
}
output {

kafka {

topic_id => “gps”

bootstrap_servers => “ip-name(Kafka):9092”

codec => json

}

stdout { codec=>rubydebug }
}

FileGPS Client logs config file:

input {
file {
path => “/hadoop/110209/ops_test.log”
}
}
filter {
grok {
match => { “message” => “%{GREEDYDATA:time} %{DATA:status} %{DATA:Serviceinfo} %{GREEDYDATA:protocol}” }
#remove_field => [ “message” ]
remove_field => [ “host” ]
remove_field => [ “path” ]
remove_field => [ “@timestamp” ]
remove_field => [ “@version” ]
}
}
output {
stdout { codec => json_lines }
}

Updated on July 23, 2019

Was this article helpful?

Related Articles

Leave a Comment