Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1356781
  • 博文数量: 416
  • 博客积分: 10495
  • 博客等级: 上将
  • 技术积分: 4258
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-23 22:13
文章分类

全部博文(416)

文章存档

2015年(7)

2014年(42)

2013年(35)

2012年(14)

2011年(17)

2010年(10)

2009年(18)

2008年(127)

2007年(72)

2006年(23)

2005年(51)

分类: 系统运维

2005-06-13 19:49:51

帖出来希望同好及朋友们能够指点1,2,也希望大家帖自己的mrtg.cfg出来让偶参考一下,争取让互相都能取长补短:)

   本站当前所使用的mrtg配置及相关脚本! ( 2003年4月6日3:41 )

帖出来希望同好及朋友们能够指点1,2,也希望大家帖自己的mrtg.cfg出来让偶参考一下,争取让互相都能取长补短:)

=========================== mrtg.cfg =================================

 
### Global Config Options

#  for UNIX
# WorkDir: /home/http/mrtg
WorkDir:/var/www/html/net

#  or for NT
# WorkDir: c:mrtgdata

### Global Defaults

#  to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits
# Options[_]: noborder
Language: gb2312
RunAsDaemon: Yes
LogFormat: rrdtool
refresh: 300
interval: 1
icondir: /mrtg
Maxbytes[_]: 1250000

######################################################################
# System: srv-intel.hzqbbc.com
# Description: Linux srv-intel.hzqbbc.com 2.4.18-6mdksecure #1 SMP Fri Mar 15 01:57:24 CET 2002 i686
# Contact: Root (configure /etc/snmp/snmp.conf)
# Location: Unknown (configure /etc/snmp/snmp.conf)
######################################################################

### Interface 2 >> Descr: 'eth0' │ Name: '' │ Ip: '211.156.176.33' │ Eth: '00-e0-4c-73-3f-64' ###

#--------------------------------------------------------------------#
# Section A - localhost, srv-intel.hzqbbc.com
#--------------------------------------------------------------------#

#---------- eth0 Netwrok traffic ---------#
Target[eth0]: 2:public@srv-intel.hzqbbc.com:
SetEnv[eth0]: MRTG_INT_IP="211.156.176.33" MRTG_INT_DESCR="eth0"
Options[eth0]: noborder, growright, bits
WithPeak[eth0]: dymw
MaxBytes[eth0]: 1250000
Title[eth0]: 网络流量 eth0 -- srv-intel.hzqbbc.com
PageTop[eth0]:

网络流量 eth0 -- srv-intel.hzqbbc.com



   
最高速率:6.8Mbits/s

#---------- end of eth0 traffic mon ---------#

#---------- memory usage and mon ---------#
Target[mem]: `/etc/mrtg/mon/mem/meminfo.pl`
Options[mem]: noborder, growright, nopercent
WithPeak[mem]: dymw
YLegend[mem]: MB of mem used
ShortLegend[mem]:
LegendO[mem]:  MEM used:
LegendI[mem]:  Mem free:
MaxBytes[mem]: 384000000
Title[mem]: 内存使用 meminfo -- srv-intel.hzqbbc.com
PageTop[mem]:

内存使用 -- srv-intel.hzqbbc.com


 
     
 
物理内存:384MB

#---------- end of memory mon ----------#

#---------- cpu usage % mon ----------#
Target[cpuinfo]: `/etc/mrtg/mon/cpuinfo/cpuinfo.pl localhost linux`
MaxBytes[cpuinfo]: 100
Options[cpuinfo]: gauge, nopercent, noborder
Unscaled[cpuinfo]: dwym
WithPeak[cpuinfo]: ymw
YLegend[cpuinfo]: % of CPU used
ShortLegend[cpuinfo]: %
LegendO[cpuinfo]:  CPU System:
LegendI[cpuinfo]:  CPU User:
Title[cpuinfo]: CPU占用监测 -- srv-intel.hzqbbc.com
PageTop[cpuinfo]:

