mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	Merge pull request #2458 from laf/rrdtune
Fix for crazy traffic values seen in graphs
This commit is contained in:
		@@ -339,6 +339,7 @@ foreach ($ports as $port) {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Update IF-MIB data
 | 
			
		||||
        $tune_port = false;
 | 
			
		||||
        foreach ($data_oids as $oid) {
 | 
			
		||||
 | 
			
		||||
            if ($oid == 'ifAlias') {
 | 
			
		||||
@@ -358,6 +359,15 @@ 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,'override_rrdtool_tune');
 | 
			
		||||
                if ($port_tune == "true" ||
 | 
			
		||||
                    ($device_tune == "true" && $port_tune != 'false') || 
 | 
			
		||||
                    ($config['rrdtool_tune'] == "true" && $port_tune != 'false' && $device_tune != 'false')) {
 | 
			
		||||
                    if ($oid == 'ifSpeed') {
 | 
			
		||||
                        $tune_port = true;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                $port['update'][$oid] = $this_port[$oid];
 | 
			
		||||
                log_event($oid.': '.$port[$oid].' -> '.$this_port[$oid], $device, 'interface', $port['port_id']);
 | 
			
		||||
                if ($debug) {
 | 
			
		||||
@@ -501,6 +511,9 @@ foreach ($ports as $port) {
 | 
			
		||||
            'OUTMULTICASTPKTS' => $this_port['ifOutMulticastPkts'],
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
        if ($tune_port === true) {
 | 
			
		||||
            rrdtool_tune('port',$rrdfile,$this_port['ifSpeed']);
 | 
			
		||||
        }
 | 
			
		||||
        rrdtool_update("$rrdfile", $fields);
 | 
			
		||||
        // End Update IF-MIB
 | 
			
		||||
        // Update PAgP
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user