[solved] Data is not storing in rrd

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
fosiul
Posts: 12
Joined: Thu Jun 04, 2009 7:03 am

[solved] Data is not storing in rrd

Post by fosiul »

HI
i am trying to implement a simple script

Script is :
lynx -nolist -dump http://xx.xx.xx.xx/server-status?auto | grep BytesPerSec | awk '{ print $1 $2 }'

output:
-bash-3.2# ./server-status.sh
BytesPerSec:296.902

So i want to Create a graph for BytesPerSec:296.902 output

Problem is, graph is showing , but data is not storing ,
what i am doing wrong ( i guess is somethign to do with script and output filed)
I have attached some picture, please advise me
Attachments
Cacti-log showing its getting  data<br />CMD: /root/cacti/server-status.sh, output: BytesPerSec:285.076
Cacti-log showing its getting data
CMD: /root/cacti/server-status.sh, output: BytesPerSec:285.076
cacti-log.GIF (30.39 KiB) Viewed 1796 times
Graph not showing
Graph not showing
graph-not-showing.GIF (40.21 KiB) Viewed 1796 times
data source
data source
datasource.GIF (38.09 KiB) Viewed 1796 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Look in the cacti.log file in debug mode, for when cacti issues the rrdtool update command for DS[21]
fosiul
Posts: 12
Joined: Thu Jun 04, 2009 7:03 am

Post by fosiul »

HI thanks
but the output of the script
bash-3.2# ./server-status.sh
BytesPerSec:296.902

is that allright ??

The reason i am asking,
CActi output string is "BytesPerSec"

so do i need this out put : BytesPerSec:296.902
or shall i keep the output just 296.902
fosiul
Posts: 12
Joined: Thu Jun 04, 2009 7:03 am

Post by fosiul »

This is the update
07/17/2009 07:05:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool update /var/www/html/websolution4u/cacti/rra/localhost_ds_23.rrd --template BytesPerSec 1247853901:551.539
07/17/2009 07:00:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool update /var/www/html/websolution4u/cacti/rra/localhost_ds_23.rrd --template BytesPerSec 1247853602:539.653
07/17/2009 06:55:14 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool update /var/www/html/websolution4u/cacti/rra/localhost_ds_23.rrd --template BytesPerSec 1247853302:528.72
07/17/2009 06:50:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool update /var/www/html/websolution4u/cacti/rra/localhost_ds_23.rrd --template BytesPerSec 1247853001:517.689
fosiul
Posts: 12
Joined: Thu Jun 04, 2009 7:03 am

Post by fosiul »

I am seeing All NAN for this command :
rrdtool fetch localhost_bytespersec_25.rrd AVERAGE

check the bellow :
-bash-3.2# rrdtool info localhost_bytespersec_25.rrd

filename = "localhost_bytespersec_25.rrd"
rrd_version = "0003"
step = 300
last_update = 1247859601
ds[BytesPerSec].type = "GAUGE"
ds[BytesPerSec].minimal_heartbeat = 600
ds[BytesPerSec].min = 0.0000000000e+00
ds[BytesPerSec].max = 1.0000000000e+02
ds[BytesPerSec].last_ds = "770.958"
ds[BytesPerSec].value = NaN
ds[BytesPerSec].unknown_sec = 1
rra[0].cf = "AVERAGE"
rra[0].rows = 500
rra[0].cur_row = 333
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 = 411
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 = 490
rra[2].pdp_per_row = 6
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = NaN
rra[2].cdp_prep[0].unknown_datapoints = 2
rra[3].cf = "AVERAGE"
rra[3].rows = 775
rra[3].cur_row = 395
rra[3].pdp_per_row = 24
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = NaN
rra[3].cdp_prep[0].unknown_datapoints = 20
rra[4].cf = "AVERAGE"
rra[4].rows = 797
rra[4].cur_row = 391
rra[4].pdp_per_row = 288
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 236
rra[5].cf = "MAX"
rra[5].rows = 500
rra[5].cur_row = 349
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 = 54
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 = 73
rra[7].pdp_per_row = 6
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = NaN
rra[7].cdp_prep[0].unknown_datapoints = 2
rra[8].cf = "MAX"
rra[8].rows = 775
rra[8].cur_row = 699
rra[8].pdp_per_row = 24
rra[8].xff = 5.0000000000e-01
rra[8].cdp_prep[0].value = NaN
rra[8].cdp_prep[0].unknown_datapoints = 20
rra[9].cf = "MAX"
rra[9].rows = 797
rra[9].cur_row = 527
rra[9].pdp_per_row = 288
rra[9].xff = 5.0000000000e-01
rra[9].cdp_prep[0].value = NaN
rra[9].cdp_prep[0].unknown_datapoints = 236
-bash-3.2#

This is the debug log

07/17/2009 08:45:04 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool update /var/www/html/websolution4u/cacti/rra/localhost_bytespersec_25.rrd --template BytesPerSec 1247859902:778.656
07/17/2009 08:45:04 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool update /var/www/html/websolution4u/cacti/rra/localhost_bytespersec_24.rrd --template BytesPerSec 1247859902:778.639
07/17/2009 08:45:04 PM - POLLER: Poller[0] Parsed MULTI output field 'BytesPerSec:778.656' [map BytesPerSec->BytesPerSec]
07/17/2009 08:45:04 PM - POLLER: Poller[0] Parsed MULTI output field 'BytesPerSec:778.639' [map BytesPerSec->BytesPerSec]
07/17/2009 08:45:03 PM - CMDPHP: Poller[0] Host[1] DS[25] CMD: /root/cacti/server-status02.sh, output: BytesPerSec:778.656
07/17/2009 08:45:03 PM - CMDPHP: Poller[0] Host[1] DS[24] CMD: /root/cacti/server-status01.sh, output: BytesPerSec:778.639

Still dont understand whats wrong, please some body give me some light.[/u]
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Your DS max is too small -- it's currently set to 100. Fix the data template, delete the rrd files (or use rrdtool tune), and then try again.
fosiul
Posts: 12
Joined: Thu Jun 04, 2009 7:03 am

Solved

Post by fosiul »

Thanks
Delete rrd file and create it solved the issue!!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests