Cacti

沒有值的 Cacti rrdtool 圖,.rrd 文件中的 NaN

  • May 14, 2018

Cacti 0.8.7h,帶有最新的 RRDTool。我成功繪製了 CPU/介面流量圖,但得到了像這樣的空白圖:

…在記憶體/溫度監控方面。

問題/錯誤實際上已存檔在這裡,但是這篇文章沒有幫助。

我可以 snmpget 值,例如SNMPv2-SMI::enterprises.9.9.13.1.3.1.3.1 = Gauge32: 26. 但是,將這些值儲存到 .rrd 文件時似乎存在問題。

輸出rrdtool info powerbseipv6testrouter_cisco_memfree_40.rrd AVERAGE cisco_memfree如下:

filename = "powerbseipv6testrouter_cisco_memfree_40.rrd" 
rrd_version = "0003"
step = 300
last_update = 1321867894
ds[cisco_memfree].type = "GAUGE"
ds[cisco_memfree].minimal_heartbeat = 600
ds[cisco_memfree].min = 0.0000000000e+00
ds[cisco_memfree].max = 1.0000000000e+12
ds[cisco_memfree].last_ds = "UNKN"
ds[cisco_memfree].value = 0.0000000000e+00
ds[cisco_memfree].unknown_sec = 94
rra[0].cf = "AVERAGE"
rra[0].rows = 600
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 700
rra[1].pdp_per_row = 6
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = NaN
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 775
rra[2].pdp_per_row = 24
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = NaN
rra[2].cdp_prep[0].unknown_datapoints = 18
rra[3].cf = "AVERAGE"
rra[3].rows = 797
rra[3].pdp_per_row = 288
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = NaN
rra[3].cdp_prep[0].unknown_datapoints = 114
rra[4].cf = "MAX"
rra[4].rows = 600
rra[4].pdp_per_row = 1
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[5].cf = "MAX"
rra[5].rows = 700
rra[5].pdp_per_row = 6
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = NaN
rra[5].cdp_prep[0].unknown_datapoints = 0
rra[6].cf = "MAX"
rra[6].rows = 775
rra[6].pdp_per_row = 24
rra[6].xff = 5.0000000000e-01
rra[6].cdp_prep[0].value = NaN
rra[6].cdp_prep[0].unknown_datapoints = 18
rra[7].cf = "MAX"
rra[7].rows = 797
rra[7].pdp_per_row = 288
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = NaN
rra[7].cdp_prep[0].unknown_datapoints = 114

除了升級到最新的 0.8.8 之外,您是否確認您(或任何試圖將 rrd 資訊儲存在 .rrd 文件中的人)可以?文件/目錄的權限是否正確設置以允許這樣做?

在回复您關於文件/目錄所有權/權限可能是問題的評論時,我將分享我發現對在 OpenBSD 上執行的 Cacti 安裝有用的內容(也就是說,您的位置和語法可能因其他系統而異):

chown -R www:www /var/www/htdocs/*
echo 'web directories reset to www:www ownership'
chmod -R 777 /var/www/htdocs/cacti/plugins/*
chmod -R 777 /var/www/htdocs/cacti/log/*
chmod -R 777 /var/www/htdocs/cacti/rra/*
echo 'cacti plugin, log, and rra directories set to full r,w,x'

我在仙人掌中大量使用天氣圖,並且經常發現自己不得不一遍又一遍地重置權限,這讓我不必經常思考它。

777 對於這些部分的安全性可能過於開放,如果是這樣,我很樂意提到一個更好的設置,它仍然提供應用程序的可用性。

引用自:https://serverfault.com/questions/334374