Skip to content

Static rating

skovzhaw edited this page Mar 11, 2017 · 11 revisions

Preparation

First make sure you've followed the installation and configuration guides.

Specify your own rates

You can specify different static rates for classes of your selection, as well as default rate for the rest. To do so, just open the config/rate.conf file and start editing defaults and adding your own rates in the following format (one per line):

Class=rate

Like for example with default rate and CloudStackIPUsageData:

DefaultRate=0.5
CloudStackIPUsageData=0.75

Deployment

The Static rating micro service is part of the core RCB Cyclops framework and therefore can be easily deployed using the following guide.

Extensibility

Generally what we are doing here is a simple rating function, which we implemented it in Java, expecting data on RabbitMQ queue which we bind with UDR exchange, and publishing calculated records back via its exchange we bind with CDR data queue.

If you follow these steps you can write your own rating function (in a language of your choosing) and simply connect it to the whole Rating-Charging-Billing workflow.

If you are developing your own usage collector, you may be interested in reading more about the class identification in the following tutorial.

Clone this wiki locally