歡迎您光臨本站 註冊首頁

cacti有圖,無數據,顯示為nan

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

cacti有圖,無數據,顯示為nan

snmpd測試無報錯,rrdtool測試為nan

log和rra已經改為 cactiuser 777了

也運行php /var/www/cacti/poller.php

用cactiuser 寫入crontab -e

*/1  * * * * php /var/www/cacti/poller> /dev/null 2>&1



曾一度成功獲取數據,但第二天發現一點數據也沒有了,依然變成nan了。請各位協助一下!

cacti版本為0.8.7c mysql5 php5 apache2   centos和debian都裝了,也出現這個問題

debian下apt-get install cacti可以正常使用,但版本是cacti 0.8.7b的,現在我需要使用cacti 0.8.7c  所下載的cacti 0.8.7c是直接解壓使用的



debian:/var/www/cacti/rra# rrdtool info xxxx_traffic_in_9.rrd
filename = "xxxx_traffic_in_9.rrd"
rrd_version = "0003"
step = 300
last_update = 1257448008
ds.type = "COUNTER"
ds.minimal_heartbeat = 600
ds.min = 0.0000000000e+00
ds.max = 1.0000000000e+09
ds.last_ds = "59475824632606"
ds.value = 0.0000000000e+00
ds.unknown_sec = 108
ds.type = "COUNTER"
ds.minimal_heartbeat = 600
ds.min = 0.0000000000e+00
ds.max = 1.0000000000e+09
ds.last_ds = "542785027394230"
ds.value = 0.0000000000e+00
ds.unknown_sec = 108
rra.cf = "AVERAGE"
rra.rows = 600
rra.cur_row = 7
rra.pdp_per_row = 1
rra.xff = 5.0000000000e-01
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 0
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 0
rra.cf = "AVERAGE"
rra.rows = 700
rra.cur_row = 580
rra.pdp_per_row = 6
rra.xff = 5.0000000000e-01
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 1
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 1
rra.cf = "AVERAGE"
rra.rows = 775
rra.cur_row = 498
rra.pdp_per_row = 24
rra.xff = 5.0000000000e-01
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 13
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 13
rra.cf = "AVERAGE"
rra.rows = 797
rra.cur_row = 669
rra.pdp_per_row = 288
rra.xff = 5.0000000000e-01
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 229
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 229
rra.cf = "MAX"
rra.rows = 600
rra.cur_row = 169
rra.pdp_per_row = 1
rra.xff = 5.0000000000e-01
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 0
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 0
rra.cf = "MAX"
rra.rows = 700
rra.cur_row = 335
rra.pdp_per_row = 6
rra.xff = 5.0000000000e-01
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 1
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 1
rra.cf = "MAX"
rra.rows = 775
rra.cur_row = 518
rra.pdp_per_row = 24
rra.xff = 5.0000000000e-01
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 13
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 13
rra.cf = "MAX"
rra.rows = 797
rra.cur_row = 780
rra.pdp_per_row = 288
rra.xff = 5.0000000000e-01
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 229
rra.cdp_prep.value = NaN
rra.cdp_prep.unknown_datapoints = 229

[ 本帖最後由 k-pig 於 2009-11-5 15:47 編輯 ]
《解決方案》

檢查crontab任務是否正常
《解決方案》

怎樣檢查?

如果crontab不正常,那手動生成一次,不是起碼也可以有數據嗎?
《解決方案》

懷疑是snmp的問題,可以用snmpget測試一下,或者開一下debug日誌,分析一下日誌的錯誤吧
《解決方案》

回復 #3 k-pig 的帖子

檢查下cacti的日誌
《解決方案》

SNMPv2-SMI::mib-2.47.1.3.3.1.1.1002.1029 = INTEGER: 1029
SNMPv2-SMI::mib-2.47.1.3.3.1.1.1002.1030 = INTEGER: 1030
SNMPv2-SMI::mib-2.47.1.3.3.1.1.1002.1031 = INTEGER: 1031
SNMPv2-SMI::mib-2.47.1.3.3.1.1.1002.1032 = INTEGER: 1032
SNMPv2-SMI::mib-2.47.1.3.3.1.1.1002.1033 = INTEGER: 1033
SNMPv2-SMI::mib-2.47.1.4.1.0 = Timeticks: (9061) 0:01:30.61
SNMPv2-SMI::mib-2.83.1.1.1.0 = INTEGER: 2
SNMPv2-SMI::mib-2.83.1.1.7.0 = Gauge32: 0

這是用這條命令snmpwalk -c community -v 2c hostIP測試的結果最後幾行,太長了,就不全部複製下來了。

debug日誌怎麼開?
《解決方案》

cacti.log日誌內容,幫忙分析一下!

