feature: Allow customisation of rrd step/heartbeat when creating new rrd files (#5947)

* feature: Allow customisation of rrd step/heartbeat when creating new rrd files

* revert defaults

* added docs + webui config option

* Move RrdDefinition to an Object to make them easier to create and remove the possibility of typos.

* Fix style/lint issues and missing use statements

* 3 more missing use statements

* updated doc + moved schema file
This commit is contained in:
Neil Lathwood
2017-02-23 22:45:50 +00:00
committed by GitHub
parent 0997172b37
commit fad5aca1b7
110 changed files with 1475 additions and 1119 deletions

View File

@@ -1,4 +1,7 @@
<?php
use LibreNMS\RRD\RrdDefinition;
$name = 'freeswitch';
$app_id = $app['app_id'];
if (!empty($agent_data[$name])) {
@@ -16,15 +19,14 @@ foreach ($lines as $line) {
}
# Freeswitch stats
$rrd_name = array('app', $name, 'stats', $app_id);
$rrd_def = array(
'DS:calls:GAUGE:600:0:10000',
'DS:channels:GAUGE:600:0:10000',
'DS:peak:GAUGE:600:0:10000',
'DS:in_failed:COUNTER:600:0:4294967295',
'DS:in_okay:COUNTER:600:0:4294967295',
'DS:out_failed:COUNTER:600:0:4294967295',
'DS:out_okay:COUNTER:600:0:4294967295'
);
$rrd_def = RrdDefinition::make()
->addDataset('calls', 'GAUGE', 0, 10000)
->addDataset('channels', 'GAUGE', 0, 10000)
->addDataset('peak', 'GAUGE', 0, 10000)
->addDataset('in_failed', 'COUNTER', 0, 4294967295)
->addDataset('in_okay', 'COUNTER', 0, 4294967295)
->addDataset('out_failed', 'COUNTER', 0, 4294967295)
->addDataset('out_okay', 'COUNTER', 0, 4294967295);
$fields = array (
'calls' => $freeswitch['Calls'],
'channels' => $freeswitch['Channels'],