mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
More updates
This commit is contained in:
@@ -39,7 +39,7 @@ $rrdtool_conf = array(
|
|||||||
'descr' => 'Path to rrdtool binary',
|
'descr' => 'Path to rrdtool binary',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
),
|
),
|
||||||
array('name' => 'rrdtool.tune',
|
array('name' => 'rrdtool_tune',
|
||||||
'descr' => 'Tune all rrd port files to use max values',
|
'descr' => 'Tune all rrd port files to use max values',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
),
|
),
|
||||||
|
@@ -339,7 +339,7 @@ foreach ($ports as $port) {
|
|||||||
$device_tune = get_dev_attrib($device,'override_rrdtool_tune');
|
$device_tune = get_dev_attrib($device,'override_rrdtool_tune');
|
||||||
if ($port_tune == "true" ||
|
if ($port_tune == "true" ||
|
||||||
($device_tune == "true" && $port_tune != 'false') ||
|
($device_tune == "true" && $port_tune != 'false') ||
|
||||||
($config['rrdtool']['tune'] == "true" && $port_tune != 'false' && $device_tune != 'false')) {
|
($config['rrdtool_tune'] == "true" && $port_tune != 'false' && $device_tune != 'false')) {
|
||||||
if ($oid == 'ifSpeed') {
|
if ($oid == 'ifSpeed') {
|
||||||
$tune_port = true;
|
$tune_port = true;
|
||||||
}
|
}
|
||||||
@@ -487,6 +487,7 @@ foreach ($ports as $port) {
|
|||||||
'OUTMULTICASTPKTS' => $this_port['ifOutMulticastPkts'],
|
'OUTMULTICASTPKTS' => $this_port['ifOutMulticastPkts'],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
echo "TEST $tune_port END \n";
|
||||||
if ($tune_port === true) {
|
if ($tune_port === true) {
|
||||||
rrdtool_tune('port',$rrdfile,$this_port['ifSpeed']);
|
rrdtool_tune('port',$rrdfile,$this_port['ifSpeed']);
|
||||||
}
|
}
|
||||||
|
@@ -19,9 +19,6 @@ if (empty($hosts) && empty($ports)) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "TEST $hosts and $ports\n";
|
|
||||||
$debug=1;
|
|
||||||
|
|
||||||
foreach (dbFetchRows("SELECT `device_id`,`hostname` FROM `devices` WHERE `hostname` LIKE ?", array('%'.$hosts.'%')) as $device) {
|
foreach (dbFetchRows("SELECT `device_id`,`hostname` FROM `devices` WHERE `hostname` LIKE ?", array('%'.$hosts.'%')) as $device) {
|
||||||
echo "Found hostname " . $device['hostname'].".......\n";
|
echo "Found hostname " . $device['hostname'].".......\n";
|
||||||
foreach (dbFetchRows("SELECT `ifIndex`,`ifName`,`ifSpeed` FROM `ports` WHERE `ifName` LIKE ? AND `device_id` = ?", array('%'.$ports.'%',$device['device_id'])) as $port) {
|
foreach (dbFetchRows("SELECT `ifIndex`,`ifName`,`ifSpeed` FROM `ports` WHERE `ifName` LIKE ? AND `device_id` = ?", array('%'.$ports.'%',$device['device_id'])) as $port) {
|
||||||
|
@@ -1 +1 @@
|
|||||||
INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('rrdtool','/usr/bin/rrdtool','/usr/bin/rrdtool','Path to rrdtool','external',0,'rrdtool',0,'0','0'), ('rrdtool.tune','false','false','Auto tune maximum value for rrd port files','external',0,'rrdtool',0,'0','0');
|
INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('rrdtool','/usr/bin/rrdtool','/usr/bin/rrdtool','Path to rrdtool','external',0,'rrdtool',0,'0','0'), ('rrdtool_tune','false','false','Auto tune maximum value for rrd port files','external',0,'rrdtool',0,'0','0');
|
||||||
|
Reference in New Issue
Block a user