mirror of
https://github.com/moexe/FFFGateway-Monitoring.git
synced 2024-11-22 05:53:40 +01:00
85 lines
2.0 KiB
HTML
85 lines
2.0 KiB
HTML
|
|
||
|
<div id="content">
|
||
|
<?php
|
||
|
$hostname = gethostname();
|
||
|
echo "<h1 align=center>FFF Gateway $hostname</h1>";
|
||
|
echo "<p align=center>Hoods: has und has-süd";
|
||
|
?>
|
||
|
|
||
|
<div class="ampel">
|
||
|
<table border="0">
|
||
|
<tr><td><b>Status</b></td></tr>
|
||
|
|
||
|
<?php
|
||
|
$uptime = shell_exec('uptime --pretty');
|
||
|
echo "<tr><td>Uptime:</td><td>$uptime</td><td><img src=img/ampelgr.jpg></td></tr>";
|
||
|
|
||
|
$load = shell_exec('cat /proc/loadavg');
|
||
|
$load = explode(" ", $load);
|
||
|
$load[0] > 2? $ampel = 'ampelgelb.jpg' : $ampel = 'ampelgr.jpg';
|
||
|
$load[0] > 3? $ampel = 'ampelrot.jpg' : "";
|
||
|
echo "<tr><td>Load:</td><td>$load[0] $load[1] $load[2]</td><td><img src=img/$ampel></td></tr>";
|
||
|
|
||
|
$leases = shell_exec('dhcp-lease-list --parsable | wc -l');
|
||
|
$leases < 3? $ampel = 'ampelgelb.jpg' : $ampel = 'ampelgr.jpg';
|
||
|
$leases > 120? $ampel = 'ampelrot.jpg': "";
|
||
|
echo "<tr><td>DHCP:</td><td>Leases in use: <b>$leases</b></td><td><img src=img/$ampel></td></tr>";
|
||
|
|
||
|
?>
|
||
|
</table>
|
||
|
|
||
|
<hr />
|
||
|
<b>Aktuelle default Route table fff:</b><br>
|
||
|
<?php
|
||
|
$route = shell_exec('ip r s table fff | head -1');
|
||
|
echo "$route<br><br>";
|
||
|
|
||
|
$l2tp = shell_exec('ip l | grep -c l2tp');
|
||
|
echo "Anzahl der l2tp Tunnel: <b>$l2tp</b><br><br>";
|
||
|
$gwsel = shell_exec('sudo batctl gw');
|
||
|
echo "<b>Gateway-selection:</b><br>";
|
||
|
echo "$gwsel<br><br>";
|
||
|
|
||
|
echo "<b>Die anderen GW in der Hood</b><br>";
|
||
|
$other = shell_exec('sudo batctl gwl | grep MBit | tr -s " " | cut -f 2,3,8 -d" "');
|
||
|
$othergw = explode(PHP_EOL, $other);
|
||
|
for($i = 0; $i < count($othergw); ++$i) {
|
||
|
echo "$othergw[$i]<br>";
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
?>
|
||
|
<hr />
|
||
|
</div>
|
||
|
<div class=mrtg>
|
||
|
<H1>Durchsatz eth0</H1>
|
||
|
<b>GW has</b>
|
||
|
<img src="http://78.47.36.148/localhost_eth0-day.png">
|
||
|
|
||
|
<b>GW has1</b>
|
||
|
<img src="img/ampelrot.jpg">
|
||
|
|
||
|
<b>GW has2</b>
|
||
|
<img src="http://5.189.166.50/localhost_eth0-day.png">
|
||
|
|
||
|
<b>GW has3</b>
|
||
|
<img src="img/ampelrot.jpg">
|
||
|
|
||
|
<b>GW roffl</b>
|
||
|
<img src="img/ampelrot.jpg">
|
||
|
|
||
|
<b>GW rola1</b>
|
||
|
<img src="http://163.172.161.233/mrtg/localhost_eth0-day.png">
|
||
|
|
||
|
<hr />
|
||
|
|
||
|
<b>Speedtest der has und has-sued GWs (Kabel, wr-841, l2tp)</b>
|
||
|
<img src="http://163.172.161.233/top/img/speed.png">
|
||
|
|
||
|
</div>
|
||
|
</div></div>
|
||
|
</div></div></div>
|
||
|
</body>
|
||
|
</html>
|