Can't output data from PostgreSQL to Elasticsearch
djoker911 opened this issue · 0 comments
djoker911 commented
Hi all ,
I've been install fluent-plugin-sql and pg by td-agent-gem
and run systemctl start td-agent
correctly
(@tail is working correctly, and no error in journalctl
)
But data is not output to Elasticsearch when I inserted into PostgreSQL
and /var/run/fluentd/sql_state is not established
Here is my setting of td-agent about postgreSQL to elasticsearch and enviriment
CentOS 7
Elasticsearch 6.5.4
PostgreSQL 9.2.23 on x86_64-redhat-linux-gnu
id and ctime are columns in td_agent_raw_log_test
<source>
@type sql
host psql_host
port 7432
database my_db
adapter postgresql
username username
password password
tag_prefix tmp.my_db.rdb
select_interval 60s
select_limit 500
state_file /var/run/fluentd/sql_state
<table>
table td_agent_raw_log_test
tag td_agent_raw_log_test
update_column id
time_column ctime
</table>
</source>
<match tmp.etugoal.rdb.*>
@type elasticsearch
host es_host
port 9200
index_name fluentd
flush_interval 10s
logstash_prefix psql-tmp-agent-raw-log-test
logstash_format true
</match>
Any help would be greatly appreciated.