Skip to content

Latest commit

 

History

History

README.md

Estimation Engine Client

CLI client for the Cyclops cost and revenue estimation and forecasting engine.

Prerequisites

pip install -r requirements.txt

Setup

Fill-in the conf.ini file with the appropriate endpoints and DB credentials.

Usage

Basics

  • Use rule for rule management. Use it to add or --delete rules. You will need to specify which instance of the coin --engine to use. Use a rule name to delete a rule and a path to a file containing a rule to add a rule (--target in both cases). Follow the rule guidelines to create rules and group them into pricing models.
  • Use forecast to generate usage records, UDRs, CDRs and bills based on the forecasting models. Read the next section for more details on generating forecasts.
  • Use cleanup to delete all forecast records generated by the --target model you specify. You can optionally delete --all rules associated with the model.

Rule guidelines

In order for a rule to be useful for forecasting it must comply with the following restrictions:

  1. It must include the name of its parent model in its name. Eg if you are creating a model called 'test1' ensure it is contained in the name of the rule.
  2. It must have a higher salience than the production rules. This is to ensure it gets checked first. This will not affect real records as long as the next guideline is also followed.
  3. The rule must check the records that fire it for the name of its forecasting model. Records created by the forecasting engine are tagged in the account and data fields. You can check either one.

Forecast generation

There are 3 types of forecast:

  1. single account forecast: A usage and cost estimate for a single --account. You will need to provide the account name, the pricing --model to be used and the forecast --length in days. Usage, charge and billing records are generated automatically.
  2. global forecast: As above, but provides a global estimate that aggregates data from all accounts.
  3. pattern forecast: Generates a forecast for overall usage for every account.