If you decided not to set up the Qlik Sense Logging Service, you can do so after installation. The simplest approach is to simply use the existing PostgreSQL software installed with Qlik Sense, though you can use your own PostgreSQL instance if you would prefer.
- In order to configure Centralized Logging after an upgrade, run the following commands:
- cd "C:\Program Files\Qlik\Sense\Logging\"
- .\Qlik.Logging.Service.exe setup --hostname FQDNofTheDatabase --port 4432 --postgres_user postgres --postgres_pswd PostgresUserPassword --writer_pswd IntendedWritePassword --reader_pswd ReaderWritePassword
- .\Qlik.Logging.Service.exe update --hostname FQDNofTheDatabase --port 4432 --postgres_user postgres --postgres_pswd PostgresUserPassword --writer_pswd IntendedWritePassword --reader_pswd ReaderWritePassword --database_logging on
- Note: If your password for any of these accounts has special characters, you may need to wrap the password in double quotes. Example --postgres_pswd "p@$$\/\/0rd". Strictly speaking the special characters for Windows command line are <, >, |, &, and ^. But wrapping the passwords in double quotes will eliminate any confusion here.
- Note: This was written assuming a default installation path. You may need to adjust the path from "C:\Program Files\Qlik\Sense\Logging"\ to your installation path.
There are additional configuration options availble for the logging service:--archive_age_in_days n
After n days, logs will be moved from the main tables to archive tables in the database, to help keep the log process performant--purge_age_in_days n
After n days, logs in the Archived table will be permanently deleted to prevent the database from growing too large--maximum_db_size_in_gb n
Log entries will be automatically deleted when the database reached n GB in size, starting with entries in the archived table, then if necessary logs in the main tables as well.