If configured, the PostgreSQL integration will write device data into an PostgreSQL database.
You must create a separate database for using the PostgreSQL integration. To enter the command line utility for PostgreSQL:
sudo -u postgres psql
Inside this prompt, execute the following queries to setup the
chirpstack_integration database. It is recommended to use a different
username (role) and password.
-- create role for authentication create role chirpstack_integration with login password 'chirpstack_integration'; -- create database create database chirpstack_integration with owner chirpstack_integration; -- exit psql \q
This integration must be configured in the Configuration file.
In the configuration file:
[integration] enabled = [ "mqtt", ]
enabled line may look slightly different. Add
"postgresql" to the list.
In this case, the modified line should appear as enabled=["mqtt", "postgresql"].
You must also add / update the
[integration.postgresql] section with the
hostname, username, password and the name of the database. Example:
In the dns= line, modify
with your appropriate credentials and targets. If you followed the example above,
you would use chirpstack_integration as your username and target database. If
your target Postgres database is on the same machine as ChirpStack, use
localhost as your host.