|
装好了cacti,登录进去,发现不能显示图像
主要问题是rra下死活不能生成*.rrd文件
centos 4.4 ,rrdtool-1.0.50,mysql-4.1.20-1.RHEL4.1,cacti0.8.6i,cacti0.8.6j都试过
参考了http://bbs.chinaunix.net/viewthread.php?tid=648262
ll
drwxr-xr-x 2 cactiuser root 4096 Apr 23 15:10 rra
这个目录即使给777也一样
Data Source Debug
/usr/local/rrdtool/bin/rrdtool create \
/var/www/html/cacti/rra/202_111_111_31_cpu_system_12.rrd \
--step 300 \
DS:cpu_system:COUNTER:600:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRDTool Command:
/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="202.111.111.31 - Traffic" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
DEF:a="/var/www/html/cacti/rra/202_111_111_31_traffic_in_13.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/html/cacti/rra/202_111_111_31_traffic_in_13.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefaAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefe#002A97:"Outbound" \
GPRINT:cdefeAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s"
RRDTool Says:
ERROR: opening '/var/www/html/cacti/rra/202_111_111_31_traffic_in_13.rrd': No such file or directory
死活不能创建文件
snmpwalk -v 2c -c public yourIP if
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: sit0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifType.3 = INTEGER: tunnel(131)
IF-MIB::ifMtu.1 = INTEGER: 16436
IF-MIB::ifMtu.2 = INTEGER: 1500
IF-MIB::ifMtu.3 = INTEGER: 1480
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifSpeed.2 = Gauge32: 100000000
IF-MIB::ifSpeed.3 = Gauge32: 0
IF-MIB::ifPhysAddress.1 = STRING:
IF-MIB::ifPhysAddress.2 = STRING: 0:50:ba:f1:55:1d
IF-MIB::ifPhysAddress.3 = STRING:
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: up(1)
IF-MIB::ifAdminStatus.3 = INTEGER: down(2)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.2 = INTEGER: up(1)
IF-MIB::ifOperStatus.3 = INTEGER: down(2)
IF-MIB::ifInOctets.1 = Counter32: 6339042
IF-MIB::ifInOctets.2 = Counter32: 624701792
IF-MIB::ifInOctets.3 = Counter32: 0
IF-MIB::ifInUcastPkts.1 = Counter32: 46116
IF-MIB::ifInUcastPkts.2 = Counter32: 672511
IF-MIB::ifInUcastPkts.3 = Counter32: 0
IF-MIB::ifInDiscards.1 = Counter32: 0
IF-MIB::ifInDiscards.2 = Counter32: 0
IF-MIB::ifInDiscards.3 = Counter32: 0
IF-MIB::ifInErrors.1 = Counter32: 0
IF-MIB::ifInErrors.2 = Counter32: 0
IF-MIB::ifInErrors.3 = Counter32: 0
IF-MIB::ifOutOctets.1 = Counter32: 6340815
IF-MIB::ifOutOctets.2 = Counter32: 40387283
IF-MIB::ifOutOctets.3 = Counter32: 0
IF-MIB::ifOutUcastPkts.1 = Counter32: 46140
IF-MIB::ifOutUcastPkts.2 = Counter32: 364564
IF-MIB::ifOutUcastPkts.3 = Counter32: 0
IF-MIB::ifOutDiscards.1 = Counter32: 0
IF-MIB::ifOutDiscards.2 = Counter32: 0
IF-MIB::ifOutDiscards.3 = Counter32: 0
IF-MIB::ifOutErrors.1 = Counter32: 0
IF-MIB::ifOutErrors.2 = Counter32: 0
IF-MIB::ifOutErrors.3 = Counter32: 0
IF-MIB::ifOutQLen.1 = Gauge32: 0
IF-MIB::ifOutQLen.2 = Gauge32: 0
IF-MIB::ifOutQLen.3 = Gauge32: 0
IF-MIB::ifSpecific.1 = OID: SNMPv2-SMI::zeroDotZero
IF-MIB::ifSpecific.2 = OID: SNMPv2-SMI::zeroDotZero
IF-MIB::ifSpecific.3 = OID: SNMPv2-SMI::zeroDotZero
一直没问题
#php /var/www/html/cacti/cmd.php
Content-type: text/html
X-Powered-By: PHP/4.3.9
04/23/2007 03:10:21 PM - CMDPHP: Poller[0] Host[2] DS[9] WARNING: Result from SNMP not valid. Partial Result:
04/23/2007 03:10:21 PM - CMDPHP: Poller[0] Host[2] DS[10] WARNING: Result from SNMP not valid. Partial Result:
04/23/2007 03:10:21 PM - CMDPHP: Poller[0] Host[3] DS[12] WARNING: Result from SNMP not valid. Partial Result:
04/23/2007 03:10:21 PM - CMDPHP: Poller[0] Time: 0.4547 s, Theads: N/A, Hosts: 3
You have new mail in /var/spool/mail/cactiuser
#php /var/www/html/cacti/poller.php
OK u:0.00 s:0.01 r:0.07
OK u:0.00 s:0.01 r:0.07
OK u:0.00 s:0.01 r:0.07
OK u:0.00 s:0.01 r:0.07
OK u:0.01 s:0.01 r:0.11
OK u:0.01 s:0.01 r:0.11
ERROR: illegal attempt to update using time 1177312226 when last update time is 1177312226 (minimum one second step)
Content-type: text/html
X-Powered-By: PHP/4.3.9
04/23/2007 03:10:26 PM - SYSTEM STATS: Time:1.3502 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:9 RRDsProcessed:18
另外,1:除了监控linux本机,还建了一个host监控winxp,同样图像出不来。(winxp的snmp装了,snmpwalk同样没问题)
2:cacti0.8.6j解压后权限很奇怪,即使我chown root.root cacti-0.8.6j,chmod -R 777 cacti-0.8.6j也不能运行php,cp出来就可以
drwxr-xr-x 11 1000 users 4096 Jan 18 08:23 cacti-0.8.6j
请求大家帮忙。 |
|