Windows7 PCでMRTG構築< Cisco機器 index.html編>

Windows7 PCでMRTG構築<活用編 Getif編>でCisco機器のinterfaceのMIB情報を取得し、Windows7 PCでMRTG構築 < Cisco機器 設定編 >でcfgファイルを編集してhtml展開フォルダーでは、各cfgファイルでフォルダー別として階層つくりルートにindex.htmlを下記の様に作成してみました。

【フォルダ階層とファイル】

index.html
|__ B1フォルダー > 192.168.24.1.24.html
|
|__ 24-10-1フォルダー > 192.168.24.10.10149.html
|
|__ 24-10-2フォルダー > 192.168.24.10.10150.html
|
|__ S1フォルダー > 192.168.24.11.10133.html
|
|__ S2フォルダー > 192.168.24.10.10102.html


indexmakerで作成されるindex.htmlをカスタマイズして下記のindex.htmlを作成してみた。

【index.htmlサンプル】

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or
g/TR/html4/loose.dtd">
<HTML>
<HEAD>
    <TITLE>MRTG Index Page</TITLE>
    <!-- Command line is easier to read using "View Page Properties" of your bro
wser -->
    <!-- But not all browsers show that information. :- (
     -->
    <meta http-equiv="content-type" content="text/html; charset=utf-8" >
    <META NAME="Command-Line" CONTENT="indexmaker mrtg1000.cfg" >
    <META HTTP-EQUIV="Refresh" CONTENT="300" >
    <META HTTP-EQUIV="Cache-Control" content="no-cache" >
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache" >
    <META HTTP-EQUIV="Expires" CONTENT="Thu, 31 May 2012 05:37:22 GMT" >
    <LINK HREF="favicon.ico" rel="shortcut icon" >
    <meta http-equiv="refresh" content="300">

<style type="text/css">
/* commandline was: indexmaker mrtg1000.cfg */
/* sorry, no style, just abusing this to place the commandline and pass validati
on */
</style>
</HEAD>

<BODY bgcolor="#fffff0" text="#000000" link="#000000" vlink="#000000" alink="#00
0000">


<H1>MRTG Index Page</H1>

<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=10>

<!-- タイトル 左ブロックstart -->
<tr>
<td><DIV><br><hr width="110%" size="1" Color="#000000"></B> </DIV>
<h2>backbonetraffic</h2>
</td>
<!-- タイトル 左ブロックend -->

<!-- タイトル 右ブロックstart -->
<td><DIV><br><hr width="110%" size="1" Color="#000000"></B> </DIV>
<h2> </h2>
</td>
</tr>
<!-- タイトル 右ブロックend -->

<tr>
<td><DIV><hr width="110%"><B>backbone(G1/2/24)DATA通信量;</B></DIV>
<!-- Begin <code>Monthly' Graph 5 Minute -->
		<div class="graph">
			日グラフ;(5分間 Averag)
			<DIV><A HREF="B1/192.168.24.1.24.html"><IMG BORDER=1 ALT="B1/192.168.24.1.24 Traffic Graph" SRC="B1/192.168.24.1.24-day.png"></A><BR>
<SMALL>最終更新日時:<!--#config timefmt="%Y/%m/%d %X"--><!--#flastmod file="B1/192.168.24.1.24.html"--></SMALL></DIV>
		<diV>
<!-- End </code>Monthly' Graph 5 Minute -->

<!-- Begin <code>Weekly' Graph (30 Minute -->
</td><td><DIV><hr width="110%" ><B> </B></DIV>
		<div class="graph">
			週グラフ(30分間 Average)
			<DIV><A HREF="B1/192.168.24.1.24.html"><IMG BORDER=1 ALT="B1/192.168.24.1.24 Traffic Graph" SRC="B1/192.168.24.1.24-week.png"></A><BR>
<SMALL>最終更新日時:<!--#config timefmt="%Y/%m/%d %X"--><!--#flastmod file="B1/192.168.24.1.24.html"--></SMALL></DIV>
		<diV>
<!-- End </code>Weekly' Graph (30 Minute -->
</td></tr>


<!-- タイトル 左ブロックstart -->
<tr>
<td><DIV><br><hr width="110%" size="1" Color="#000000"></B> </DIV>
<h2>backbone-C2960間 traffic</h2>
</td>
<!-- タイトル 左ブロックend -->

<!-- タイトル 右ブロックstart -->
<td><DIV><br><hr width="110%" size="1" Color="#000000"></B> </DIV>
<h2> </h2>
</td>
</tr>
<!-- タイトル 右ブロックend -->

<tr>
<td><DIV><br><hr width="110%" size="1" noshade><B>C2960S-24-10 Gi1/0/49 DATA通信量</B></DIV>
<!-- Begin <code>Monthly' Graph 5 Minute -->
		<div class="graph">
			日グラフ(5分間 Averag)
			<DIV><A HREF="24-10-1/192.168.24.10.10149.html"><IMG BORDER=1 ALT="24-10-1/192.168.24.10.10149 Traffic Graph" SRC="24-10-1/192.168.24.10.10149-day.png"></A><BR>
<SMALL>最終更新日時:<!--#config timefmt="%Y/%m/%d %X"--><!--#flastmod file="24-10-1/192.168.24.10.10149.html"--></SMALL></DIV>
		<diV>
</td>
<!-- End </code>Monthly' Graph 5 Minute -->

<!-- Begin <code>Monthly' Graph 5 Minute -->
<td><DIV><br><hr width="110%" size="1" noshade><B>C2960S-24-10 Gi1/0/50 DATA通信量</B></DIV>
		<div class="graph">
			日グラフ(5分間 Averag)
			<DIV><A HREF="24-10-2/192.168.24.10.10150.html"><IMG BORDER=1 ALT="24-10-2/192.168.24.10150 Traffic Graph" SRC="24-10-2/192.168.24.10.10150-day.png"></A><BR>
<SMALL>最終更新日時:<!--#config timefmt="%Y/%m/%d %X"--><!--#flastmod file="24-10-2/192.168.24.10.10150.html"--></SMALL></DIV>
		<diV>
<!-- End </code>Monthly' Graph 5 Minute -->
</td>
</tr>

<tr>
<td><DIV><br><B>C2960S-24-10 Gi2/0/49 DATA通信量</B></DIV>
<!-- Begin <code>Monthly' Graph 5 Minute -->
		<div class="graph">
			日グラフ(5分間 Averag)
			<DIV><A HREF="24-10-3/192.168.24.10.10649.html"><IMG BORDER=1 ALT="24-10-3/192.168.24.10.10649 Traffic Graph" SRC="24-10-3/192.168.24.10.10649-day.png"></A><BR>
<SMALL>最終更新日時:<!--#config timefmt="%Y/%m/%d %X"--><!--#flastmod file="24-10-3/192.168.24.10.10649.html"--></SMALL></DIV>
		<diV>
</td>
<!-- End </code>Monthly' Graph 5 Minute -->

<!-- Begin <code>Monthly' Graph 5 Minute -->
<td><DIV><br><B>C2960S-24-10 Gi2/0/50) DATA通信量</B></DIV>
		<div class="graph">
			日グラフ(5分間 Averag)
			<DIV><A HREF="24-10-4/192.168.24.10.10650.html"><IMG BORDER=1 ALT="24-10-4/192.168.24.10.10650 Traffic Graph" SRC="24-10-4/192.168.24.10.10650-day.png"></A><BR>
