When upgrading from earlier versions to June 2017 release or newer, there is an option to enable/disable a new logging service. By default it is enabled.
After enabling logging service, logs will be stored in Repository Database. Afterwards, Operation Monitor will only show information after upgrade but not before.
When the database logging function is turned on, Operation Monitor would not read log files. Instead, it reads database. This line can be found in script log:
Database logging exists. Sourcing from log database.
When the database logging function is turned off, Operation Monitor reads files. This line can be found in script log:
Could not validate active database logging. Sourcing from file logs instead.
Because database logging is only available after Sept-2017 release, only logs generated after upgrade are stored in database, and the historical data in the QVD files under "C:\ProgramData\Qlik\Sense\Log".
However, due to upgrade, the old QVD files are not read correctly by new Operations Monitor. Errors like "field not found" "table not found" appears frequently.
As a common practice, old QVD files are removed.
As a result, Operations Monitor can only fetch information after upgrade.
Use this command to validate whether Centralized Logging is enabled:C:\Program Files\Qlik\Sense\Logging>Qlik.Logging.Service.exe validate
If one wants to view all information, database logging needs to be turned off by running this command on all nodes having Logging Service running:C:\Program Files\Qlik\Sense\Logging>Qlik.Logging.Service.exe update -d off
After turning it off, the reload still doesn't read Archived Logs immediately, because of "db_check" in the script. "db_check" tries to read DB records within the last hour -- if there is any, reload will read from DB.
As a result, immediately after switching off, reload still reads from DB. But after some time, db_check will eventually returns zero rows then reload will read from Archived logs.
In order to immediately start reading Archived Logs, please follow these steps:
- Go to QMC > Data Connections.
- Double-click "QLogs".
- Before proceeding, make sure password for user "qlogs_reader" is available. If not, recover this password first.
- Modify the "password" field to a wrong password and save.
- Remove any QVD files under C:\ProgramData\Qlik\Sense\Log folder.
- Perform a reload on Operations Monitor. In the script log, following errors will show and force the reload to read Archived Logs:
- Error: Connector reply error: Unable to connect to database:
Please check the values for Username‚ Password‚ Host and other properties.
Description: Access credentials are not valid for this connection.
- Confirm the reloaded Operation Monitor is containing historical data.
- Undo the password changes to "QLogs".
Note, using above steps do not require switching OFF database logging.