準備

apt-get script install-devel.lua

SNMP

http://www.stackasterisk.jp/tech/systemManagement/...
apt-get  install net-snmp
apt-get  install net-snmp-utils
apt-get script install-devel.lu
/etc/snmp/snmpd.conf
http://www.atmarkit.co.jp/flinux/rensai/root07/roo...
rwcommunity  private
com2sec local            localhost         private
com2sec securenet        192.168.1.0/24    secure
group   local_group        v1              local
group   local_group        v2c             local
group   local_group        usm             local
group   secure_group       v1              securenet
group   secure_group       v2c             securenet
group   secure_group       usm             securenet
view    all               included        .1                      80
view    view_mib2         included        .1.3.6.1.2.1            fc
view    view_ucdavis      included        .1.3.6.1.4.1.2021       fe
access  local_group     ""    any      noauth       exact   view_all    none     none
access  secure_group    ""    any      noauth       exact   view_mib2   none     none
syslocation hogefuga
syscontact root<root@example.com>
disk / 1000000
snmp テスト
/ の利用率。df の表示より1%すくないかも。
snmpwalk -v 1 -c private localhost  .1.3.6.1.4.1.2021.9.1.9.1
格納情報一覧
snmptranslate -Tp

zlib

VineLinux4.0 には入ってるぽい
http://www.zlib.net/
cd /usr/local/src
wget http://www.zlib.net/zlib-1.2.3.tar.gz
tar -xvzf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install

libpng

VineLinux4.0 には入ってるぽい
http://www.libpng.org/pub/png/libpng.html
cd /usr/local/src
wget http://jaist.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.8-config.tar.gz
tar -xvzf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config
cp scripts/makefile.linux ./makefile
make install

gd

apt-get install gd

MRTG

http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pu...
cd /usr/local/src
wget http://people.ee.ethz.ch/~oetiker/webtools/mrtg/pub/mrtg-2.14.5.tar.gz
tar -xvzf mrtg-2.14.5.tar.gz
cd mrtg-2.14.5
./configure
make
make install
mkdir -p /usr/local/mrtg-2/data
mkdir /usr/local/mrtg-2/data/traffic
mkdir /usr/local/mrtg-2/data/cpu
mkdir /usr/local/mrtg-2/data/memory
mkdir /usr/local/mrtg-2/data/disk

cd translate/
./mergelocale.pl skeleton.pm0 eucjp.pmd
cp locales_mrtg.pm /usr/local/mrtg-2/lib/mrtg2/
mrtg.cfg 作成
http://www.tomo.ac/goodstream/server/snmp/fc2-mrtg...
sv1サーバ名
/usr/local/mrtg-2/data/画像とHTML 作成ディレクトリ
# This file is for use with mrtg-2.5.4c

# Global configuration
WorkDir: /usr/local/mrtg-2/data
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
WriteExpires: Yes

# CPU Load Average
Target[cpu]: laLoadInt.1&laLoadInt.2:public@localhost
MaxBytes[cpu]: 100
Unscaled[cpu]: dwmy
Options[cpu]: gauge,nopercent,growright
Title[cpu]: CPU Load Average
PageTop[cpu]: <H1>CPU Load Average</H1>
YLegend[cpu]: sv1 LA (%)
ShortLegend[cpu]: %
LegendI[cpu]: 1min
LegendO[cpu]: 5min

# Memory Usage
Target[mem]: memAvailReal.0&memTotalReal.0:public@localhost
MaxBytes[mem]: 2048000
Unscaled[mem]: dwmy
Options[mem]: gauge,nopercent,integer,growright
Title[mem]: Memory Usage
PageTop[mem]: <H1>Memory Usage</H1>
YLegend[mem]: sv1 Mem
kMG[mem]: k,M,G,T,P
ShortLegend[mem]: B
LegendI[mem]: Available
LegendO[mem]: Total

# Network Usage
Target[eth0]: 2:public@localhost:
SetEnv[eth0]: MRTG_INT_IP="" MRTG_INT_DESCR="eth0"
Options[eth0]: growright
MaxBytes[eth0]: 1250000
Title[eth0]: Traffic for eth0
PageTop[eth0]: <H1>Traffic for eth0</H1>
YLegend[eth0]: sv1 eth0

# Disk Space
Target[hd]: .1.3.6.1.4.1.2021.9.1.9.1&.1.3.6.1.4.1.2021.9.1.9.1:public@localhost
MaxBytes[hd]: 100
Unscaled[hd]: dwmy
Options[hd]: gauge,absolute,growright,nopercent,unknaszero
Title[hd]: Disk Space
PageTop[hd]: <H1>Disk Space</H1>
YLegend[hd]: sv1 Disk (%)
ShortLegend[hd]: %
LegendI[hd]: /
LegendO[hd]: /
Legend1[hd]: /
Legend2[hd]: /
mrtg 実行
./bin/mrtg mrtg.cfg
index.html 作成
cd data
../bin/indexmaker ../mrtg.cfg > index.html
リンク
cd /home/httpd/html
ln -s /usr/local/mrtg-2/data/ mrtg

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

Wiki内検索

編集にはIDが必要です