mirror of
https://github.com/moexe/FFFGateway-Monitoring.git
synced 2024-11-22 13:53:41 +01:00
23fbd72fcf
GW selection für beide Hoods, schmälerer Menübalken
92 lines
2.2 KiB
HTML
92 lines
2.2 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 />
|
|
|
|
<?php
|
|
$l2tp = shell_exec('ip l | grep -c l2tp');
|
|
echo "<b>Anzahl der l2tp Tunnel</b><br>has-sued: <b>$l2tp</b><br><br>";
|
|
|
|
$gwselsued = file_get_contents('http://10.50.60.22/bat0.dat');
|
|
$gwselhas = file_get_contents('http://10.50.60.22/bat2.dat');
|
|
|
|
echo "<b>Gatewayselection Hood has:</b><br>";
|
|
$gwsel_has = explode(PHP_EOL, $gwselhas);
|
|
for($i = 0; $i < count($gwsel_has); ++$i) {
|
|
echo "$gwsel_has[$i]<br>";
|
|
}
|
|
|
|
echo "<b>Gatewayselection Hood has-sued</b><br>";
|
|
$gwsel_sued = explode(PHP_EOL, $gwselsued);
|
|
for($i = 0; $i < count($gwsel_sued); ++$i) {
|
|
echo "$gwsel_sued[$i]<br>";
|
|
}
|
|
|
|
$clients = file_get_contents('http://5.189.166.50/test.html');
|
|
echo $clients;
|
|
?>
|
|
|
|
<hr />
|
|
</div>
|
|
|
|
<div class=mrtg>
|
|
|
|
<b>Speedtest der has und has-sued GWs (Kabel, wr-841, l2tp)</b>
|
|
<img src="http://163.172.161.233/top/img/speed.png">
|
|
|
|
<hr />
|
|
|
|
<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="http://78.47.161.124/localhost_eth0-day.png">
|
|
|
|
<b>GW has2</b>
|
|
<img src="http://5.189.166.50/localhost_eth0-day.png">
|
|
|
|
<br><b>GW has3 - kein mrtg</b><br>
|
|
|
|
<b>GW roffl</b>
|
|
<img src="http://5.189.142.26/localhost_eth0-day.png">
|
|
|
|
<b>GW rola1</b>
|
|
<img src="http://163.172.161.233/mrtg/localhost_eth0-day.png">
|
|
|
|
<hr />
|
|
|
|
|
|
</div>
|
|
</div></div>
|
|
</div></div></div>
|
|
</body>
|
|
</html>
|