Overview
You performed a reboot of the MGR node; however, after recovering the virtual machines, you find that the statistics for a site are not available. Executing the command stv_self_test as TextPass shows all STV components are correctly installed and available.
Solution
A known reason for statistics not working after a reboot of the MGR system is that some steps of the reboot process did not take place. In particular, it is necessary to stop stv_db_importer
when rebooting the STV processes.
Once it has been verified that no messages are appearing in the logs contained in /var/log/STV/stv_db_importer
, you can stop the process as a TextPass user with the following command:
$ stv_db_importer --stop
The process will start as part of the reboot procedure, or via the following command:
$ stv_db_importer --start
For a complete guide on the MGR reboot process, please refer to the article MGR Reboot Procedure (RHEL).
Testing
You can check the status of the process with the following command, executed as a TextPass user:
$ stv_db_importer --status
To verify that the data is up to date, you can check the logs contained in /var/log/STV/stv_db_importer
. There, you will find information like the following:
2021/02/02 13:21:06 (delta_counter 1/4) [19039](INFO): group sys_memory, device 24, span 5m, ts 2021-02-02 13:15:00, reboot-flag 0
2021/02/02 13:21:06 (delta_counter 1/4) [19039](INFO): delta computed in 0.007787 secs
2021/02/02 13:21:06 (delta_counter 4/4) [19042](INFO): group sys_overview, device 23, span 5m, ts 2021-02-02 13:15:00, reboot-flag 0
2021/02/02 13:21:06 (delta_counter 3/4) [19041](INFO): group sys_processes, device 23, span 5m, ts 2021-02-02 13:15:00, reboot-flag 0
2021/02/02 13:21:06 (delta_counter 4/4) [19042](INFO): delta computed in 0.008771 secs
2021/02/02 13:21:06 (delta_counter 4/4) [19042](INFO): group sys_overview, device 24, span 5m, ts 2021-02-02 13:15:00, reboot-flag 0
2021/02/02 13:21:06 (delta_counter 3/4) [19041](INFO): delta computed in 0.021752 secs
2021/02/02 13:21:06 (delta_counter 4/4) [19042](INFO): delta computed in 0.009204 secs
2021/02/02 13:21:06 (delta_counter 3/4) [19041](INFO): group sys_processes, device 24, span 5m, ts 2021-02-02 13:15:00, reboot-flag 0
2021/02/02 13:21:06 (delta_counter 3/4) [19041](INFO): delta computed in 0.022754 secs
In the example, the information being used at 13:21:06 was updated for the 5 minute period after 13:15:00. After 13:25:00, the timestamp should be 13:20:00, and so forth. If this is the case, and data is showing up correctly in the GUI, statistics should now be up to date.