memorandum
FrontPage
管理
ヘルプ
VineLinux4.x/サーバ管理/MRTGのインストール
をテンプレートにして作成
開始行:
*概要 [#x5a3bbff]
MRTG(The Multi Router Traffic Grapher)は、ネットワークの...
-http://www.mrtg.jp/doc/
*設定手順 [#sb9409ef]
**事前にnet-snmpをインストール [#pf45532e]
# apt-get install net-snmp
**snmpd.confの編集 [#p1e595ff]
# vi /etc/snmp/snmpd.conf
>
# First, map the community name "public" into a "securit...
# sec.name source community
#com2sec notConfigUser default public
com2sec local localhost private
com2sec mynetwork 192.168.0.0/24 public
# Second, map the security name into a group name:
# groupName securityModel securityName
#group notConfigGroup v1 notConfigUser
#group notConfigGroup v2c notConfigUser
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
# Third, create a view for us to let the group have righ...
# Make at least snmpwalk -v 1 localhost -c public syste...
# name incl/excl subtree mas...
#view systemview included .1.3.6.1.2.1.1
#view systemview included .1.3.6.1.2.1.25.1.1
view all included .1 80
# Finally, grant the group read-only access to the syste...
# group context sec.model sec.level prefi...
#access notConfigGroup "" any noauth exac...
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
#disk / 10000
disk / 10000
**snmpdの起動 [#z18d461a]
# /etc/rc.d/init.d/snmpd start
snmpdを起動中: ...
**自動起動の設定 [#eaa2005d]
# chkconfig --level 3 snmpd on
# chkconfig --list snmpd
snmpd 0:off 1:off 2:off 3:on 4:off ...
**MRTGのインストール [#jdae3478]
VinePlusにRPMがありますのでwgetします。
# wget http://www.ring.gr.jp/pub/linux/Vine/VinePlus/4.2...
RPMをインストールします。
# rpm -ivh mrtg-2.16.1-0vl1.i386.rpm
MRTGの画像ファイルを、httpdのホームディレクトリにコピーし...
# cp /var/www/mrtg/ /home/httpd/html/
MRTG出力ディレクトリのエイリアス及びアクセス制限を適宜変...
# vi /etc/apache2/conf.d/mrtg.conf
**mrtg.cfgの編集 [#t95f9464]
# vi /etc/mrtg.cfg
>
### Global Config Options
# for UNIX
WorkDir: /home/httpd/html/mrtg
### Global Defaults
# to get bits instead of bytes and graphs growing to th...
Options[_]: growright, noinfo
Options[$]: growright, noinfo
EnableIPv6: no
Language:eucjp
### Interface 2 >> Descr: 'eth0' | Name: '' | Ip: '192.1...
Target[eth0]: 2:
[email protected]
:
SetEnv[eth0]: MRTG_INT_IP="192.168.0.2" MRTG_INT_DESCR="...
MaxBytes[eth0]: 12500000
Title[eth0]: Traffic Analysis for eth0
PageTop[eth0]: <h1>Traffic Analysis for eth0</h1>
### CPU Usage ###
Target[cpu]: .1.3.6.1.4.1.2021.11.50.0&.1.3.6.1.4.1.2021...
MaxBytes[cpu]: 100
Unscaled[cpu]: dwmy
Options[cpu]: nopercent
YLegend[cpu]: CPU Usage(%)
ShortLegend[cpu]: (%)
LegendI[cpu]: ユーザー
LegendO[cpu]: システム
Legend1[cpu]: ユーザー(%)
Legend2[cpu]: システム(%)
Title[cpu]: CPU 使用率
PageTop[cpu]: <H1>CPU 使用率</H1>
### Memory Free ####
Target[mem]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4...
MaxBytes1[mem]: 384444
MaxBytes2[mem]: 779144
Unscaled[mem]: dwmy
Options[mem]: gauge
#Factor[mem]: 1000
#YTicsFactor[mem]: 1000
YLegend[mem]: Mem Free(Bytes)
ShortLegend[mem]: Bytes
kilo[mem]: 1024
kMG[mem]: k,M,G,T,P
LegendI[mem]: Real
LegendO[mem]: Swap
Legend1[mem]: 空き物理メモリ(MBytes)
Legend2[mem]: 空きスワップメモリ(MBytes)
Title[mem]: 空きメモリ量
PageTop[mem]: <H1>空きメモリ量</H1>
### Disk Used ####
Target[disk]: .1.3.6.1.4.1.2021.9.1.9.1&.1.3.6.1.4.1.202...
MaxBytes[disk]: 100
Unscaled[disk]: dwmy
Options[disk]: gauge, nopercent
YLegend[disk]: Disk Used(%)
ShortLegend[disk]: (%)
LegendI[disk]: Disk Used
LegendO[disk]: Disk Used
Legend1[disk]: ディスク使用率(%)
Legend2[disk]: ディスク使用率(%)
Title[disk]: ディスク使用率
PageTop[disk]: <H1>ディスク使用率</H1>
**MRTG実行 [#j34b34ee]
# /usr/bin/mrtg /etc/mrtg.cfg
WARNINGが出る場合は、WARNINGが出なくなるまで何回か実行し...
**インデックスページの作成 [#ye2ed6dd]
出力されるHTMLの日本語が文字化けする可能性があるので以下...
# vi /usr/bin/indexmaker
>306行目あたり
<meta http-equiv="content-type" content="text/html; c...
↓
<meta http-equiv="content-type" content="text/html; c...
インデックスページの作成
# indexmaker --columns=1 /etc/mrtg.cfg > /home/httpd/htm...
**CRONへの追加 [#za6fce24]
うまく動作しているようであれば、5分ごとに自動実行されるよ...
# crontab -e
>以下を追加
0-59/5 * * * * /usr/bin/mrtg /etc/mrtg.cfg
**動作の確認 [#l675bed6]
ウェブブラウザにて、http://ホスト名/mrtg/index.htmlにアク...
#ref(mrtgindex.png,nolink)
* コメント [#p8fa7ac3]
#comment
終了行:
*概要 [#x5a3bbff]
MRTG(The Multi Router Traffic Grapher)は、ネットワークの...
-http://www.mrtg.jp/doc/
*設定手順 [#sb9409ef]
**事前にnet-snmpをインストール [#pf45532e]
# apt-get install net-snmp
**snmpd.confの編集 [#p1e595ff]
# vi /etc/snmp/snmpd.conf
>
# First, map the community name "public" into a "securit...
# sec.name source community
#com2sec notConfigUser default public
com2sec local localhost private
com2sec mynetwork 192.168.0.0/24 public
# Second, map the security name into a group name:
# groupName securityModel securityName
#group notConfigGroup v1 notConfigUser
#group notConfigGroup v2c notConfigUser
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
# Third, create a view for us to let the group have righ...
# Make at least snmpwalk -v 1 localhost -c public syste...
# name incl/excl subtree mas...
#view systemview included .1.3.6.1.2.1.1
#view systemview included .1.3.6.1.2.1.25.1.1
view all included .1 80
# Finally, grant the group read-only access to the syste...
# group context sec.model sec.level prefi...
#access notConfigGroup "" any noauth exac...
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
#disk / 10000
disk / 10000
**snmpdの起動 [#z18d461a]
# /etc/rc.d/init.d/snmpd start
snmpdを起動中: ...
**自動起動の設定 [#eaa2005d]
# chkconfig --level 3 snmpd on
# chkconfig --list snmpd
snmpd 0:off 1:off 2:off 3:on 4:off ...
**MRTGのインストール [#jdae3478]
VinePlusにRPMがありますのでwgetします。
# wget http://www.ring.gr.jp/pub/linux/Vine/VinePlus/4.2...
RPMをインストールします。
# rpm -ivh mrtg-2.16.1-0vl1.i386.rpm
MRTGの画像ファイルを、httpdのホームディレクトリにコピーし...
# cp /var/www/mrtg/ /home/httpd/html/
MRTG出力ディレクトリのエイリアス及びアクセス制限を適宜変...
# vi /etc/apache2/conf.d/mrtg.conf
**mrtg.cfgの編集 [#t95f9464]
# vi /etc/mrtg.cfg
>
### Global Config Options
# for UNIX
WorkDir: /home/httpd/html/mrtg
### Global Defaults
# to get bits instead of bytes and graphs growing to th...
Options[_]: growright, noinfo
Options[$]: growright, noinfo
EnableIPv6: no
Language:eucjp
### Interface 2 >> Descr: 'eth0' | Name: '' | Ip: '192.1...
Target[eth0]: 2:
[email protected]
:
SetEnv[eth0]: MRTG_INT_IP="192.168.0.2" MRTG_INT_DESCR="...
MaxBytes[eth0]: 12500000
Title[eth0]: Traffic Analysis for eth0
PageTop[eth0]: <h1>Traffic Analysis for eth0</h1>
### CPU Usage ###
Target[cpu]: .1.3.6.1.4.1.2021.11.50.0&.1.3.6.1.4.1.2021...
MaxBytes[cpu]: 100
Unscaled[cpu]: dwmy
Options[cpu]: nopercent
YLegend[cpu]: CPU Usage(%)
ShortLegend[cpu]: (%)
LegendI[cpu]: ユーザー
LegendO[cpu]: システム
Legend1[cpu]: ユーザー(%)
Legend2[cpu]: システム(%)
Title[cpu]: CPU 使用率
PageTop[cpu]: <H1>CPU 使用率</H1>
### Memory Free ####
Target[mem]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4...
MaxBytes1[mem]: 384444
MaxBytes2[mem]: 779144
Unscaled[mem]: dwmy
Options[mem]: gauge
#Factor[mem]: 1000
#YTicsFactor[mem]: 1000
YLegend[mem]: Mem Free(Bytes)
ShortLegend[mem]: Bytes
kilo[mem]: 1024
kMG[mem]: k,M,G,T,P
LegendI[mem]: Real
LegendO[mem]: Swap
Legend1[mem]: 空き物理メモリ(MBytes)
Legend2[mem]: 空きスワップメモリ(MBytes)
Title[mem]: 空きメモリ量
PageTop[mem]: <H1>空きメモリ量</H1>
### Disk Used ####
Target[disk]: .1.3.6.1.4.1.2021.9.1.9.1&.1.3.6.1.4.1.202...
MaxBytes[disk]: 100
Unscaled[disk]: dwmy
Options[disk]: gauge, nopercent
YLegend[disk]: Disk Used(%)
ShortLegend[disk]: (%)
LegendI[disk]: Disk Used
LegendO[disk]: Disk Used
Legend1[disk]: ディスク使用率(%)
Legend2[disk]: ディスク使用率(%)
Title[disk]: ディスク使用率
PageTop[disk]: <H1>ディスク使用率</H1>
**MRTG実行 [#j34b34ee]
# /usr/bin/mrtg /etc/mrtg.cfg
WARNINGが出る場合は、WARNINGが出なくなるまで何回か実行し...
**インデックスページの作成 [#ye2ed6dd]
出力されるHTMLの日本語が文字化けする可能性があるので以下...
# vi /usr/bin/indexmaker
>306行目あたり
<meta http-equiv="content-type" content="text/html; c...
↓
<meta http-equiv="content-type" content="text/html; c...
インデックスページの作成
# indexmaker --columns=1 /etc/mrtg.cfg > /home/httpd/htm...
**CRONへの追加 [#za6fce24]
うまく動作しているようであれば、5分ごとに自動実行されるよ...
# crontab -e
>以下を追加
0-59/5 * * * * /usr/bin/mrtg /etc/mrtg.cfg
**動作の確認 [#l675bed6]
ウェブブラウザにて、http://ホスト名/mrtg/index.htmlにアク...
#ref(mrtgindex.png,nolink)
* コメント [#p8fa7ac3]
#comment
ページ名:
検索
AND検索
OR検索
編集操作
一覧
単語検索
最終更新
バックアップ
ヘルプ
トップページ
http://kayanomori.net/
↑
アクセス数
本日:0人
昨日:0人
総数:0人
現在:3人
最新の20件
2022-07-16
投票箱
2022-01-30
FrontPage
2022-01-29
めも
2018-02-03
SandBox
PukiWiki
InterWikiName
FormattingRules
PukiWiki/1.4/Manual/Plugin/O-R
PukiWiki/1.4/Manual/Plugin/S-U
InterWiki
日本語
複数画像アップ掲示板 ECOUP(エコアップ) v1.31
日記/2006-12-12
日記
日記/2005-10-04
特定のオートコンプリート履歴だけを削除する
日記/2005-10-06
小ネタ集/WordPress
日記/2005-10-05
整形ルール
edit