mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* removing $graphs global * remove unused things * fix some additional graphs * Fix graphs persisting too soon * correct name for poller module performance graph * only one type of graph is used here
21 lines
456 B
PHP
21 lines
456 B
PHP
<?php
|
|
|
|
use LibreNMS\RRD\RrdDefinition;
|
|
|
|
$oids = snmp_get_multi($device, 'deviceTotalFlows.0', '-OQUs', 'PEAKFLOW-SP-MIB');
|
|
|
|
$flows = $oids[0]['deviceTotalFlows'];
|
|
|
|
if (is_numeric($flows)) {
|
|
$rrd_def = RrdDefinition::make()->addDataset('flows', 'GAUGE', 0, 3000000);
|
|
|
|
$fields = array(
|
|
'flows' => $flows,
|
|
);
|
|
|
|
$tags = compact('rrd_def');
|
|
data_update($device, 'arbos_flows', $tags, $fields);
|
|
|
|
$os->enableGraph('arbos_flows');
|
|
}
|