CPU占用监测 -- srv-intel.hzqbbc.com


 
   
 
主机名:srv-intel.hzqbbc.com

#---------- end of cpu mon ----------#

#---------- SMTP server Traffic mon ----------#
Target[postfix]: `/etc/mrtg/mon/postfix/mrtg-pfix-mailstats`
Options[postfix]: gauge, noborder, growright
Title[postfix]: Postfix监测 -- srv-intel.hzqbbc.com
WithPeak[postfix]: dwmy
YLegend[postfix]: No. of messages
ShortLegend[postfix]: messages
MaxBytes[postfix]: 1000000
Legend1[postfix]: Total messages
LegendI[postfix]:  Incoming:
LegendO[postfix]:  Outgoing:
PageTop[postfix]:

Postfix监测 -- srv-intel.hzqbbc.com


   
         
     
Postfix版本:2.0.0.2

#----------- end of SMTP traffic mon ----------#

### test ###
#Target[server-mem]: 1.3.6.1.4.1.2021.4.6.0&1.3.6.1.4.1.2021.4.4.0:public@localhost
#Target[server-mem]: `/etc/mrtg/mon/mem/memory.pl srv-intel.hzqbbc.com`
#MaxBytes1[server-mem]: 384000
#MaxBytes2[server-mem]: 512000
#Title[server-mem]: 内存使用监测 -- srv-intel.hzqbbc.com
#PageTop[server-mem]: 内存使用监测 -- srv-intel.hzqbbc.com
#Options[server-mem]: gauge,absolute,growright
#YLegend[server-mem]: Memory Used(Bytes)
#ShortLegend[server-mem]: (Bytes)
#Legend1[server-mem]: Real Memory
#Legend2[server-mem]: Swap Memory
#LegendI[server-mem]: Real
#LegendO[server-mem]: Swap
#Unscaled[server-mem]: dwmy
#kMG[server-mem]: k,M,G,T,P

#---------- System load mon via SNMP ----------#
Target[server-load]: .1.3.6.1.4.1.2021.10.1.5.1&.1.3.6.1.4.1.2021.10.1.5.2:public@localhost
MaxBytes[server-load]: 60
Title[server-load]: 系统负载监测 -- srv-intel.hzqbbc.com
PageTop[server-load]: 系统负载监测 -- srv-intel.hzqbbc.com
Options[server-load]: gauge, absolute, integer, growright, nopercent, noborder
YLegend[server-load]: CPU Load Average (%)
Legend1[server-load]: 1 min CPU Load Avalage
Legend2[server-load]: 5 min CPU Load Avalage
LegendI[server-load]: 1min
LegendO[server-load]: 5min
ShortLegend[server-load]: percent (%)
Unscaled[server-load]: dwmy
WithPeak[server-load]: dymw
#----------- end of System load mon ---------#

#---------- '/' usage 2 ----------#
Target[disk-r]: `/etc/mrtg/mon/disk/showdisk-r.sh /`
Options[disk-r]: nopercent,growright,nobanner,nolegend,noinfo,integer,gauge
Title[disk-r]: 根分区磁盘使用率(1M block)
YLegend[disk-r]: 1M blocks
ShortLegend[disk-r]:  1M blocks
LegendI[disk-r]: avail 
LegendO[disk-r]: used 
PageTop[disk-r]:

根分区磁盘使用情况(1M block) -- srv-intel.hzqbbc.com


 
       
               
总磁盘容量:24.3GB

#----------- end of '/' usage 2 mon ----------#

#----------- disk usage '/' ----------#
Target[disk-root]: `/etc/mrtg/mon/disk/showdisk.sh /`
Options[disk-root]: nopercent,growright,nobanner,nolegend,noinfo,integer,gauge
Title[disk-root]: 根分区磁盘使用率(1K block)
YLegend[disk-root]: 1k blocks
ShortLegend[disk-root]:  1k blocks
LegendI[disk-root]: avail 
LegendO[disk-root]: used 
PageTop[disk-root]:

根分区磁盘使用情况(1K block) -- srv-intel.hzqbbc.com



   
         
