Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Network traffic .rrd files not created and NaN

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
noisebleed



Joined: 20 Oct 2006
Posts: 6
Location: Porto, Portugal

PostPosted: Mon Oct 13, 2008 9:20 am    Post subject: Network traffic .rrd files not created and NaN Reply with quote

Hi. I'm running cacti-0.8.7b-r2 with rrdtool-1.2.27 and net-snmp-5.4.1.1 on a Gentoo Linux system.

My problem: .rrd files for network traffic are not created and therefore I have no graphs.

When running rrdtool graph on debug mode for device tun0 I get the following error:
Code:

 RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="myBox - Traffic - tun0" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/share/webapps/cacti/0.8.7b-r2/htdocs/rra/mybox_traffic_in_47.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/webapps/cacti/0.8.7b-r2/htdocs/rra/mybox_traffic_in_47.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00FF:"Inbound"  \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefe#002A97FF:"Outbound"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s"

RRDTool Says:

ERROR: opening '/usr/share/webapps/cacti/0.8.7b-r2/htdocs/rra/mybox_traffic_in_47.rrd': No such file or directory


Read on the docs that at the next poller interval the graphs would be created but this error remains since the first moment.

Then, I got to the Data Sources tab and checked the rrdtool create command:
Code:

Data Source Debug

/usr/bin/rrdtool create \
/usr/share/webapps/cacti/0.8.7b-r2/htdocs/rra/mybox_traffic_in_47.rrd \
--step 300  \
DS:traffic_in:COUNTER:600:0:U \
DS:traffic_out:COUNTER:600:0:U \
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:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \

Had run this on the cli to manually create the .rrd file and waited some polling cycles.

Graphs now appear on cacti but with NaN values. Now running rrdtool graph in debug mode looks fine:
Code:
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="myBox - Traffic - tun0" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/usr/share/webapps/cacti/0.8.7b-r2/htdocs/rra/mybox_traffic_in_47.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/webapps/cacti/0.8.7b-r2/htdocs/rra/mybox_traffic_in_47.rrd":traffic_in:MAX \
DEF:c="/usr/share/webapps/cacti/0.8.7b-r2/htdocs/rra/mybox_traffic_in_47.rrd":traffic_out:AVERAGE \
DEF:d="/usr/share/webapps/cacti/0.8.7b-r2/htdocs/rra/mybox_traffic_in_47.rrd":traffic_out:MAX \
CDEF:cdefa=a,8,* \
CDEF:cdefd=b,8,* \
CDEF:cdefe=c,8,* \
CDEF:cdefh=d,8,* \
AREA:cdefa#00CF00FF:"Inbound"  \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefd:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefe#002A97FF:"Outbound"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefh:MAX:"Maximum\:%8.2lf %s"

RRDTool Says:

OK


