proc sendmail file /var/log/mail.log |
$ snmpwalk -v 2c -c public
localhost |
$ snmpwalk -v 2c -c
public
localhost ifSpeed IF-MIB::ifSpeed.1 = Gauge32: 10000000 IF-MIB::ifSpeed.2 = Gauge32: 100000000 IF-MIB::ifSpeed.3 = Gauge32: 100000000 IF-MIB::ifSpeed.4 = Gauge32: 0 |
$ snmpwalk -v 2c -c public
localhost prTable |
$ snmpwalk -v 2c -c public
localhost fileTable |
$ snmpget -v 2c -c public
localhost ifSpeed.1 IF-MIB::ifSpeed.1 = Gauge32: 1000000 $snmpget -v 2c -c public localhost prCount.1 UCD-SNMP-MIB::prCount.1 = INTEGER: 0 $snmpget -v 2c -c public localhost fileSize.1 UCD-SNMP-MIB::fileSize.1 = INTEGER: 776 kB |
$ cfgmaker \ > --global 'WorkDir: /var/www/mrtg'\ > --global 'Options[_]: bits,growright' \ > --output /home/hoge/mrtg.cfg \ > public@localhost |
#EnableIPv6: no #WorkDir: /var/www/mrtg--global WorkDir: /home/hoge/public_html/mrtg |
# cd /etc # mrtg mrtg.cfg |
# Created by # /usr/bin/cfgmaker --global "WorkDir: /var/www/mrtg" --global "Options[_]: bits,growright" --output /home/hoge/mrtg.cfg public@localhost ### Global Config Options # for UNIX # WorkDir: /home/http/mrtg # for Debian #WorkDir: /var/www/mrtg # or for NT # WorkDir: c:\mrtgdata ### Global Defaults # to get bits instead of bytes and graphs growing to the right # Options[_]: growright, bits #EnableIPv6: no #WorkDir: /var/www/mrtg WorkDir: /home/hoge/public_html/mrtg Options[_]: bits,growright ###################################################################### # System: dti-vps-srv27 # Description: Linux dti-vps-srv27 2.6.18-194.3.1.el5.028stab069.6 #1 SMP Wed May 26 18:31:05 MSD 2010 i686 # Contact: hoge@hogehoge.com # Location: "Computer Room 01" ###################################################################### ### Interface 1 >> Descr: 'lo' | Name: 'lo' | Ip: '127.0.0.1' | Eth: '' ### ### The following interface is commented out because: ### * it is a Software Loopback interface # # Target[localhost_1]: 1:public@localhost: # SetEnv[localhost_1]: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="venet0" # MaxBytes[localhost_1]: 1250000 # Title[localhost_1]: Traffic Analysis for 1 -- dti-vps-srv27 # PageTop[localhost_1]: <h1>Traffic Analysis for 1 -- dti-vps-srv27</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>dti-vps-srv27 in "Computer Room 01"</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>hoge@hoge.com</td> # </tr> # <tr> # <td>Description:</td> # <td>lo </td> # </tr> # <tr> # <td>ifType:</td> # <td>softwareLoopback (24)</td> # </tr> # <tr> # <td>ifName:</td> # <td>lo</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>10.0 Mbits/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>127.0.0.1 (localhost.localdomain)</td> # </tr> # </table> # </div> ### Interface 3 >> Descr: 'venet0' | Name: 'venet0' | Ip: '183.181.2.77' | Eth: '' ### ### The following interface is commented out because: ### * has a speed of 0 which makes no sense # Target[localhost_3]: 3:public@localhost: SetEnv[localhost_3]: MRTG_INT_IP="183.181.2.77" MRTG_INT_DESCR="venet0" MaxBytes[localhost_3]: 1250000 Title[localhost_3]: Traffic Analysis for 3 -- dti-vps-srv27 PageTop[localhost_3]: <h1>Traffic Analysis for 3 -- dti-vps-srv27</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>dti-vps-srv27 in "Computer Room 01"</td> </tr> <tr> <td>Maintainer:</td> <td>hoge@hogehoge.com</td> </tr> <tr> <td>Description:</td> <td>venet0 </td> </tr> <tr> <td>ifType:</td> <td>Other (1)</td> </tr> <tr> <td>ifName:</td> <td>venet0</td> </tr> <tr> <td>Max Speed:</td> <td>10.0 Mbits/s</td> </tr> <tr> <td>Ip:</td> <td>183.181.2.77 (v-183-181-2-77.ub-freebit.net)</td> </tr> </table> </div> |
# snmpwalk -v 2c -c public
localhost laLoadInt <-----
public
はコミュニティ名 UCD-SNMP-MIB::laLoadInt.1 = INTEGER: 68 <----- 1分間の平均ロードアベレージ UCD-SNMP-MIB::laLoadInt.2 = INTEGER: 53 <----- 5分間の平均ロードアベレージ UCD-SNMP-MIB::laLoadInt.3 = INTEGER: 20 < -----15分間の平均ロードアベレージ |
# snmpwalk -v 2c -c public
localhost laLoadInt <-----
public
はコミュニティ名 UCD-SNMP-MIB::laLoadInt.1 = INTEGER: 68 <----- 1分間の平均ロードアベレージ UCD-SNMP-MIB::laLoadInt.2 = INTEGER: 53 <----- 5分間の平均ロードアベレージ UCD-SNMP-MIB::laLoadInt.3 = INTEGER: 20 < -----15分間の平均ロードアベレージ |
Target[cpu]:
laLoadInt.1&laLoadInt.2:public@localhost MaxBytes[cpu]: 1000 <------最大取得データ量 Options[cpu]: gauge,nopercent <---- gaugeを指定すると前回との差分をとらない。nopercentでパーセント表示にしない。 Title[cpu]: Load average <---- Webページタイトル PageTop[cpu]: <H1> Load average</H1> YLegend[cpu]: by 100 <---- グラフのY軸のラベル ShortLegend[cpu]: <---- 単位として表示する文字列 LegendI[cpu]:1min <---- 第1パラメータ(laLoadInt.1)につけるラベル。 LegendO[cpu]:5min <---- 第2パラメータ (laLoadInt.1)につけるラベル。 |
# cd /etc # mrtg mrtg.cfg |
snmpd[753]: error on
subcontainer 'ia_addr' insert (-1) |
# This file controls the
activity of snmpd # Don't load any MIBs by default. # You might comment this lines once you have the MIBs downloaded. export MIBS= # snmpd control (yes means start daemon). SNMPDRUN=yes # snmpd options (use syslog, close stdin/out/err). SNMPDOPTS='-LS6d -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid' |