1
0
mirror of https://github.com/moexe/FFFGateway-Monitoring.git synced 2026-02-05 22:55:11 +01:00

Ein Anfang

This commit is contained in:
Robert Langhammer
2017-01-21 18:00:26 +00:00
parent 4ae9e15051
commit 008772344c
23 changed files with 1265 additions and 0 deletions

21
html/ende.html Normal file
View File

@@ -0,0 +1,21 @@
<div id="fuss">
<div id="content" style="font-size:14px; font-weight:bold">
<table border="0" width="100%">
<tr>
<td>Tel.:<br>
mobil: </td>
<tr>
<td style="font-size:12px"><a href="impressum.php">Impressum</a></td>
<td style="font-size:12px"><a href="datenschutz.php">Datenschutzhinweis</a></td>
</tr>
</table>
</div></div>
</div></div></div>
</body>
</html>

23
html/navh.html Normal file
View File

@@ -0,0 +1,23 @@
<div id='cssmenu'>
<ul>
<li><a href="index.php">Startseite</a></li>
<li class='has-sub'><a href='#'><span>Gateways</span></a>
<ul>
<li><a href="http://78.47.36.148">fff-has</a></li>
<li><a href="http://78.47.36.148">fff-has</a></li>
<li><a href="http://78.47.36.148">fff-has</a></li>
<li><a href="http://78.47.36.148">fff-has</a></li>
<li><a href="http://78.47.36.148">fff-has</a></li>
<li><a href="http://163.172.161.233">fff-rola1</a></li>
<li class='last'><a http://5.189.166.50">fff-has2</a></li>
</ul>
</li>
<li><a target="_blank" href="/mrtg/start.html">MRTG</a></li>
<li><a target="_blank" href="http://163.172.161.233:8082">babelweb-rola1</a></li>
<li class='last'><a target="_blank" href="https://monitoring.freifunk-franken.de/">Monitoring</a></li>
</ul>
</div>

25
html/site.html Normal file
View File

@@ -0,0 +1,25 @@
<!DOCTYPE HTML>
<html><head>
<title>Status Gateway rola1</title>
<meta http-equiv="content-type" content="text/html">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="styles.css">
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="main.css" type="text/css" media="screen">
<script src="script.js"></script>
</head><body>
<div id="wrapper">
<div id="kopf">
</div>
<div id="bodybox">
<?php
include 'html/navh.html';
?>

84
html/start.html Normal file
View File

@@ -0,0 +1,84 @@
<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>