mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-31 16:23:50 +02:00
More updates to tune rrdfiles
This commit is contained in:
@@ -336,7 +336,7 @@ foreach ($ports as $port) {
|
||||
}
|
||||
else if ($port[$oid] != $this_port[$oid]) {
|
||||
$port_tune = get_dev_attrib($device, 'ifName_tune:'.$port['ifName']);
|
||||
$device_tune = get_dev_attrib($device,'device_rrdtool_tune');
|
||||
$device_tune = get_dev_attrib($device,'override_rrdtool_tune');
|
||||
if ($port_tune == "true" ||
|
||||
($device_tune == "true" && $port_tune != 'false') ||
|
||||
($config['rrdtool']['tune'] == "true" && $port_tune != 'false' && $device_tune != 'false')) {
|
||||
|
||||
@@ -166,7 +166,7 @@ function rrdtool_graph($graph_file, $options) {
|
||||
function rrdtool($command, $filename, $options) {
|
||||
global $config, $debug, $rrd_pipes, $console_color;
|
||||
|
||||
if ($config['rrdcached'] && ($config['rrdtool_version'] >= 1.5 || ($command != "create" && $command != 'tune'))) {
|
||||
if ($config['rrdcached'] && ($config['rrdtool_version'] >= 1.5 || ($command != "create" && $command != "tune"))) {
|
||||
if (isset($config['rrdcached_dir']) && $config['rrdcached_dir'] !== false) {
|
||||
$filename = str_replace($config['rrd_dir'].'/', './'.$config['rrdcached_dir'].'/', $filename);
|
||||
$filename = str_replace($config['rrd_dir'], './'.$config['rrdcached_dir'].'/', $filename);
|
||||
@@ -304,7 +304,7 @@ function rrdtool_tune($type, $filename, $max) {
|
||||
$fields = array(
|
||||
'INOCTETS','OUTOCTETS','INERRORS','OUTERRORS','INUCASTPKTS','OUTUCASTPKTS','INNUCASTPKTS','OUTNUCASTPKTS','INDISCARDS','OUTDISCARDS','INUNKNOWNPROTOS','INBROADCASTPKTS','OUTBROADCASTPKTS','INMULTICASTPKTS','OUTMULTICASTPKTS'
|
||||
);
|
||||
$options = "--maxium " . implode(":$max --maximum ", $fields). ":$max";
|
||||
$options = "--maximum " . implode(":$max --maximum ", $fields). ":$max";
|
||||
rrdtool('tune', $filename, $options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user