Chinaunix

标题: MRTG 配置实例 -1 [打印本页]

作者: ailms    时间: 2008-03-03 10:39
标题: MRTG 配置实例 -1
1、配置文件按功能归类,并为每个主机建立子目录
               
               
                [root@monitor mrtg]# ll
×ÜÓÃÁ¿ 112
drwxr-xr-x    2 root     root         4096  1Ô  9 17:02 as1
drwxr-xr-x    2 root     root         4096 2007-01-31  as2
drwxr-xr-x    2 root     root         4096 2007-01-31  as3
drwxr-xr-x    2 root     root         4096 2007-01-31  as4
drwxr-xr-x    2 root     root         4096 2007-01-31  as5
drwxr-xr-x    2 root     root         4096 2007-01-31  as6
drwxr-xr-x    2 root     root         4096 2007-01-31  as7
drwxr-xr-x    2 root     root         8192  3Ô  3 10:35 db1
drwxr-xr-x    2 root     root         4096  3Ô  3 10:36 db2
-rw-------    1 root     root          897 2007-01-31  important_status.cfg
-rw-r--r--    1 root     root            0  3Ô  3 10:36 important_status.ok
-rw-------    1 root     root          480 2007-01-31  io_perfermance.cfg
-rw-r--r--    1 root     root            0  1Ô  9 16:46 io_perfermance.ok
drwxr-xr-x    2 root     root         4096 2007-01-23  localhost
-rw-r--r--    1 root     root          300 2006-10-30  localhost.cfg
-rw-r--r--    1 root     root            0 2007-01-30  localhost.ok
-rw-r--r--    1 root     root            0 2006-10-24  mrtg.ok
-rw-------    1 root     root         1616 2007-04-18  normal_status.cfg
-rw-r--r--    1 root     root            0  3Ô  3 10:06 normal_status.ok
drwxr-xr-x    2 root     root         4096 2007-08-20  router
-rwxr-xr-x    1 root     root         5753 2006-11-24  send_input_alert.sh
-rwxr-xr-x    1 root     root         4639 2006-11-07  send_input_alert.sh.raw
-rwxr-xr-x    1 root     root         5567 2006-11-24  send_output_alert.sh
-rwxr-xr-x    1 root     root         4520 2006-11-07  send_output_alert.sh.raw
-rw-r--r--    1 root     root         4763 2006-11-04  target_info
-rw-r--r--    1 root     root         3347 2006-11-02  target_info.new
-rw-r--r--    1 root     root            0 2006-10-30  test.ok
-rw-------    1 root     root          465 2007-02-02  usage_detect.cfg
-rw-r--r--    1 root     root            0  3Ô  3 10:05 usage_detect.ok
[root@monitor mrtg]
2、配置文件的格式
[root@monitor mrtg]# cat important_status.cfg
WorkDir: /var/www/html/mrtg
Language: chinese
Refresh: 300
Include: /etc/mrtg/db1/hacmp.cfg
Include: /etc/mrtg/db1/service_status.cfg
Include: /etc/mrtg/db1/dbvg1-2.cfg
Include: /etc/mrtg/db1/dbvg3-4.cfg
Include: /etc/mrtg/db1/dbvg5.cfg
Include: /etc/mrtg/db2/vg.cfg
Include: /etc/mrtg/as1/system_up.cfg
Include: /etc/mrtg/as2/system_up.cfg
Include: /etc/mrtg/as3/system_up.cfg
Include: /etc/mrtg/as4/system_up.cfg
Include: /etc/mrtg/as5/system_up.cfg
Include: /etc/mrtg/as6/system_up.cfg
Include: /etc/mrtg/as7/system_up.cfg
Include: /etc/mrtg/router/guangju_gateway_status.cfg
Include: /etc/mrtg/router/local_gateway_status.cfg
Include: /etc/mrtg/as1/mount_info.cfg
Include: /etc/mrtg/as2/mount_info.cfg
Include: /etc/mrtg/as3/mount_info.cfg
Include: /etc/mrtg/as4/mount_info.cfg
Include: /etc/mrtg/as5/mount_info.cfg
Include: /etc/mrtg/as6/mount_info.cfg
Include: /etc/mrtg/as7/mount_info.cfg
[root@monitor mrtg]
3、具体某个主机的配置目录 :
[root@monitor db1]# ll *.cfg
-rw-r--r--    1 root     root         1265 2007-01-31  alarm.cfg
-rw-r--r--    1 root     root         1203 2007-01-31  cdr1.cfg
-rw-r--r--    1 root     root         1203 2007-01-31  cdr2.cfg
-rw-r--r--    1 root     root         1203 2007-01-31  cdr3.cfg
-rw-r--r--    1 root     root         1203 2007-01-31  cdr4.cfg
-rw-r--r--    1 root     root         1203 2007-01-31  cdr5.cfg
-rw-r--r--    1 root     root         1401 2007-01-31  cdr_del_proc_status.cfg
-rw-r--r--    1 root     root         1366  1ÔÂ 10 10:01 cdr_stats.cfg
-rw-r--r--    1 root     root         1233 2007-01-31  db1_cpu_usage.cfg
-rw-r--r--    1 root     root         1502 2007-01-31  dbvg1-2.cfg
-rw-r--r--    1 root     root         1503 2007-01-31  dbvg3-4.cfg
-rw-r--r--    1 root     root         1258 2007-01-31  dbvg5.cfg
-rw-r--r--    1 root     root         1553 2007-01-31  external_user.cfg
-rw-r--r--    1 root     root         1321 2007-01-31  hacmp.cfg
-rw-r--r--    1 root     root         1052 2007-01-31  oradata1_io.cfg
-rw-r--r--    1 root     root         1052 2007-01-31  oradata2_io.cfg
-rw-r--r--    1 root     root         1052 2007-01-31  oradata3_io.cfg
-rw-r--r--    1 root     root         1052 2007-01-31  oradata4_io.cfg
-rw-r--r--    1 root     root         1052 2007-01-31  oradata5_io.cfg
-rw-r--r--    1 root     root         1388 2007-01-31  service_status.cfg
-rw-r--r--    1 root     root         1224 2007-01-31  sys_load.cfg
[root@monitor db1]


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/12066/showart_488213.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2