Docs for all releases
Statistics re-parsing is the process of removing corrupt or inaccurate xDR files for a target period from the database and uploading new records. That's useful especially at a time when you need to parse one-day statistics once again due to wrong data in files or a new collector in usage.
To perform one-day statistics re-parsing
Case 1. When CDRs of this day are stored on the softswitch. Follow these steps:
- Go to Statistics > Archive Management and delete statistics of a target day by enabling a checkbox opposite it in column and pressing Process button. Wait till Statistics Manager tool deletes files from the database and rolls back clients' balances.
Screenshot: Archive Management settings
Then go to Gateways > Downloads History and remove xDR files this day from download history (for all gateways).
For instance, if you need to remove xDR fields history for September 26, 2016, select respective entries and click Delete button. You can just type the following 201609276 in a Search bar to simplify the process of finding the required files.
Screenshot: Downloads History tab
Case 2. When xDRs of this day are NOT stored on the softswitch. Follow these steps:
1. Check the existence of these xDR files for all gateways in /usr/local/vcs/var/cdrs_parsed/host_(id of gateway) folder for VCS version 3.12.0 and lower or /opt/jerasoft/vcs-data/external/xdrs_parsed/host_(id of gateway) folder for VCS version 3.13.0 and higher
2. Go to Statistics > Archive Management and mark checkbox opposite a target day in column. After that press Process button. Wait till Statistics Manager deletes files.
3. Then move xDRs of a respective day from the xdrs_parsed folder (cdrs_parsed for older versions) to the xdrs folder (cdrs for older versions) for each gateway.
- For older VCS versions
- For newer VCS versions
4. Usually, your parsed xDRs are archived, so now you need to extract them:
- if you have .gz format, you need to run gunzip *
- if you have tar.gz format, you need to run tar -zxvf *
5. Check if the owner of these files is vcs user. If it's not - run sudo chown vcs:vcs *
6. Check if these files are allowed for reading/writing for all users. If not, run sudo chmod 777 *
7. Wait till the system processes and calculates these files.