Each service processing module differs in the set of resources available for processing. This article lists all the resources that can be managed by BILLmanager when integrated with OpenStack.
Supported resources
When integrated with OpenStack, the processing module supports the use of the following resources (the internal resource name is in parentheses):
- Inbound traffic (inbound);
- Outbound traffic (outbound);
- Bandwidth (flat);
- RAM (mem);
- CPU (cpu);
- Number of CPUs (ncpu);
- Number of CPUs (oversold cores) (ncpuoverselling);
- Disk space (disc or disk);
- Disk space excluding snapshots (volume);
- Disk space for storing snapshots (snapshots);
- Number of virtual servers (vmlimit);
- Public IPv4 addresses (ip);
- IPv6 addresses (ipv6);
- Private network (privatenet);
- External network (publicnet);
- Temporary IP address (extip);
- VPN tunnel (vpntunnel);
- Disk space (object_storage);
- Virtual machine type (instance_type);
- Number of subnets (subnetlimit);
- Number of snapshots (snapshotlimit);
- Number of routers (routerlimit);
- Number of ports per VDC (portlimit);
- Number of balancers (lblimit);
- Max. size of one disk (discsize);
- Number of disks (disclimit);
- Number of network disks (sharelimit);
- Capacity of network disks (share).
The processing module allows you to collect statistics on the use of the following resources (the internal resource name is shown in parentheses):
- Number of servers by type (instance_type);
- Number of disks by type (disclimit_xxx). Daily average;
- Total amount of disk space used (disc or disk). Daily average;
- Amount of disk space used, excluding snapshots (volume). Daily average;
- Amount of disk space used to store snapshots (snapshots) Daily average;
- Number of uses of the OS templates;
- Number of snapshots by type (snapshotlimit_xxx);
- Total disk consumption by type;
- Number of virtual CPUs (ncpu). Daily average;
- The amount of RAM used (mem). Daily average;
- Volume of backups (backup);
- Number of CPUs (oversold cores) (ncpuoverselling);
- Number of routers (routerlimit);
- Number of temporary IP addresses (extip). Daily average;
- Number of floating IP addresses (ip). Daily average;
- Number of network disks (sharelimit);
- Capacity of network disks (share);
- Number of balancers (lblimit).
For resources labeled "Daily average", the system counts the average amount of resource that the server has used over the past 24 hours.
For BILLmanager to automatically collect statistics on resource use, add the following command to the server's job scheduler:
processing/pmopenstack --command vdc_stat --module <идентификатор модуля>
The module ID (code) is displayed in the interface of the billing system under Integration → Service processing modules → Id column.
Time-based resource billing
Time-based resource billing - charging the client for the average daily number of uses of a particular type of resource (type). With this approach, the provider assigns a cost for a single use of each type of resource under Products → Tariffs → Config. → Prices.
Type-based billing is supported for the following resources (the internal resource name is in parentheses):
- Virtual server template (instance_type);
- External network (publicnet);
- Disk space (disc).
Virtual server template
For billing of this resource, the system counts the average number of servers created based on each template for the last day. The total cost is calculated by the formula:
(A1*P1+(...)+An*Pn)/D
For correct billing, create a resource with the following parameter values:
- The billing type is "Statistics-based";
- Type - "Virtual server template";
- Value type - "Enumeration";
- Enumeration - an enumeration with the list of available templates in OpenStack;
- Cost of order periods - "0.00".
External network
For billing of this resource, the system counts the average number of networks of each dimension created over the last day. The total cost is calculated by the formula:
(A1*P1+(...)+An*Pn)/D
For correct billing, create a resource with the following parameter values:
- The billing type is "Statistics-based";
- Type — "External network";
- Value type — "Enumeration";
- Enumeration — an enumeration with the list of network dimensions available in OpenStack. For enumeration items, specify the internal names of the format subnet_xx, where xx is the CIDR network mask;
- Cost of order periods — "0.00".
Discs
For billing of Disk space, Number of disks and Number of disk snapshots resources, the system counts the average number of disks of each type used. The total cost is calculated by the formula:
(A1*P1+(...)+An*Pn)/D
For disk type billing, specify the required type in the Service name field on the resource settings form: Products → Tariffs → Config. → Edit or Create. This can be done in several ways:
- In the Service name field, specify an entry in the format <internal resource name>_<internal disk type name>;
- In the Service name field, enter "hdd" or "ssd" without specifying the internal resource name;
- In the Service name field, specify the internal name of the disk type without specifying the internal resource name.
The internal name of each disk type is displayed in the enumeration with the list of available disk types: Product types → Parameters → Disk type → Values.