A client's service may be terminated prematurely if the client has exceeded the limits of additional resources:
- the Tariff plan includes value and there were no funds on the balance to pay the excess;
- maximum value specified in the addon settings.
Resource limits are specified under Products → Tariff plans → select a tariff plan → click Options → select a parameter → click Edit → Tariff limits.
For more details, see Tariff settings in the BILLmanager documentation.
Restrictions operation logic
Restrictions will begin to take effect when exceeded:
-
the Tariff plan includes value — the quantity of the resource included in the tariff value. If this value is exceeded, the client will be charged for each unit of resource used in excess of the limit. If the funds are insufficient, the service is stopped.
To set the excess price, enter Products → Tariff plans → select a tariff plan → click Options → select a parameter → click Edit → Overage price. If you leave the field blank or specify 0, the excess will not be charged until it reaches the maximum value.
- maximum value — the maximum amount of the resource available for ordering. If this value is exceeded, the service will be stopped in any case, regardless of whether the client has funds to pay.
Features of stopping services
Exceeded the value Included in tariff and there are no funds to pay the excess
Diagnostics
- Check balance, time of last top up, notifications.
-
Check the billmaintain.log for the error: Type: 'not_enough_money'.
Example of the errorMay 5 00:19:17 [8821:1] rpc EXTINFO Query('func=service.billdaily&item=310598&from=daily') May 5 00:19:17 [8821:1] rpc DEBUG mgrclient.cpp:215 Result xml: <?xml version="1.0" encoding="UTF-8"?> <doc><error type="not_enough_money" lang="en" code="1"><param name="amount">0.1048</param><param name="have">0.00</param><param name="currency">EUR</param><param name="deficit">0.1048</param><param name="limit">0.00</param><param name="reserved">0.00</param><param name="available">0.00</param><stack><action level="30" user="root">service.billdaily</action></stack><group>insufficient funds to complete the operation. Required amount __amount__ __currency__. Your current balance: __have__ __currency__, credit limit __limit__ </group><msg>insufficient funds to complete the operation. Required amount 0.1048 EUR. Your current balance: 0.00 EUR, credit limit 0.00 </msg></error></doc> May 5 00:19:17 [8821:1] backtrace EXTINFO mgr_client::Result::Result(mgr_xml::Xml const&, bool, bool) (lib/libmgr.so.5.246.2 + 0x370) [*0x7f451f67d8e6] May 5 00:19:17 [8821:1] backtrace EXTINFO mgr_client::Local::DoQuery(std::string const&) (lib/libmgr.so.5.246.2 + 0x5d6) [*0x7f451f678c9b] May 5 00:19:17 [8821:1] backtrace EXTINFO mgr_client::Client::Query(std::string const&) (lib/libmgr.so.5.246.2 + 0x42b) [*0x7f451f9fa36a] May 5 00:19:17 [8821:1] backtrace EXTINFO sbin::ClientQuery(std::string const&) (libexec/billmaintain.so + 0x4a) [*0x7f451f9fa75f] May 5 00:19:17 [8821:1] backtrace EXTINFO sbin::ClientQuerySafe(std::string const&) (libexec/billmaintain.so + 0x5f) [*0x7f451f9b04bf] May 5 00:19:17 [8821:1] backtrace EXTINFO BillItem(int, bool, std::string const&) (libexec/billmaintain.so + 0x10f) [*0x7f451f9d280b] May 5 00:19:17 [8821:1] backtrace EXTINFO BillDaily() (libexec/billmaintain.so + 0xadb) [*0x7f451f9d5b90] May 5 00:19:17 [8821:1] backtrace EXTINFO ??? (libexec/billmaintain.so + 0x2090) [*0x401359] May 5 00:19:17 [8821:1] backtrace EXTINFO ??? (/usr/local/mgr5/sbin/billmaintain + 0x0) [*0x7f451fc56555] May 5 00:19:17 [8821:1] backtrace EXTINFO ??? (/lib64/libc.so.6 + 0xf5) [*0x4015f7] May 5 00:19:17 [8821:1] backtrace EXTINFO ??? (/usr/local/mgr5/sbin/billmaintain + 0x0) [*(nil)] May 5 00:19:17 [8821:1] libmgr ERROR Error: Type: 'not_enough_money' Object: '' Value: ''
The error indicates that for this service at the moment of statistics collection there were no funds on the balance to pay for the excess usage of resources included in the tariff plan. To check the current value Included in tariff, enter Products → Tariff plans → select a tariff plan → click Options → select a parameter → click Edit → Tariff limits.
Solution
If the Tariff plan includes value is exceeded, three solution options are available:
- Increase the amount of resource Included in the tariff.
- Allow the client to pay excess charges on a pay-as-you-go basis so that the service does not stop due to insufficient balance. To do this:
- Set the credit limit for the client under Clients → Clients → select the client → click Accounts → select the account → click Edit.
The maximum limit value has been exceeded
Diagnostics
Check the billmaintain.log for a stat_addon_over_limit error:
- Enter Products/Services → select the service that stopped early → click History in the top menu.
- Check the stop time of the service.
- Connect to the server with the platform via SSH.
-
Check the log at the moment the service stops:
/usr/local/mgr5/var/billmaintain.log | grep <service_id>
CommentThe moment of service stoppage due to exceeding the addon limit in the log /usr/local/mgr5/var/billmaintain.log will look like this:
Mar 3 00:24:36 [9686:1] rpc EXTINFO Query('func=service.statdaily&item=323911&statdate=2020%2D03%2D02') Mar 3 00:24:36 [9686:1] libmgr ERROR Error: Type: 'stat_addon_over_limit' Object: '' Value: '' Mar 3 00:24:37 [9686:1] sbin_utils INFO QUERY: func=service.autosuspend&item=323911&stat=on
When the limit is exceeded, the client receives a notification.
To check which parameter caused the service to stop:
- Enter Products/Services → select the service that stopped early → click Edit. A message like this will be displayed for one of the resources: Network load, outbound: 0.00 of 100.00 Mbps left. Used in excess of package: 987.83 Mbps (0.00 RUB per 1 Mbps).
- Compare the excess to the set maximum value in Tariff Limits. Enter Products → Tariff plans → select a tariff plan → click Options → select a parameter → click Edit → Tariff limits → Maximum value.
If the method above was not informative:
- Check the statistics by service ID. Enter Products/Services → select a service → click Statistics in the top menu:
This will display the actual resource utilization of the service. - Compare the statistic values with the maximum allowed for the tariff. Enter Products → Tariff plans → select a tariff plan → click Options → select a parameter → click Edit → Tariff limits → Maximum value.
Solution
If the maximum value is exceeded, the service will be stopped regardless of the availability of funds on the balance. To prevent the service from stopping, increase the maximum value for the addon under Products → Tariff plans → select a tariff plan → click Options → select a parameter → click Edit → Tariff limits.