歡迎您光臨本站 註冊首頁

CACTI不能顯示圖像,rra下沒有文件!許可權,PATH,snmpwalk沒問題

裝好了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:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefe#002A97:"Outbound"  \
GPRINT:cdefe:LAST:"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 Host DS WARNING: Result from SNMP not valid.  Partial Result:
04/23/2007 03:10:21 PM - CMDPHP: Poller Host DS WARNING: Result from SNMP not valid.  Partial Result:
04/23/2007 03:10:21 PM - CMDPHP: Poller Host DS WARNING: Result from SNMP not valid.  Partial Result:
04/23/2007 03:10:21 PM - CMDPHP: Poller 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

請求大家幫忙。
《解決方案》

這個問題跟我的一模一樣啊,為什麼rrd文件出不來啊?
《解決方案》

原帖由 itxiaofei 於 2007-4-23 15:34 發表於 1樓  
裝好了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.ne ...


這可能是Cacti在WEB裡面的設置.有一個fonts路徑,你可能設置錯啦.....
《解決方案》

我也是這樣的問題,難道沒有高手來給看看嗎
《解決方案》

頂上去,這個問題我也是遇到了,其他都正常,就是沒有文件生成,鬱悶ing
《解決方案》

今天也碰到這個問題,跟樓主的現象一樣,已經解決了。

是cacti中全局配置(settings)中的
RRDTool Default Font Path
The path to the rrdtool default true type font for version 1.2 and above.
這一項沒有填對。
《解決方案》

RRDTool Default Font Path 設定是 /usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf

但是...還是無法解決這個問題...我也有相同的狀況...舊的監控HOST一直都有在UPDATE資料,但想要新建HOST來監控

但是圖一直出不來
《解決方案》

就是,有沒有正解?我在win2003環境下也出現這樣的情況
《解決方案》

去檢查一下裝包情況:下面這些包是否都裝上了。
# rpm -qa | grep php
php-cli-5.1.6-15.el5
php-ldap-5.1.6-15.el5
php-mbstring-5.1.6-15.el5
php-common-5.1.6-15.el5
php-gd-5.1.6-15.el5
php-5.1.6-15.el5
php-mysql-5.1.6-15.el5
php-snmp-5.1.6-15.el5
php-pdo-5.1.6-15.el5
       
        # rpm -qa | grep mysql
libdbi-dbd-mysql-0.8.1a-1.2.2
mysql-devel-5.0.22-2.1.0.1
mysql-server-5.0.22-2.1.0.1
mysql-connector-odbc-3.51.12-2.2
php-mysql-5.1.6-15.el5
mysql-5.0.22-2.1.0.1

# rpm -qa | grep snmp
net-snmp-5.3.1-19.el5
net-snmp-libs-5.3.1-19.el5
net-snmp-utils-5.3.1-19.el5
net-snmp-devel-5.3.1-19.el5
php-snmp-5.1.6-15.el5

還有這些。如果都裝上了,拿具體的配置過程和步驟來看看吧。
(說明一下,我是在RHEL5.1下做的,已經正常跑起來了。
我覺得系統的版本方面應該考慮用高版本的系統,RHEL4已經快被淘汰了。)
《解決方案》

怪 了 我也是這個問題 怎麼回事呢 :em11: :em11: :em11:

[火星人 ] CACTI不能顯示圖像,rra下沒有文件!許可權,PATH,snmpwalk沒問題已經有4280次圍觀

http://coctec.com/docs/service/show-post-12324.html