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

@@ -25,6 +25,8 @@
* @author Tony Murray <murraytony@gmail.com>
*/
use LibreNMS\RRD\RrdDefinition;
echo ' rrdcached';
$data = "";
@@ -70,17 +72,16 @@ if ($agent_data['app'][$name]) {
$rrd_name = array('app', $name, $app_id);
$rrd_def = array(
'DS:queue_length:GAUGE:600:0:U',
'DS:updates_received:COUNTER:600:0:U',
'DS:flushes_received:COUNTER:600:0:U',
'DS:updates_written:COUNTER:600:0:U',
'DS:data_sets_written:COUNTER:600:0:U',
'DS:tree_nodes_number:GAUGE:600:0:U',
'DS:tree_depth:GAUGE:600:0:U',
'DS:journal_bytes:COUNTER:600:0:U',
'DS:journal_rotate:COUNTER:600:0:U'
);
$rrd_def = RrdDefinition::make()
->addDataset('queue_length', 'GAUGE', 0)
->addDataset('updates_received', 'COUNTER', 0)
->addDataset('flushes_received', 'COUNTER', 0)
->addDataset('updates_written', 'COUNTER', 0)
->addDataset('data_sets_written', 'COUNTER', 0)
->addDataset('tree_nodes_number', 'GAUGE', 0)
->addDataset('tree_depth', 'GAUGE', 0)
->addDataset('journal_bytes', 'COUNTER', 0)
->addDataset('journal_rotate', 'COUNTER', 0);
$fields = array();
foreach (explode("\n", $data) as $line) {