mrtg/scripts/lxc_index.sh
2024-02-18 13:27:36 +01:00

34 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>MRTG Index Page</TITLE>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15" >
<META HTTP-EQUIV="Refresh" CONTENT="600" >
<META HTTP-EQUIV="Cache-Control" content="no-cache" >
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" >
<LINK HREF="/cgi-bin/details.pl?graph=favicon.ico" rel="shortcut icon" >
<LINK rel="stylesheet" type="text/css" HREF="style.css"/>
</HEAD>
<BODY>
<H1><a href="/">home</a>&nbsp;<a href="/lxc.html">lxc</a>&nbsp;<a href="/crypto.html">crypto</a>&nbsp;<a href="/power.html">power</a>&nbspLXC - Monitoring</H1>
<DIV>
'
awk '{print $1}' /tmp/lxd.stats | while read c;
do
echo "<DIV>
<B>[$c]</B><BR/>
<A HREF=\"/cgi-bin/details.pl?graph=lxc-$c.net\"><IMG ALT=\"lxc-$c.net\" SRC=\"/cgi-bin/graph.pl?width=540&height=200&graph=lxc-$c.net\"></A>
<A HREF=\"/cgi-bin/details.pl?graph=lxc-$c.cpu\"><IMG ALT=\"lxc-$c.cpu\" SRC=\"/cgi-bin/graph.pl?width=540&height=200&graph=lxc-$c.cpu\"></A>
<A HREF=\"/cgi-bin/details.pl?graph=lxc-$c.memory\"><IMG ALT=\"lxc-$c.memory\" SRC=\"/cgi-bin/graph.pl?width=540&height=200&graph=lxc-$c.memory\"></A>
</DIV>"
done
echo "
</DIV>
</BODY>
</HTML>
"