Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
AarizShah
Partner - Contributor III
Partner - Contributor III

enable centralized logging for sense system performance analyzer

Hi,

I am trying to use the sense system performance analyzer. It's requirement is to enabe the centralized logging. I tried reading few articles. One of the articles asks me to go to C:\Program Files\Qlik\Sense\Logging\ in QMC or centralized node

However, the logging folder does not even exist there. Is there any other way to enable centralized logging so that we can start using the sense system performance analyzer

 

Regards

Labels (3)
13 Replies
rzenere_avvale
Partner - Specialist II
Partner - Specialist II

Great! That kind of error should be expected when you turn on the service without the actual database available (or, if you didn't modify the 'main' monitoring apps, every time the monitoring apps are reloaded)
Please try following the kb article I posted in my previous response, and let me know how it goes.

Riccardo

AarizShah
Partner - Contributor III
Partner - Contributor III
Author

Hi,

Before I proceed to installing the db, I ran the validation command on two different QS servers. Below is two different errors that I am getting

QS server1:

D:\Program Files\Qlik\Sense\Logging>Qlik.Logging.Service.exe validate
Failed to validate logging database. Database does not exist or is an invalid version.

 

QS server2:

C:\Program Files\Qlik\Sense\Logging>Qlik.Logging.Service.exe validate
Failed to validate the logging database : The Qlik Logging Service is disabled
        CentralizedLoggingEnabled: False
        LoggingToFileEnabled: True
        MaximumDatabaseSizeInGB: Max db size not enforced
        DB Host: localhost
        DB Name: QLogs
        DB Writer User: qlogs_writer
        DB Reader User: qlogs_reader
        DB Port: 4432

It looks like both servers have their own repository and Qlogs database. If I want to enable centralized logging, which database will be used to collect all the logs from all the nodes? Is there something else I need to do before enabling centralized logging?

Aariz

Gencho
Creator II
Creator II

Hello @AarizShah 

When I did the installation on my environment I skipped set the Qlog database (2017 release) after a couple of years I had to investigate how to enable these logs to set up the monitoring apps of Qlik Sense so I did the research as follows:

  1. I enabled the Centralized login mode, just follow the first 2 steps of this document
    https://support.qlik.com/articles/Basic/How-To-Enable-Disable-Centralize-Logging-Mode?articleId=How-...
  2. Then you'll need to set up the logging service, just run in the prompt the command:
    cd "C:\Program Files\Qlik\Sense\Logging\"
  3. Then run 
    .\Qlik.Logging.Service.exe setup --hostname FQDNofTheDatabase --port 4432 --postgres_user postgres --postgres_pswd PostgresUserPassword --writer_pswd IntendedWritePassword --reader_pswd ReaderWritePassword

    Just remember to change the password of postgres_pswd (you set this password when you did the installation)  and for writer_pswd the default is qlogs_reader and the password of reader_pswd the pwd by is qlogs_writer
  4. Then you need to run the command 
    .\Qlik.Logging.Service.exe update --hostname localhost --port 4432 --postgres_user postgres --postgres_pswd Administrat0r --writer_pswd qlogs_reader --reader_pswd qlogs_writer --database_logging on

    Change the same before mentioned

  5. You will have a message like connection successful, by the way, this is the document that I followed for steps 2,3 and 4
    https://support.qlik.com/articles/Basic/How-to-set-up-the-Qlik-Sense-Logging-Service?articleId=How-t...

    Hope these instructions help
    Regards
grangerats
Partner - Contributor III
Partner - Contributor III

Thanks! I was also in the same position: Didn't setup centralized logging a few years back. In my case, I wanted to use the "Sense System Performance Analyzer" app (Imported manually from   C:\ProgramData\Qlik\Sense\Repository\DefaultApps\  ), but couldn't because it relies on the QLogs data connection, which needs centralized logging to be setup and turned on.

In my case, the steps were a bit different:

  1. On the machine where Qlik Sense is installed, open an elevated command prompt.
  2. Switch to the exe's dir for convenience:   cd "C:\Program Files\Qlik\Sense\Logging\"
  3. Get the "QLogs" db catalog setup/provisioned using the "postgres" account.
    • Qlik.Logging.Service.exe setup -h HostFqdn -p HostPort -u postgres -x ExistingPostgressUserPwd -w NewQlogsWriterPwd -r NewQlogsReaderPwd   
    • FYI, the .exe has a "help" command, that is useful. 
  4. Turn on centralized (db) logging.
    • Qlik.Logging.Service.exe update -h HostFqdn -p HostPort -u postgres -x ExistingPostgressUserPwd -d on
    • FYI: You can add options in this command to have Qlik purge logs after X days/hours and/or set a GB size limit on the logs (again, use the exe's "help" command).
  5. Back in the QMC, edit the "QLogs" data connection and update the password for the  qlogs_reader  account to match what you set back in step #3.
  6. Reboot the server.
    • I tried to avoid this, but even after restarting the "logging" Windows Service, it didn't appear that log information was being captured in the new QLogs db catalog. The App would reload find, but I couldn't find any data. After a reboot, I re-loaded the App and was able to find Windows Event data in the App.