the problem is that i have created a graph and it only keeps history for 2 days. Could someone tell me where I made a mistake?
0. Versions:
Cacti 0.8.7i
RRDtool 1.4.4
OS: Centos 5.7 (x86_64)
1. Data input method:
Input Type: Script/Command
Input string: /usr/bin/wget -q -O - <url>
Input fields: url to a text file on webserver (contains only one value status:1 or status:0)
Output fields: status
2. Data template 3. Graph template 4. CDEF functions
for OK status (1): cdef=a,1,LE,1,0,IF
for notOK stauts (0): cdef=a,0,EQ,1,0,IF
draws green area when OK, and red area when not OK.
5. Graph 6. Graph debug output:
Code: Select all
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='xxxxxxxxxxxxxxxxxxxxx status from xxxxxxxxxxxxxxxxxxxx' \
--base=1000 \
--height=50 \
--width=700 \
--upper-limit='1' \
--lower-limit='0' \
--y-grid='none' \
--vertical-label= \
--slope-mode \
--font TITLE:12:'/usr/share/fonts/bitstream-vera/VeraSe.ttf' \
--font AXIS:8:'/usr/share/fonts/bitstream-vera/VeraSe.ttf' \
--font LEGEND:9:'/usr/share/fonts/bitstream-vera/VeraSe.ttf' \
--font UNIT:8:'/usr/share/fonts/bitstream-vera/VeraSe.ttf' \
DEF:a="/var/www/cacti/rra/xxxxxxxxxxxxxxxx_status_3344.rrd":status:LAST \
CDEF:cdefa=a,1,LE,1,0,IF \
CDEF:cdefb=a,0,EQ,1,0,IF \
AREA:cdefa#00aa00FF:"status OK" \
AREA:cdefb#FF0000FF:"status NOT OK" \
GPRINT:a:LAST:"Current Status%8.0lf\n"
RRDTool Says:
OK
Code: Select all
Data Source Debug
/usr/bin/rrdtool create \
/var/www/cacti/rra/xxxxxxxxxxxxxxxx_status_3344.rrd \
--step 300 \
DS:status:GAUGE:600:U:U \
RRA:AVERAGE:0.5:1:500 \
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:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:500 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \
Code: Select all
rrdtool info /var/www/cacti/rra/xxxxxxxxxxxxxxxx_status_3344.rrd
filename = "/var/www/cacti/rra/xxxxxxxxxxxxxxxx_3344.rrd"
rrd_version = "0003"
step = 300
last_update = 1330413303
header_size = 2672
ds[status].index = 0
ds[status].type = "GAUGE"
ds[status].minimal_heartbeat = 600
ds[status].min = NaN
ds[status].max = NaN
ds[status].last_ds = "1"
ds[status].value = 3.0000000000e+00
ds[status].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 500
rra[0].cur_row = 124
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 = 600
rra[1].cur_row = 382
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[2].cf = "AVERAGE"
rra[2].rows = 700
rra[2].cur_row = 359
rra[2].pdp_per_row = 6
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 3.0000000000e+00
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 775
rra[3].cur_row = 225
rra[3].pdp_per_row = 24
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = 1.5000000000e+01
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[4].cf = "AVERAGE"
rra[4].rows = 797
rra[4].cur_row = 648
rra[4].pdp_per_row = 288
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = 8.5996666667e+01
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[5].cf = "MAX"
rra[5].rows = 500
rra[5].cur_row = 205
rra[5].pdp_per_row = 1
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 = 600
rra[6].cur_row = 321
rra[6].pdp_per_row = 1
rra[6].xff = 5.0000000000e-01
rra[6].cdp_prep[0].value = NaN
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[7].cf = "MAX"
rra[7].rows = 700
rra[7].cur_row = 314
rra[7].pdp_per_row = 6
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = 1.0000000000e+00
rra[7].cdp_prep[0].unknown_datapoints = 0
rra[8].cf = "MAX"
rra[8].rows = 775
rra[8].cur_row = 633
rra[8].pdp_per_row = 24
rra[8].xff = 5.0000000000e-01
rra[8].cdp_prep[0].value = 1.0000000000e+00
rra[8].cdp_prep[0].unknown_datapoints = 0
rra[9].cf = "MAX"
rra[9].rows = 797
rra[9].cur_row = 272
rra[9].pdp_per_row = 288
rra[9].xff = 5.0000000000e-01
rra[9].cdp_prep[0].value = 1.0000000000e+00
rra[9].cdp_prep[0].unknown_datapoints = 0
rra[10].cf = "LAST"
rra[10].rows = 500
rra[10].cur_row = 63
rra[10].pdp_per_row = 1
rra[10].xff = 5.0000000000e-01
rra[10].cdp_prep[0].value = NaN
rra[10].cdp_prep[0].unknown_datapoints = 0