pgsqloutput plugin allows users to send their data to a PostgreSQL database and store it using the
tableoption in the database defined by the
databaseoption hosted on the server defined by the
hostoption. It will use the PostgreSQL user defined by the
useroption, which needs to have the right privileges to create such a table in that database.
NOTE: If you are not familiar with how PostgreSQL's users and grants system works, you might find useful reading the recommended links in the "References" section at the bottom.
fluentbitin a database called
fluentbitthat is owned by the user
fluentbit. Feel free to use different names. Preferably, for security reasons, do not use the
postgresuser (which has
pwgen 20 1) and store it safely. Then, as
postgressystem user on the server where PostgreSQL is installed, execute:
fluentbitwithout superuser privileges will be created.
postgressystem user, please run:
fluentbitowned by the
fluentbituser. As a result, the
fluentbituser will be able to safely create the data table.
trueif you will connect the plugin with a CockroachDB
tableconfiguration option and made up of the following fields:
time TIMESTAMP WITHOUT TIMEZONE
JSONBdata type in PostgreSQL, please refer to the JSON types page in the official documentation, where you can find instructions on how to index or query the objects (including
jsonpathintroduced in PostgreSQL 12).
BEFORE INSERTtriggers on the main table and re-route records on normalised tables, depending on tags and content of the actual JSON objects.
BEFORE INSERTtrigger (a function in
plpgsqllanguage) that normalises the content of the JSON object and that inserts the record in another table (with its own structure and partitioning model). This kind of triggers allow you to discard the record from the landing table by returning