我是新的弹性。有一个甲骨文数据库,我试图索引整个数据到ElasticSearch。一旦配置查询,弹性是不是检索整个数据库,但只是一对夫妇的记录。(总应至少200+)
我还没有自己设置索引Map。
在我的conf文件下面:
input {
jdbc {
jdbc_driver_library => "/usr/share/logstash/logstash-core/lib/jars/ojdbc14.jar"
jdbc_driver_class => "oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@ip:port/db"
jdbc_user => "user"
jdbc_password => "pwd"
clean_run => true
record_last_run => false
statement_filepath => "/etc/logstash/queries/archived.sql"
schedule => "0 * * * *"
}
}filter {
mutate {
remove_field => ["@version", "@timestamp"]
}
}output {
elasticsearch {
hosts => ["http://127.0.0.1:9200"]
index => "archive-2022-09-22"
action => "index"
document_id => "%{id}"
user => "user"
password => "pwd"
}
}
我的报表文件:
select * from archive
从logstash日志我无法检索任何有用的信息:
[2022-11-23T15:11:24,811][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"No Available connections"}
[2022-11-23T15:11:54,808][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"No Available connections"}
[2022-11-23T15:12:00,398][INFO ][logstash.inputs.jdbc ][archived][f085843c850992c12e03ee486c086aea9dfd8655b67ab23879b5f69e3fa8f1d5] (0.013649s) select * from archive
[2022-11-23T15:12:24,808][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"No Available connections"}
[2022-11-23T15:12:54,808][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"No Available connections"}
[2022-11-23T15:13:00,134][INFO ][logstash.inputs.jdbc ][archived][f085843c850992c12e03ee486c086aea9dfd8655b67ab23879b5f69e3fa8f1d5] (0.013788s) select * from archive
我不知道该找什么,有什么建议吗?
1条答案
按热度按时间bwntbbo31#
我发现了这个问题。在logstash.conf文件中,索引字段:
被连续地覆盖由这执行的下一个查询调度.因为我已经需要以及到改变我的输入来源(仍然是一个sql语句但是执行并且格式化通过一个exernal容器)我Map以及索引文件到一个变量这将发生的当前日期.
非常感谢您的帮助:)