debian:/var/www/cacti/log# cat cacti.log
10/22/2009 11:35:36 AM - AUTH LOGIN: User 'admin' Authenticated
10/22/2009 11:38:12 AM - AUTH LOGIN: User 'admin' Authenticated
10/22/2009 11:50:32 AM - POLLER: Poller THOLD: You are missing a required dependency, please install and enable the '<a href='http://cactiusers.org/'>Settings'</a> plugin.
10/22/2009 11:52:48 AM - POLLER: Poller THOLD: You are missing a required dependency, please install and enable the '<a href='http://cactiusers.org/'>Settings'</a> plugin.
10/22/2009 11:56:33 AM - POLLER: Poller THOLD: You are missing a required dependency, please install and enable the '<a href='http://cactiusers.org/'>Settings'</a> plugin.
10/22/2009 11:56:39 AM - POLLER: Poller THOLD: You are missing a required dependency, please install and enable the '<a href='http://cactiusers.org/'>Settings'</a> plugin.
10/22/2009 11:59:25 AM - CMDPHP: Poller ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT * FROM thold_data  LEFT JOIN user_auth_perms ON ((thold_data.graph_id=user_auth_perms.item_id and user_auth_perms.type=1 and user_auth_perms.user_id=1) OR (thold_data.host_id=user_auth_perms.item_id and user_auth_perms.type=3 and user_auth_perms.user_id=1) OR (thold_data.graph_template=user_auth_perms.item_id and user_auth_perms.type=4 and user_auth_perms.user_id=1))  WHERE thold_data.thold_alert!=0 AND ((user_auth_perms.type != 1 OR user_auth_perms.type is null) AND ((user_auth_perms.type != 3) OR (user_auth_perms.type is null)) AND ((user_auth_perms.type != 4) OR (user_auth_perms.type is null)))  ORDER BY name ASC LIMIT 0,"
10/22/2009 02:02:30 PM - AUTH LOGIN: User 'admin' Authenticated
10/22/2009 02:02:30 PM - CMDPHP: Poller ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT * FROM thold_data  LEFT JOIN user_auth_perms ON ((thold_data.graph_id=user_auth_perms.item_id and user_auth_perms.type=1 and user_auth_perms.user_id=1) OR (thold_data.host_id=user_auth_perms.item_id and user_auth_perms.type=3 and user_auth_perms.user_id=1) OR (thold_data.graph_template=user_auth_perms.item_id and user_auth_perms.type=4 and user_auth_perms.user_id=1))  WHERE thold_data.thold_alert!=0 AND ((user_auth_perms.type != 1 OR user_auth_perms.type is null) AND ((user_auth_perms.type != 3) OR (user_auth_perms.type is null)) AND ((user_auth_perms.type != 4) OR (user_auth_perms.type is null)))  ORDER BY name ASC LIMIT 0,"
10/23/2009 05:14:52 PM - AUTH LOGIN: User 'admin' Authenticated
10/26/2009 02:05:04 PM - AUTH LOGIN: User 'admin' Authenticated
10/26/2009 02:53:38 PM - SYSTEM STATS: Time:1.2575 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
10/26/2009 02:53:38 PM - SYSTEM THOLD STATS: Time:0.0057 Tholds:0 Hosts:0
10/26/2009 03:23:36 PM - POLLER: Poller WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 1799 seconds have passed since the last poll!
10/26/2009 03:23:37 PM - SYSTEM STATS: Time:1.2546 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
10/26/2009 03:23:37 PM - SYSTEM THOLD STATS: Time:0.0042 Tholds:0 Hosts:0
10/28/2009 11:49:06 AM - AUTH LOGIN: User 'admin' Authenticated
10/28/2009 01:03:50 PM - AUTH LOGIN: User 'admin' Authenticated
10/28/2009 01:10:57 PM - POLLER: Poller WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 164841 seconds have passed since the last poll!
10/28/2009 01:10:59 PM - SYSTEM STATS: Time:1.2509 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
10/28/2009 01:10:59 PM - SYSTEM THOLD STATS: Time:0.0042 Tholds:0 Hosts:0
10/28/2009 01:17:22 PM - POLLER: Poller WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 385 seconds have passed since the last poll!
10/28/2009 01:17:24 PM - SYSTEM STATS: Time:1.2527 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
10/28/2009 01:17:24 PM - SYSTEM THOLD STATS: Time:0.0042 Tholds:0 Hosts:0
10/28/2009 01:21:25 PM - SYSTEM STATS: Time:1.2495 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
10/28/2009 01:21:25 PM - SYSTEM THOLD STATS: Time:0.0041 Tholds:0 Hosts:0
10/29/2009 04:04:36 PM - AUTH LOGIN: User 'admin' Authenticated
10/29/2009 04:12:33 PM - POLLER: Poller WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 96669 seconds have passed since the last poll!
10/29/2009 04:12:34 PM - SYSTEM STATS: Time:1.2611 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
10/29/2009 04:12:34 PM - SYSTEM THOLD STATS: Time:0.0049 Tholds:0 Hosts:0
10/29/2009 10:52:37 PM - AUTH LOGIN: User 'admin' Authenticated
11/05/2009 09:14:31 AM - AUTH LOGIN: User 'admin' Authenticated
11/05/2009 01:44:58 PM - POLLER: Poller WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 599545 seconds have passed since the last poll!
11/05/2009 01:44:59 PM - SYSTEM STATS: Time:1.2508 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
11/05/2009 01:44:59 PM - SYSTEM THOLD STATS: Time:0.0050 Tholds:0 Hosts:0
11/05/2009 02:06:46 PM - POLLER: Poller WARNING: Cron is out of sync with the Poller Interval!  The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 1308 seconds have passed since the last poll!
11/05/2009 02:06:48 PM - SYSTEM STATS: Time:1.2557 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:2 RRDsProcessed:1
11/05/2009 02:06:48 PM - SYSTEM THOLD STATS: Time:0.0042 Tholds:0 Hosts:0
《解決方案》

好像你的cron任務沒運行,檢查下
《解決方案》

怎樣檢查運行?
《解決方案》

service crond status

[火星人 ] cacti有圖,無數據,顯示為nan已經有2344次圍觀

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