总磁盘容量:24.3GB

#----------- end of '/' usage mon ----------#

#----------- /var usage -----------#
Target[disk-var]: `/etc/mrtg/mon/disk/showdisk.sh /var`
Options[disk-var]: nopercent,growright,nobanner,nolegend,noinfo,integer,gauge
Title[disk-var]: /var/log 使用率
PageTop[disk-var]:

/var/log 使用率


YLegend[disk-var]: 1k blocks
ShortLegend[disk-var]:  1k blocks
LegendI[disk-var]: avail 
LegendO[disk-var]: used 
#---------- end of /var mon ----------#

#---------- '/home' usage mon ----------#
Target[disk-home]: `/etc/mrtg/mon/disk/showdisk.sh /home`
Options[disk-home]: nopercent,growright,nobanner,nolegend,noinfo,integer,gauge
Title[disk-home]: /home 分区磁盘使用率
PageTop[disk-home]:

/home 使用率


YLegend[disk-home]: 1k blocks
MaxBytes[disk-home]: 125000000
#Factor[disk-home]: 1024
#YTics[disk-home]: 10
#YTicsFactor[disk-home]: 1024
ShortLegend[disk-home]:  1k blocks
LegendI[disk-home]: avail 
LegendO[disk-home]: used 
#kMG[disk-home]: k,M,G,T,P
#---------- end of '/home' usage mon ----------#

#----------- TCP connection mon ----------#
Target[server-connection]: `/etc/mrtg/mon/connect/showcont.sh`
MaxBytes[server-connection]: 300
#AbsMax[server-connection]: 450
Title[server-connection]: 网络连接监测 -- srv-intel.hzqbbc.com
PageTop[server-connection]: 网络连接监测 -- srv-intel.hzqbbc.com
Options[server-connection]: gauge, integer, growright, nopercent, noborder
YLegend[server-connection]: TCP Link(s)
Legend1[server-connection]: Time_Wait connection
Legend2[server-connection]: Established connection
LegendI[server-connection]: TIME_WAIT
LegendO[server-connection]: ESTABLISHED
ShortLegend[server-connection]: Link(s)
Unscaled[server-connection]: dwmy
WithPeak[server-connection]: dymw
#----------- end of tcp mon ----------#

#------------------------------------------------------------------------#
# Section B, remote host, devel.hzqbbc.com in CNC
#------------------------------------------------------------------------#

#---------- devel eth0 traffic ----------#
Target[devel-eth0]: 2:public@devel.hzqbbc.com:
SetEnv[devel-eth0]: MRTG_INT_IP="210.21.112.27" MRTG_INT_DESCR="eth0"
Options[devel-eth0]: noborder, growright, bits
WithPeak[devel-eth0]: dymw
MaxBytes[devel-eth0]: 1250000
Title[devel-eth0]: 网络流量 eth0 -- devel.hzqbbc.com
PageTop[devel-eth0]:

网络流量 eth0 -- devel.hzqbbc.com



     
         
最高速率:25Mbits/s

#---------- end of eth0 traffic mon ----------#

#----------- System load mon ----------#
Target[devel-load]: .1.3.6.1.4.1.2021.10.1.5.1&.1.3.6.1.4.1.2021.10.1.5.2:public@devel.hzqbbc.com
MaxBytes[devel-load]: 60
Title[devel-load]: 系统负载监测 -- srv-intel.hzqbbc.com
PageTop[devel-load]: 系统负载监测 -- srv-intel.hzqbbc.com
Options[devel-load]: gauge, absolute, integer, growright, nopercent, noborder
YLegend[devel-load]: CPU Load Average (%)
Legend1[devel-load]: 1 min CPU Load Avalage
Legend2[devel-load]: 5 min CPU Load Avalage
LegendI[devel-load]: 1min
LegendO[devel-load]: 5min
ShortLegend[devel-load]: percent (%)
Unscaled[devel-load]: dwmy
WithPeak[devel-load]: dymw
#------------ end of system load mon ----------#
阅读(1519) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~