1.0.9 • Published 6 years ago
@pastash/output_pgsql v1.0.9
Postgres output plugin
Status : core plugin, unit tested and maintained.
This plugin is used insert JSONB data into Postgres.
Config using logstash format:
output {
if [type] == nginx {
pgsql {
db => mydatabase
table => test
host => localhost
port => 5432
}
}
}Parameters:
database: name of the postgresql database.table: name of the postgresql table. Defaults topastash.host: ip of the postgresql server.port: port of the postgresql server.id: JSON object to be used as identifier of inserts. Autogenerated if missing.user: username for postgresql.password: password for postgresql.create_table: create postgresql table upon initialization. Default tofalse.
CREATE TABLE IF NOT EXISTS pastash (id TEXT NOT NULL PRIMARY KEY, data JSONB NOT NULL);