mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 00:24:21 +02:00
Updated smokeping to support Rosiaks integration
This commit is contained in:
@@ -33,18 +33,22 @@ if($width > "500")
|
||||
|
||||
if($src['hostname'] == $config['own_hostname'])
|
||||
{
|
||||
$filename = $config['smokeping']['dir'] . $device['hostname'].'.rrd';
|
||||
if (!file_exists($filename))
|
||||
if ($config['smokeping']['integration'] === true) {
|
||||
$filename_dir = $config['smokeping']['dir'] .'/'. $device['type'] .'/';
|
||||
} else {
|
||||
$filename_dir = $config['smokeping']['dir'];
|
||||
}
|
||||
if (!file_exists($filename_dir.$device['hostname'].'.rrd'))
|
||||
{
|
||||
// Try with dots in hostname replaced by underscores
|
||||
$filename = $config['smokeping']['dir'] . str_replace(".", "_", $device['hostname']).'.rrd';
|
||||
$filename = $filename_dir . str_replace(".", "_", $device['hostname']).'.rrd';
|
||||
}
|
||||
} else {
|
||||
$filename = $config['smokeping']['dir'] . $device['hostname'] .'~'.$src['hostname'].'.rrd';
|
||||
$filename = $filename_dir . $device['hostname'] .'~'.$src['hostname'].'.rrd';
|
||||
if (!file_exists($filename))
|
||||
{
|
||||
// Try with dots in hostname replaced by underscores
|
||||
$filename = $config['smokeping']['dir'] . str_replace(".", "-", $device['hostname']) .'~'.$src['hostname'].'.rrd';
|
||||
$filename = $filename_dir . str_replace(".", "-", $device['hostname']) .'~'.$src['hostname'].'.rrd';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user