Hopefully final updates for Smokeping integration

This commit is contained in:
laf 2015-06-28 16:20:13 +01:00
parent 432fa5cadd
commit e43abbedfa

View File

@ -64,10 +64,15 @@ if($vars['view'] == "incoming")
{
$hostname = str_replace(".rrd", "", $host);
$host = device_by_name($src);
if ($config['smokeping']['integration'] === true) {
$dest = device_by_name(str_replace("_",".",$hostname));
} else {
$dest = $host;
}
if (is_numeric($host['device_id']))
{
echo('<tr><td>');
echo('<h3>'.generate_device_link($host).'</h3>');
echo('<h3>'.generate_device_link($dest).'</h3>');
$graph_array['type'] = "smokeping_in";
$graph_array['device'] = $device['device_id'];
$graph_array['src'] = $host['device_id'];