Added ability to record traceroutes for devices down due to ICMP (#9457)

* Added ability to record traceroutes for devices down due to ICMP

* Update Templates.md

* Updated schema

* Update dev-overview-data.inc.php
This commit is contained in:
Neil Lathwood
2018-11-19 15:58:59 +00:00
committed by Tony Murray
parent fc44ddb3a1
commit ceea9d4981
8 changed files with 102 additions and 38 deletions

View File

@@ -1,5 +1,6 @@
<?php
use App\Models\DevicePerf;
use LibreNMS\Exceptions\InvalidIpException;
use LibreNMS\Util\IP;
@@ -126,12 +127,30 @@ if (is_array($loc)) {
if ($uptime) {
echo "<tr>
<td>$uptime_text</td>
<td>".$uptime."</td>
<td>$uptime</td>
</tr>";
}
echo '</table>
</div>
</div>
</div>
</div>';
$perf_info = DevicePerf::where('device_id', $device['device_id'])->latest('timestamp')->first();
$perf_debug = json_decode($perf_info['debug'], true);
if ($perf_debug['traceroute']) {
echo "<div class='row'>
<div class='col-md-12'>
<div class='panel panel-default'>
<div class='panel-heading'>
<h3 class='panel-title'>Traceroute ({$perf_info['timestamp']})</h3>
</div>
<div class='panel-body'>
<pre>{$perf_debug['traceroute']}</pre>
</div>
</div>
</div>
</div>";
}
echo '</div>';