Hi, I am trying to sync a postgres database with elastic search. My file is the following:
input {
jdbc {
jdbc_driver_library => "~/logstash/postgresql-42.2.14.jar"
jdbc_driver_class => "org.postgresql.Driver"
jdbc_connection_string => "REDACTED"
jdbc_user => "dev"
statement => "SELECT * FROM items"
}
}
output {
stdout {
codec => rubydebug #outputs the same thing as elasticsearch in stdout to facilitate debugging
}
elasticsearch {
hosts => "localhost:9200"
index => "items"
document_type => "item"
document_id => "%{id}"
}
}
I installed logstash using the .tar.gz file.
When I run my logstash conf file, I get the following error:
Error: LoadError: no such file to load -- pg
Exception: Sequel::AdapterNotFound
Stack: org/jruby/RubyKernel.java:974:in `require'
I've tried installing the ruby gem, pg, on my laptop, but the error still comes up. I am using a Macbook and I am very new to logstash, any help is appreciated, thank you.