Added aggregate config option to Billing 95th percentile calculations (#10202)

* Added configuration options to aggregate input and output bits before making 95th percentile billing calculations

* Changed aggregate to per-bill instead of global.  Added config options for making aggregate the default selected option.  Refactored out mres() calls in touched files.  Changed to Config::get where appropriate.

* Fixed documentation typo

* Fixed scope of aggregate default config option to be under billing
This commit is contained in:
Llarian
2019-05-27 21:44:02 -05:00
committed by Tony Murray
co-authored by Tony Murray
parent 38a638358d
commit 9c837bee87
7 changed files with 101 additions and 39 deletions
+19 -1
View File
@@ -23,7 +23,7 @@ Edit `/etc/cron.d/librenms` and add the following:
Create billing graphs as required.
## Options
## Data Retention
Billing data is stored in the MySQL database, and you may wish to purge the detailed
stats for old data (per-month totals will always be kept). To enable this, add the
@@ -36,3 +36,21 @@ $config['billing_data_purge'] = 12; // Number of months to retain
Data for the last complete billing cycle will always be retained - only data older than
this by the configured number of months will be removed. This task is performed in the
daily cleanup tasks.
## 95th Percentile Calculation
For 95th Percentile billing, the default behavior is to use the highest of the input
or output 95th Percentile calculation.
To instead use the combined total of inout + output to derive the 95th percentile,
This can be changed on a per bill basis by setting 95th Calculation to "Aggregate".
To change the default option to Aggregate,
add the following the `config.php`:
```php
$config['billing']['95th_default_agg'] = 1; // Set aggregate 95th as default
```
This configuration setting is cosmetic and only changes the default selected option
when adding a new bill