mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	improve smokeping filename detection (see filenames with underscores instead of dots). this is temporary until we "discovery" these rather than look for them on the fly.
git-svn-id: http://www.observium.org/svn/observer/trunk@3005 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
		@@ -34,8 +34,18 @@ if($width > "500")
 | 
			
		||||
if($device['hostname'] == $config['own_hostname'])
 | 
			
		||||
{
 | 
			
		||||
  $filename = $config['smokeping']['dir'] . $dest['hostname'].'.rrd';
 | 
			
		||||
  if (!file_exists($filename))
 | 
			
		||||
  {
 | 
			
		||||
    // Try with dots in hostname replaced by underscores
 | 
			
		||||
    $filename = $config['smokeping']['dir'] . str_replace(".", "_", $dest['hostname']).'.rrd';
 | 
			
		||||
  }
 | 
			
		||||
} else {
 | 
			
		||||
  $filename = $config['smokeping']['dir'] . $dest['hostname'] .'~'.$device['hostname'].'.rrd';
 | 
			
		||||
  if (!file_exists($filename))
 | 
			
		||||
  {
 | 
			
		||||
    // Try with dots in hostname replaced by underscores
 | 
			
		||||
    $filename = $config['smokeping']['dir'] . str_replace(".", "_", $dest['hostname']) .'~'.$device['hostname'].'.rrd';
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  if (!isset($config['graph_colours'][$colourset][$iter])) { $iter = 0; }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user