-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogstash-jdbc-input-plugin.conf
More file actions
37 lines (35 loc) · 1.6 KB
/
Copy pathlogstash-jdbc-input-plugin.conf
File metadata and controls
37 lines (35 loc) · 1.6 KB
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
# Logstash jdbc input -> elasticseach with environtment variables
input {
jdbc {
jdbc_driver_library => "${LOGSTASH_JDBC_DRIVER_JAR_LOCATION}"
jdbc_driver_class => "${LOGSTASH_JDBC_DRIVER}"
jdbc_connection_string => "${LOGSTASH_JDBC_URL}"
jdbc_user => "${LOGSTASH_JDBC_USERNAME}"
jdbc_password => "${LOGSTASH_JDBC_PASSWORD}"
schedule => "* * * * *"
statement => "select concat(
ifnull(req.id, '0'),
'/',
ifnull(test.id, '0'),
'/',
ifnull(design.id, '0')) as id,
req.id as requirement_id,
req.name as requirement_name,
req.registration_nomor as registration_nomor,
test.id as test_id,
test.file_name as test_filename,
design.id as design_id,
design.step_name as design_step_name
from requirement req
left join test_script test on req.id = test.requirement_id
left join design_step design on test.id = design.test_script_id"
}
}
output {
elasticsearch {
hosts => ["${LOGSTASH_ELASTICSEARCH_HOST}"]
index => "test_script"
document_id => "%{id}"
}
stdout { codec => json_lines }
}