Jump to: navigation, search

Operating BDS

After you complete the Installation and Provisioning steps for the location and tenant, use the steps on this page to run Billing Data Server (BDS), and manage processing.

Procedure: Run the BDS application

Purpose: Use the steps in this procedure to run / schedule the BDS application.

Steps

  1. Execute the following commands to set the current directory to the location where the cloudbilling-prem.sh script is located, and to list the contents of the directory:
    cd <installation folder>

    Where <installation folder> is the folder where you installed BDS (/home/genesys/ if you used the Installation script).

    ls

    The output should match match the following:

    cloudbilling-prem  cloudbilling-prem.local  cloudbilling-prem.sh
  2. Enter the following command to begin processing billing data:
    ./cloudbilling-prem.sh process

    Alternatively, you can use the Linux cron daemon on the Docker host to schedule execution. A few lines with docker-related errors can appear. This is normal, as it indicates that launching the application does not remove any files that are in use. For example:

    $ ./cloudbilling-prem.sh process
    Killing cloudbillingprem_scripts_1 ... done
    Error response from daemon: You cannot remove a running container e53f05282c0d7f8cdb956641887ff0fca8e17db26901e2595ed5d2b5df068387. Stop the container before attempting removal or force remove
    Creating cloudbillingprem_scripts_1 ... done
    Waiting for processing of "process" to complete.
    You can run "docker logs fad7a93ed00b" in another terminal to check output.
    ........................
    All done!
  3. When the processing is completed, check the log messages in the ./cloudbilling-prem.local/log/brs.log file. If the software ran successfully, a message similar to the following appears:
    2020-07-14 14:04:49,472 DEBUG    140154327217984 | __main__.main - Run completed
    2020-07-14 14:04:49,473 AUDIT    140154327217984 | __main__.main - BDS run completed successfully

Next Steps

For information on how to monitor the BDS application after starting, see Troubleshooting.

Enabling or disabling processes

You can control processing at multiple levels:

  • Tenant: Disabling the tenant completely disables all processing for this tenant. Enabling the tenant allows processing for any enabled regions.
  • Region: Disabling the region (for the tenant) disables all processing for this region. Enabling the region allows processing for any enabled locations.
  • Location: Enabling / disabling the location (for the tenant) controls processing for this location.
  • Metric: Enabling / disabling a metric (for the tenant) controls processing for this metric across all locations.

Procedure: Enable or disable processing

Purpose: Use the steps in this procedure to enable or disable processing

Steps

  1. Execute the following command to launch BDS in config mode:
    ./cloudbilling-prem.sh config
    Output should be similar to the following:
    Creating cloudbillingprem_scripts_1
    Use ./brsctl.py tool to view/update current configuration
  2. Execute the following command to enable or disable a process:
    brsctl.py <process>-t <tenant_name> -<on/off>
    where:
    <process> is one of the following: tenant, region, location, or metric.
    <tenant_name> is the name of the tenant for which to process data.
    <on/off> is either on or off
    See the table Examples to enable or disable processes for examples. For additional information, see the brstcl Help, or Configuration: the Control utility.
To: Enter this command:
Examples to enable or disable processes
Enable a tenant
brsctl.py tenant -t <tenant_name> -on
Disable a region
brsctl.py region -t <tenant_name> -off region_name
Enable a location for all tenants
brsctl.py location -ta -on location_name
Disable a metric for all tenants
brsctl.py metric -ta -m metric_name -off
Enable all metrics for a tenant:
brsctl.py metric -t <tenant_name> -ma -on
where: <tenant_name> is the name of the tenant.

Reprocessing data

In some scenarios, you may need to reprocess data that was previously processed.

Procedure: Reprocess Data

Purpose: Use the steps in this procedure to reprocess data that was previously processed, starting from a specified date. The period of time is controlled by three watermark dates.

Steps

  1. Execute the following command to see the current values of the watermark dates:
    brsctl.py tenant -t <tenant_name> -ed -td -ld
    where <tenant_name> is the name of the tenant for which to process data.
  2. To complete the entire reprocessing cycle for a given tenant, execute the following command to reset the extract watermark:
    brsctl.py tenant -t <tenant_name> -ed <date>
    where:
    • <tenant_name> is the name of the tenant for which to process data.
    • <date> is the last day for which data was already satisfactorily extracted. Extraction will begin on the day following the date you enter here.
    For example, to reprocess data for the current month, set this value to last day of the preceding month, such as:
    brsctl.py tenant -t <tenant_name> -ed 2020-11-30
    Important
    If the source data for the specified date is no longer available, processing terminates with an error.
  3. To retransform the previously extracted data and upload the results, execute the following command to reset the transform watermark:
    brsctl.py tenant -t <tenant_name> -td <date>
    where:
    • <tenant_name> is the name of the tenant for which to process data.
    • <date> is the last day for which data was already satisfactorily transformed. Transformation will begin on the day following the date you enter here.
    For example, to reprocess data for the current month, set this value to last day of the preceding month, such as:
    brsctl.py tenant -t <tenant_name> -td 2020-11-30
    Important
    If the transform watermark is set to a date later than the extract watermark, processing terminates with an error.
  4. If SFTP loader is configured, reload transformed data to the SFTP server — execute the following command to reset the load watermark:
    brsctl.py tenant -t <tenant_name> -ld <date>
    where:
    • <tenant_name> is the name of the tenant for which to process data.
    • <date> is the last day for which data was already satisfactorily loaded. Data will be loaded beginning with the day following the date you enter here.
    For example, to reprocess data for the current month, set this value to last day of the preceding month, such as:
    brsctl.py tenant -t <tenant_name> -ld 2020-11-30
    Note the following:
    • To overwrite existing files on the SFTP, edit the gvars.py file and set overwrite = True.
    • If transformed files are nor present, processing terminates with an error.
This page was last edited on December 4, 2020, at 21:01.
blog comments powered by Disqus