kawama.jp

mrtgのインストール・設定

カテゴリ: サーバー — 2007年10月8日 11:29 — Comments (0)hatebu count

mrtgを入れました。
まずはyumでインストール。

# yum install net-snmp
# yum install net-snmp-utils
# yum install mrtg

/etc/snmp/snmpd.confを編集。

# sec.name source community
#com2sec notConfigUser default public
com2sec local localhost private
# groupName securityModel securityName
#group notConfigGroup v1 notConfigUser
#group notConfigGroup v2c notConfigUser
group MYROGroup v1 local
group MYROGroup v2c local
group MYROGroup usm local
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
#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
# group context sec.model sec.level prefix read write notif
#access notConfigGroup “” any noauth exact systemview none none
access MYROGroup “” any noauth exact all all none
#disk / 10000
disk / 10000

そしてsnmpdを起動。

# /etc/rc.d/init.d/snmpd start
# chkconfig snmpd on

/etc/mrtg.mrtg.cfgの編集。
※以下の例は、メモリは498516、swapは1052248

WorkDir: /var/www/mrtg
Refresh: 300
Language: eucjp
### Traffic Analysis ###
Target[traffic]: 2:private@localhost:
MaxBytes[traffic]: 12500000
Options[traffic]: growright
Title[traffic]: Traffic Analysis
PageTop[traffic]:

Traffic Analysis


###CPU Used###
Target[cpu]: .1.3.6.1.4.1.2021.10.1.5.1&.1.3.6.1.4.1.2021.10.1.5.2:private@localhost
MaxBytes[cpu]: 100
Unscaled[cpu]: dwmy
Options[cpu]: gauge, absolute, growright, nopercent
YLegend[cpu]: CPU Load Av. (%)
ShortLegend[cpu]:%
LegendI[cpu]: 1minute
LegendO[cpu]: 5minute
Legend1[cpu]: 1minute(%)
Legend2[cpu]: 5minute(%)_
Title[cpu]: CPU Load
PageTop[cpu]:

CPU Load Average


### Memory Used ###
Target[mem]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.4.0:private@localhost
MaxBytes1[mem]: 498516
MaxBytes2[mem]: 1052248
Unscaled[mem]: dwmy
Options[mem]: gauge, absolute, growright
YLegend[mem]: Memory Used (MB)
ShortLegend[mem]:Bytes
kilo[mem]: 1024
kMG[mem]: k,M,G,T,P
LegendI[mem]: Real
LegendO[mem]: Swap
Legend1[mem]: Physics Memory(MB)
Legend2[mem]: Physice Swap(MB)
Title[mem]: Memory Used
PageTop[mem]:

Memory Used


### Disk Used ###
Target[disk]: .1.3.6.1.4.1.2021.9.1.9.1&.1.3.6.1.4.1.2021.9.1.9.1:private@localhost
MaxBytes[disk]: 100
Unscaled[disk]: dwmy
Options[disk]: gauge, absolute, growright, nopercent, noinfo
YLegend[disk]: Disk Used(%)
ShortLegend[disk]: (%)
LegendI[disk]: / Disk used
LegendO[disk]: / Disk Used
Legend1[disk]: / Disk used
Legend2[disk]: / Disk used
Title[disk]: Disk Used
PageTop[disk]:

Disk Used

mrtgを実行。

# mrtg /etc/mrtg/mrtg.cfg
# mrtg /etc/mrtg/mrtg.cfg
# mrtg /etc/mrtg/mrtg.cfg

インデックス作成。

indexmaker /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html

以上ですべて完了。
今のところはうまく動いているようです。
参考サイト
http://www.k2.dynsite.net/redhat/14.MRTG.htm
http://centossrv.com/net-snmp-mrtg.shtml
http://fedorasrv.com/mrtg.shtml
http://crosss.jugem.jp/?eid=76

コメントはまだありません »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Copyright (C) 2002 - 2017 kawama All Rights Reserved. — Powered by WordPress