<SMALL>最終更新日時:<!--#config timefmt="%Y/%m/%d %X"--><!--#flastmod file="24-10-4/192.168.24.10.10650.html"--></SMALL></DIV>
		<diV>
<!-- End </code>Monthly' Graph 5 Minute -->
</td>
</tr>




<!-- タイトル 左ブロックstart -->
<tr>
<td><DIV><br><hr width="110%" size="1" Color="#000000"></B> </DIV>
<h2>C2960-Server間 traffic</h2>
</td>
<!-- タイトル 左ブロックend -->

<!-- タイトル 右ブロックstart -->
<td><DIV><br><hr width="110%" size="1" Color="#000000"></B> </DIV>
<h2> </h2>
</td>
</tr>
<!-- タイトル 右ブロックend -->

<tr>
<td><DIV><br><hr width="110%" size="1" noshade><B>サーバ1 DATA通信量</B></DIV>
<!-- Begin <code>Monthly' Graph 5 Minute -->
		<div class="graph">
			日グラフ(5分間 Averag)
			<DIV><A HREF="S1/192.168.24.11.10133.html"><IMG BORDER=1 ALT="S1/192.168.24.11.10133 Traffic Graph" SRC="S1/192.168.24.11.10133-day.png"></A><BR>
<SMALL>最終更新日時:<!--#config timefmt="%Y/%m/%d %X"--><!--#flastmod file="fsh/192.168.24.11.10133.html"--></SMALL></DIV>
		<diV>
</td>
<!-- End </code>Monthly' Graph 5 Minute -->

<!-- Begin <code>Monthly' Graph 5 Minute -->
<td><DIV><br><hr width="110%" size="1" noshade><B>サーバ2 DATA通信量</B></DIV>
		<div class="graph">
			日グラフ(5分間 Averag)
			<DIV><A HREF="S2/192.168.24.10.10102.html"><IMG BORDER=1 ALT="S2/192.168.24.10.10102 Traffic Graph" SRC="S2/192.168.24.10.10102-day.png"></A><BR>
<SMALL>最終更新日時:<!--#config timefmt="%Y/%m/%d %X"--><!--#flastmod file="hrow001/192.168.24.10.10102.html"--></SMALL></DIV>
		<diV>
<!-- End </code>Monthly' Graph 5 Minute -->
</td>
</tr>



<tr>
<!-- Begin <code>Monthly' Graph 5 Minute -->
<td><DIV><br><hr width="110%" size="3" Color="#000000"></B> </DIV>
<br>
<br>
<br>
<br>
<br>
<br>
</td>
<!-- End </code>Monthly' Graph 5 Minute -->

<!-- Begin <code>Weekly' Graph (30 Minute -->
<td><DIV><br><hr width="110%" size="3" Color="#000000"><B> </B></DIV>
<br>
<br>
<br>
<br>
<br>
<br>
</td>
<!-- End </code>Weekly' Graph (30 Minute -->
</tr>


</BODY>
</HTML>


実際の上記のコードの表示でありませんが下記のようなイメージになります。




以上でWindows7 PCでMRTG構築は、一旦終了です。
MRTGを構築するのに参考になればと思います。

スポンサーリンク
広告
広告

シェアする

  • このエントリーをはてなブックマークに追加

フォローする

スポンサーリンク
広告