Problem
There are no statistics for a certain period and you need to re-collect the statistics for that time.
Solution
The statistics are written to the itemstat table and collected by the processing module once a day according to the task in cron. In the processing module's log, running the operation appear as follows:
An example of a log entry
Feb 15 00:20:01 [5977:1] processing INFO RUN with: processing/pmispmgr5 --command stat --module 1
Comments
An example of a log entry
Feb 15 00:20:03 [5977:1] db EXTINFO Query: 'INSERT INTO itemstat(item, statdate, param, value, measure) VALUES (15, '2020-02-14', 'webdomainlimit', '1', 7) ON DUPLICATE KEY UPDATE
param='webdomainlimit', value='1', measure=7'
To re-collect the statistics:
-
Find the records for the days needed.
Find recordsselect * from itemstat where statdate="2020-02-14";
Comments to the command
To find records on a particular service:Find records on a particular serviceselect * from itemstat where statdate="2020-02-14" and item=15;
Comments to the command -
Delete the found records.
Delete recordsdelete from itemstat where statdate="2020-02-14";
Comments to the command
To delete records on a particular service:Delete recordsdelete from itemstat where statdate="2020-02-14" and item=15;
Comments to the command -
In the laststatdate field of the processingmodule table, set the date for which you want to collect the statistics.
Shift the dateupdate processingmodule set laststatdate="2020-03-18" where id=1;
Comments to the command -
Start statistics collection manually:
Statistics collection/usr/local/mgr5/processing/pmispmgr5 --command stat --module 1
- If the statistics are not collected, check the processing module. Most often, the problem with collecting statistics occurs due to errors on the processing module side or due BILLmanager server being unable to access the processing module.