-
Notifications
You must be signed in to change notification settings - Fork 0
/
oracle.conf
37 lines (35 loc) · 846 Bytes
/
oracle.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
input {
jdbc {
jdbc_driver_library => "/usr/share/java/oracle-connector/ojdbc6.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:DATABASE"
jdbc_user => "XXXXXXXXXXXXXXX"
jdbc_password => "XXXXXXXXXX"
jdbc_validate_connection=>true
schedule => "* * * * *"
statement => "select * from users where id > :sql_last_value order by id"
use_column_value => true
tracking_column => id
type => "db"
}
}
filter {
if [type] == "db" {
json {
source => "message"
}
}
}
output {
stdout { codec => json }
if [type] == "db" {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "db-%{+YYYY.MM.dd}"
#document_id => "%{logstash_checksum}"
template => "/etc/logstash/templates/elastic-template.json"
template_name => "elastic-template.json"
template_overwrite => true
}
}
}