mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	Allow ['rrd_def'] to be array or string
This commit is contained in:
		@@ -348,8 +348,9 @@ function rrdtool_data_update($device, $measurement, $tags, $fields)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    $rrd = rrd_name($device['hostname'], $rrd_name);
 | 
					    $rrd = rrd_name($device['hostname'], $rrd_name);
 | 
				
			||||||
    if (!is_file($rrd) && $tags['rrd_def']) {
 | 
					    if (!is_file($rrd) && $tags['rrd_def']) {
 | 
				
			||||||
        // add the --step and the rra definitions to the array
 | 
					        $rrd_def = is_array($tags['rrd_def']) ? $tags['rrd_def'] : array($tags['rrd_def']);
 | 
				
			||||||
        $newdef = "--step $step ".implode(' ', $tags['rrd_def']).$config['rrd_rra'];
 | 
					        // add the --step and the rra definitions to the command
 | 
				
			||||||
 | 
					        $newdef = "--step $step ".implode(' ', $rrd_def).$config['rrd_rra'];
 | 
				
			||||||
        rrdtool_create($rrd, $newdef);
 | 
					        rrdtool_create($rrd, $newdef);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user