2

我每小时填充一次rrd db。该值在 rrd db 中成功更新,但未更新为档案

每当我尝试使用 rrdfetch 获取数据时,它都会返回 NaN 并且 rrddump 也会显示转储。

但 rrdtool info 显示最后的更新值。

步数是 2000 和 rras

'RRA:MIN:0.5:1:44640'
'RRA:MAX:0.5:1:44640'
'RRA:AVERAGE:0.5:1:44640'
'RRA:LAST:0.1:1:44640'

以下是我的 rrdtool 信息输出。

filename = "abc.red.prod.rrd"
rrd_version = "0003"
step = 2000
last_update = 1341392733
ds[resume_l].type = "GAUGE"
ds[resume_l].minimal_heartbeat = 2000
ds[resume_l].min = NaN
ds[resume_l].max = NaN
ds[resume_l].last_ds = "22403399"
ds[resume_l].value = 1.6471702915e+10
ds[resume_l].unknown_sec = 0
ds[suspend_l].type = "GAUGE"
ds[suspend_l].minimal_heartbeat = 2000
ds[suspend_l].min = NaN
ds[suspend_l].max = NaN
ds[suspend_l].last_ds = "23203177"
    ds[suspend_l].value = 1.7281112506e+10
    ds[suspend_l].unknown_sec = 0
    rra[0].cf = "MIN"
    rra[0].rows = 44640
    rra[0].cur_row = 31110
    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[0].cdp_prep[1].value = NaN
    rra[0].cdp_prep[1].unknown_datapoints = 0
    rra[1].cf = "MAX"
    rra[1].rows = 44640
    rra[1].cur_row = 32625
    rra[1].pdp_per_row = 1
    rra[1].xff = 5.0000000000e-01
    rra[1].cdp_prep[0].value = NaN
    rra[1].cdp_prep[0].unknown_datapoints = 0
    rra[1].cdp_prep[1].value = NaN
    rra[1].cdp_prep[1].unknown_datapoints = 0
    rra[2].cf = "AVERAGE"
    rra[2].rows = 44640
    rra[2].cur_row = 41634
    rra[2].pdp_per_row = 1
    rra[2].xff = 5.0000000000e-01
    rra[2].cdp_prep[0].value = NaN
    rra[2].cdp_prep[0].unknown_datapoints = 0
    rra[2].cdp_prep[1].value = NaN
    rra[2].cdp_prep[1].unknown_datapoints = 0
    rra[3].cf = "LAST"
    rra[3].rows = 44640
    rra[3].cur_row = 8075
    rra[3].pdp_per_row = 1
    rra[3].xff = 1.0000000000e-01
    rra[3].cdp_prep[0].value = NaN
    rra[3].cdp_prep[0].unknown_datapoints = 0
    rra[3].cdp_prep[1].value = NaN
    rra[3].cdp_prep[1].unknown_datapoints = 0

这是 rrdtool dump .. 的输出 .. only selected region

                        <!-- 2012-07-04 01:06:40 UTC / 1341364000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 01:40:00 UTC / 1341366000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 02:13:20 UTC / 1341368000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 02:46:40 UTC / 1341370000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 03:20:00 UTC / 1341372000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 03:53:20 UTC / 1341374000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 04:26:40 UTC / 1341376000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 05:00:00 UTC / 1341378000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 05:33:20 UTC / 1341380000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 06:06:40 UTC / 1341382000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 06:40:00 UTC / 1341384000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 07:13:20 UTC / 1341386000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 07:46:40 UTC / 1341388000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 08:20:00 UTC / 1341390000 --> <row><v> NaN </v><v> NaN </v></row>
                    <!-- 2012-07-04 08:53:20 UTC / 1341392000 --> <row><v> NaN </v><v> NaN </v></row>
            </database>
    </rra>

4

1 回答 1

3

请注意,rrdtool 确实会默默地忽略违反在创建时设置的数据源限制的值......它将改为记录 NaN。使用 updatev 而不是 update 来获得关于存储到 RRA 的内容的即时反馈。

于 2012-07-04T13:35:01.680 回答