Running rrdtool info gives:
Code:
myBox rra # rrdtool info mybox_traffic_in_41.rrd
filename = "mybox_traffic_in_41.rrd"
rrd_version = "0003"
step = 300
last_update = 1223893449
ds[traffic_in].type = "COUNTER"
ds[traffic_in].minimal_heartbeat = 600
ds[traffic_in].min = 0.0000000000e+00
ds[traffic_in].max = 1.0000000000e+09
ds[traffic_in].last_ds = "UNKN"
ds[traffic_in].value = 0.0000000000e+00
ds[traffic_in].unknown_sec = 249
ds[traffic_out].type = "COUNTER"
ds[traffic_out].minimal_heartbeat = 600
ds[traffic_out].min = 0.0000000000e+00
ds[traffic_out].max = 1.0000000000e+09
ds[traffic_out].last_ds = "UNKN"
ds[traffic_out].value = 0.0000000000e+00
ds[traffic_out].unknown_sec = 249
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[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0


Running a verbose query on the Devices tab returns an OK snmp query (looks ok to me)
Code:

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/webapps/cacti/0.8.7b-r2/htdocs/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Located input field 'ifType' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.3'
+ Found item [ifType='softwareLoopback(24)'] index: 1 [from value]
+ Found item [ifType='ethernetCsmacd(6)'] index: 2 [from value]
+ Found item [ifType='other(1)'] index: 3 [from value]
+ Found item [ifType='other(1)'] index: 4 [from value]
+ Found item [ifType='other(1)'] index: 5 [from value]
+ Found item [ifType='other(1)'] index: 6 [from value]
+ Found item [ifType='other(1)'] index: 7 [from value]
+ Found item [ifType='other(1)'] index: 8 [from value]
+ Found item [ifType='other(1)'] index: 9 [from value]
+ Found item [ifType='other(1)'] index: 10 [from value]
+ Found item [ifType='other(1)'] index: 11 [from value]
+ Found item [ifType='other(1)'] index: 12 [from value]
+ Found item [ifType='other(1)'] index: 13 [from value]
+ Found item [ifType='other(1)'] index: 14 [from value]
+ Found item [ifType='other(1)'] index: 15 [from value]
+ Found item [ifType='other(1)'] index: 16 [from value]
+ Found item [ifType='other(1)'] index: 17 [from value]
+ Found item [ifType='other(1)'] index: 18 [from value]
+ Found item [ifType='other(1)'] index: 19 [from value]
+ Found item [ifType='tunnel(131)'] index: 20 [from value]
+ Found item [ifType='tunnel(131)'] index: 21 [from value]
+ Found item [ifType='ethernetCsmacd(6)'] index: 22 [from value]
+ Found item [ifType='ethernetCsmacd(6)'] index: 23 [from value]
+ Found item [ifType='ethernetCsmacd(6)'] index: 24 [from value]
+ Found item [ifType='ethernetCsmacd(6)'] index: 25 [from value]
+ Found item [ifType='ethernetCsmacd(6)'] index: 26 [from value]
+ Found item [ifType='other(1)'] index: 27 [from value]
+ Found item [ifType='ppp(23)'] index: 28 [from value]
+ Found item [ifType='ppp(23)'] index: 29 [from value]
+ Found item [ifType='ppp(23)'] index: 31 [from value]
+ Found item [ifType='ppp(23)'] index: 32 [from value]
+ Found item [ifType='ppp(23)'] index: 33 [from value]
+ Found item [ifType='ppp(23)'] index: 34 [from value]
+ Found item [ifType='ppp(23)'] index: 35 [from value]
+ Found item [ifType='ppp(23)'] index: 36 [from value]
+ Found item [ifType='ppp(23)'] index: 37 [from value]
+ Found item [ifType='ppp(23)'] index: 38 [from value]
+ Found item [ifType='ppp(23)'] index: 39 [from value]
+ Found item [ifType='ppp(23)'] index: 40 [from value]



Now some extra info.

Cacti collects data locally:
Code:

Description    ID    Graphs    Data Sources    Status    Event Count    Hostname    Current (ms)    Average (ms)    Availability    
myBox    1    18    21    Up    0    127.0.0.1    0.34    0.67    100


Poller and cron interval are set to 5min each.

Crontab entry:
Code:
*/5 * * * *     apache  /usr/bin/php /usr/share/webapps/cacti/0.8.7b-r2/htdocs/poller.php > /dev/null 2>&1
#*/5 * * * *    root    /usr/bin/php -q /usr/share/webapps/cacti/0.8.7b-r2/htdocs/poller.php --force --debug >> /usr/share/webapps/cacti/0.8.7b-r2/htdocs/log/cron-poller.log 2>&1


Some info from cacti.log (one cycle):
Code:

10/13/2008 04:15:02 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] PING: Host is alive
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/linux_memory.pl MemFree:, output: 4464
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[4] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/linux_memory.pl SwapFree:, output: 1003800
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[5] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/loadavg_multi.pl, output: 1min:0.18 5min:0.27 10min:0.27
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[6] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/unix_users.pl , output: 5
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/unix_processes.pl, output: 21
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[15] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/ping.pl 127.0.0.1, output: 0.118
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[16] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get used /dev/mapper/mydisk, output: 477764
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[16] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get available /dev/mapper/mydisk, output: 18562096
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[17] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get used /dev/root, output: 3525828
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[17] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get available /dev/root, output: 5825084
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[18] WARNING: Result from CMD not valid.  Partial Result:
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[18] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get used /dev/sda1, output: U
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[18] WARNING: Result from CMD not valid.  Partial Result:
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[18] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get available /dev/sda1, output: U
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[19] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get used /dev/sda6, output: 17652
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[19] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get available /dev/sda6, output: 920360
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[20] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get used /dev/sda7, output: 17652
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[20] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get available /dev/sda7, output: 920360
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[21] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get used /dev/sda8, output: 749388
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[21] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get available /dev/sda8, output: 5194212
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[22] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get used /dev/sdb1, output: 1151472
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Host[1] DS[22] CMD: perl /usr/share/webapps/cacti/0.8.7b-r2/htdocs/scripts/query_unix_partitions.pl  get available /dev/sdb1, output: 144868964
10/13/2008 04:15:03 PM - CMDPHP: Poller[0] Time: 0.6484 s, Theads: N/A, Hosts: 1
10/13/2008 04:15:04 PM - SYSTEM STATS: Time:2.2055 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:20 RRDsProcessed:13


Folder log/ and rra/ belongs to user apache, which is working ok to other graphs.


Could get some help here, because don't know where to look now. Thanks.
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12275
Location: Muenster, Germany

PostPosted: Mon Oct 13, 2008 10:35 am    Post subject: Reply with quote

Please check the file ownership of those files you've created manually. They may belong to you instead of cactiuser.
Please follow 2nd link of my sig, even if you already did some of those tests
Reinhard
Back to top
noisebleed



Joined: 20 Oct 2006
Posts: 6
Location: Porto, Portugal

PostPosted: Mon Oct 13, 2008 11:59 am    Post subject: Reply with quote

Hi gandalf. Thanks for replying.

The files I've created are set to apache, so nothing wrong here. And I will re-check the NaN debug guide.

But... do you have any idea why the .rrd files are not created automatically?
Back to top
noisebleed



Joined: 20 Oct 2006
Posts: 6
Location: Porto, Portugal

PostPosted: Tue Oct 14, 2008 8:15 am    Post subject: Reply with quote

Well, my graphs are getting values now ... but I'm not sure what did the trick. Anyway, new graphs need to be created manually using the rrdtool create command displayed at Data Sources. I would like to know why this is happening but till then I will do this workaround. I will mark this post [SOLVED] after I get the solution to this issue.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group