以下web01.cfgに追加した。 ※エンジニア初期に作ったものなのでかなり失敗している可能性大 Options[_]: growright,gauge #####閾値監視を行いたい場合には、MRTG以外にも環境を用意する #####参考URL:http://www.atmarkit.co.jp/flinux/rensai/root08/root08b.html ##### #----------------------------------------------------------------- # 閾値を超えた場合のスクリプトの定義 # どのパラメータを対象とする場合も同じスクリプトを利用する #----------------------------------------------------------------- ThreshDir: /srv/www/mrtg/web01/threshdir ThreshProgI[_]: /usr/local/bin/mrtg_warning.pl ThreshProgO[_]: /usr/local/bin/mrtg_warning.pl ThreshProgOKI[_]: /usr/local/bin/mrtg_recovery.pl ThreshProgOKO[_]: /usr/local/bin/mrtg_recovery.pl #----------------------------------------------------------------- # vmware-hostdプロセス数の数 #----------------------------------------------------------------- Target[vmware-hostd]: .1.3.6.1.4.1.2021.8.1.101.2&.1.3.6.1.4.1.2021.8.1.101.2:public@web01 ThreshMinI[vmware-hostd]: 1 SetEnv[vmware-hostd]: EMAIL="administrator@hogehoge.com" URL="http://webserver/mrtg/web01/vmware-hostd.html" HOST="web01" SEVERITY="Warning" MaxBytes[vmware-hostd]: 1 Unscaled[vmware-hostd]: dwmy Title[vmware-hostd]: VMware Server Status PageTop[vmware-hostd]: <H1> VMware Server Status on web01</H1> YLegend[vmware-hostd]: VMware Status ShortLegend[vmware-hostd]: vmware LegendI[vmware-hostd]:process LegendO[vmware-hostd]:process #----------------------------------------------------------------- # 稼動バーチャルマシンの数 #----------------------------------------------------------------- Target[vm-machines]: .1.3.6.1.4.1.2021.8.1.101.3&.1.3.6.1.4.1.2021.8.1.101.3:public@web01 MaxBytes[vm-machines]: 12 Unscaled[vm-machines]: dwmy Title[vm-machines]: Number of Virtual Machines PageTop[vm-machines]: <H1> Number of Virtual Machines </H1> YLegend[vm-machines]: Virtual Machines ShortLegend[vm-machines]: Virtual Machines LegendI[vm-machines]: machines LegendO[vm-machines]: machines #----------------------------------------------------------------- # CPUのロードアベレージ x 100 # (グラフ化するのは1分間平均 x 100、および15分平均 x 100) # ShortLegend[la]の値は全角スペースを指定し、単位なしにする #----------------------------------------------------------------- Target[la]: .1.3.6.1.4.1.2021.10.1.5.1&.1.3.6.1.4.1.2021.10.1.5.3:public@web01 ThreshMaxI[la]: 1000 SetEnv[la]: EMAIL="administrator@hogehoge.com" URL="http://webserver/mrtg/web01/la.html" HOST="web01" SEVERITY="Warning" MaxBytes[la]:3000 Title[la]: Load Average PageTop[la]: <H1> Load Average on web01</H1> YLegend[la]: Load Average ShortLegend[la]: - LegendI[la]:1 min Average LegendO[la]:15 min Average #----------------------------------------------------------------- # CPU使用率 #----------------------------------------------------------------- Target[cpu]: .1.3.6.1.4.1.2021.11.11.0&.1.3.6.1.4.1.2021.11.11.0:public@web01 ThreshMinI[cpu]: 5 SetEnv[cpu]: EMAIL="administrator@hogehoge.com" URL="http://webserver/mrtg/web01/cpu.html" HOST="web01" SEVERITY="Warning" MaxBytes[cpu]: 100 Unscaled[cpu]: dwmy Title[cpu]: CPU Usage "idle" PageTop[cpu]: <H1> CPU Idle on web01</H1> YLegend[cpu]: CPU Idle(%) ShortLegend[cpu]: % LegendI[cpu]:idle LegendO[cpu]:idle #----------------------------------------------------------------- # ディスク使用状況 # (グラフ化するのはAgent側で設定した/,/home1の使用率) #----------------------------------------------------------------- Target[df]: .1.3.6.1.4.1.2021.9.1.9.1&.1.3.6.1.4.1.2021.9.1.9.2:public@web01 ThreshMaxI[df]: 80 SetEnv[df]: EMAIL="administrator@hogehoge.com" URL="http://webserver/mrtg/web01/df.html" HOST="web01" SEVERITY="Warning" MaxBytes[df]: 100 Unscaled[df]: dwmy Title[df]: Disk Usage "/" and "/home1" PageTop[df]: <H1>Disk Usage "/" and "/home1" on web01</H1> YLegend[df]: Disk Usage ShortLegend[df]: % LegendI[df]:/ LegendO[df]:/home1 #----------------------------------------------------------------- # メモリ使用状況(グラフ化するのは実メモリおよびスワップの空き領域) # MaxByteには実験機の総スワップ量を指定 #----------------------------------------------------------------- Target[mem]: .1.3.6.1.4.1.2021.4.4.0&.1.3.6.1.4.1.2021.4.6.0:public@web01 ThreshMinO[mem]: 50 SetEnv[mem]: EMAIL="administrator@hogehoge.com" URL="http://webserver/mrtg/web01/mem.html" HOST="web01" SEVERITY="Warning" MaxBytes[mem]: 3774873 Title[mem]: Available Memory ("real" and "swap") PageTop[mem]: <H1>Available Memory "real" and "swap" on web01</H1> YLegend[mem]: Available Memory ShortLegend[mem]: kbyte LegendI[mem]:Swap Available LegendO[mem]:Real Memory Available #----------------------------------------------------------------- # メモリ実使用量(グラフ化するのはメモリ使用率) #----------------------------------------------------------------- Target[pmem]: .1.3.6.1.4.1.2021.8.1.101.1&.1.3.6.1.4.1.2021.8.1.101.1:public@web01 ThreshMaxI[pmem]: 90 SetEnv[pmem]: EMAIL="administrator@hogehoge.com" URL="http://webserver/mrtg/web01/mem.html" HOST="web01" SEVERITY="Warning" MaxBytes[pmem]: 100 Title[pmem]: Real Memory Used PageTop[pmem]: <H1>Real Memory Used on web01</H1> Unscaled[pmem]: dwmy YLegend[pmem]: Real Memory(%) ShortLegend[pmem]: % LegendI[pmem]:Real Memory LegendO[pmem]:Real Memory #----------------------------------------------------------------- # DISK I/O状況(グラフ化するのは/dev/cciss/c0d0t1) #----------------------------------------------------------------- Target[diskio]: .1.3.6.1.4.1.2021.13.15.1.1.3.2&.1.3.6.1.4.1.2021.13.15.1.1.4.2:public@web01 Options[diskio]: growright SetEnv[diskio]: EMAIL="administrator@hogehoge.com" URL="http://webserver/mrtg/web01/diskio.html" HOST="web01" SEVERITY="Warning" MaxBytes[diskio]: 999999999 Title[diskio]: Disk I/O (c0d0t1) PageTop[diskio]: <H1>Disk I/O (c0d0t1) on web01</H1> YLegend[diskio]: Disk I/O ShortLegend[diskio]: times LegendI[diskio]:Read LegendO[diskio]:Write #----------------------------------------------------------------- # DISK I/O状況(グラフ化するのは/dev/cciss/c0d1) #----------------------------------------------------------------- Target[diskio2]: .1.3.6.1.4.1.2021.13.15.1.1.3.4&.1.3.6.1.4.1.2021.13.15.1.1.4.4:public@web01 Options[diskio2]: growright SetEnv[diskio2]: EMAIL="administrator@hogehoge.com" URL="http://webserver/mrtg/web01/diskio2.html" HOST="web01" SEVERITY="Warning" MaxBytes[diskio2]: 999999999 Title[diskio2]: Disk I/O (c0d1) PageTop[diskio2]: <H1>Disk I/O (c0d1) on web01</H1> YLegend[diskio2]: Disk I/O ShortLegend[diskio2]: times LegendI[diskio2]:Read LegendO[diskio2]:Write #----------------------------------------------------------------- # SWAP DISK I/O状況(グラフ化するのはSwapのDISK I/O) # MaxByteには実験機の総スワップ量を指定 #----------------------------------------------------------------- Target[swapio]: .1.3.6.1.4.1.2021.13.15.1.1.3.3&.1.3.6.1.4.1.2021.13.15.1.1.4.3:public@web01 ThreshMaxI[swapio]: 10000000 ThreshMaxO[swapio]: 10000000 Options[swapio]: growright SetEnv[swapio]: EMAIL="administrator@hogehoge.com" URL="http://webserver/mrtg/web01/swapio.html" HOST="web01" SEVERITY="Warning" MaxBytes[swapio]: 10737418240 Title[swapio]: Swap Disk I/O PageTop[swapio]: <H1>Swap Disk I/O on web01</H1> YLegend[swapio]: SWAP I/O ShortLegend[swapio]: byte LegendI[swapio]:Swap Read LegendO[swapio]:Swap Write |