Traffic graph not displaying information

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

Moderators: Developers, Moderators

Post Reply
Guest

Traffic graph not displaying information

Post by Guest »

I've only had cacti and rrdtool installed for a couple days, but I've never been able to get the traffic graph to work quite right. I have net-snmp 5.12 installed, and as far as I can tell, it's configured correctly. All the other default graphs I have on right now (load avg, # users, free disk space, etc) update correctly, so I know the crontab line is definitely executing cmd.php on time.

The traffic graph, however, refuses to show current info (or update at all) unless cmd.php is executed in the console manually. If I execute it, it'll poll the data and updates the graph, but if I then let it sit for 2 hours, it only shows the 1 spike, and no other info. If I execute cmd.php in console manually, it updates with new, accurate info.

When I execute cmd.php in console, I can see that it does indeed get info from snmp, along with the necessary info for all the other graphs:

snmp: 127.0.0.1:161, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, value: 783856163
snmp: 127.0.0.1:161, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.2, value: 2687560133

but it refuses to update the traffic graph along with all the rest.

Running cmd.php in console also spits out an error after it exports the graph:

export: running graph export
ERROR: step must be >= 1 second

<b>Notice</b>: Undefined variable: regexps in <b>/usr/local/apache/htdocs/cacti/lib/rrd.php</b> on line <b>309</b>

<b>Notice</b>: Undefined variable: fetch_array in <b>/usr/local/apache/htdocs/cacti/lib/rrd.php</b> on line <b>324</b>

ERROR: no rrdtool fetch output, you probably forgot to pass a valid data source
ERROR: step must be >= 1 second

<b>Notice</b>: Undefined variable: regexps in <b>/usr/local/apache/htdocs/cacti/lib/rrd.php</b> on line <b>309</b>

<b>Notice</b>: Undefined variable: fetch_array in <b>/usr/local/apache/htdocs/cacti/lib/rrd.php</b> on line <b>324</b>

ERROR: no rrdtool fetch output, you probably forgot to pass a valid data source

but I'm not sure what to do with those. I've restarted snmp, I've rebooted the machine, and I'm completely stumped as to why it's doing this. Please help me get my traffic graph working! :)
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

If you traffic graph is a total bandwidth / summation / total type, check out the stick thread about the bug at the top of the general forum. There are patches for linux installs, and a pre-patched rrd.php file at the bottom.

Otherwise it might be a path issue. Cron uses differant path environment vars than running from the shell, so make sure your cron command has the full path to everything. Redirect the output to a file in /var/log instead of /dev/null like default, then you can see what happens when cacti runs from the cron daemon.
Dave
Guest

Post by Guest »

Ah, my fault. I glanced at the stuck threads, saw they both seemed to be about 95th percentile graphs and ignored them without reading the 2nd half of the 2nd stuck thread.

Patched it now, hopefully this will fix it.
Guest

Post by Guest »

Ok, update time. The traffic graph(s) work fine, as long as I don't select the total bandwidth or 95th percentile templates. Those are still broken and throw errors about having no rrdtool fetch output and not passing a valid data source (this is all after patching the necessary graph_variables.php file). Since I wasnt sure if the patch worked (it seemed to, as applying it again gave a warning about the patch already being used), I also downloaded the replacement, pre-patched graph_variables.php and it does not want to work with either.

Changing the template type in Graph Management to any total bandwidth/95th percentile graph from a regular bits/bytes/sec graph template immediately breaks the graph and gives errors.
bif
Posts: 11
Joined: Wed Jul 21, 2004 3:07 am

Post by bif »

I have exactly the same problem with my Windows 2K server. I have patched the necessary files ..... but my traffic graphs that i 've configured in "Interface Traffic (bits/sec, Total Bandwidth) still don't work !!!
Here is the RRD Tool error message :

Notice: Undefined variable: regexps in C:\apache\Apache2\htdocs\cacti\lib\rrd.php on line 308

Notice: Undefined variable: fetch_array in C:\apache\Apache2\htdocs\cacti\lib\rrd.php on line 323
ERROR: no rrdtool fetch output, you probably forgot to pass a valid data source
Notice: Undefined variable: regexps in C:\apache\Apache2\htdocs\cacti\lib\rrd.php on line 308

Notice: Undefined variable: fetch_array in C:\apache\Apache2\htdocs\cacti\lib\rrd.php on line 323
ERROR: no rrdtool fetch output, you probably forgot to pass a valid data sourceERROR: opening 'C:\apache\Apache2\htdocs\cacti/rra/reisti6_traffic_in_112.rrd': No such file or directory
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

Anonymous wrote: Changing the template type in Graph Management to any total bandwidth/95th percentile graph from a regular bits/bytes/sec graph template immediately breaks the graph and gives errors.
I've encountered some issues with changing graphs after they have been created. Have you tried re-creating the graphs? Try just re-creating (deleting the graph and DS, and adding them again) one graph and see if that works.
Dave
Guest

Post by Guest »

melchandra wrote:
Anonymous wrote: Changing the template type in Graph Management to any total bandwidth/95th percentile graph from a regular bits/bytes/sec graph template immediately breaks the graph and gives errors.
I've encountered some issues with changing graphs after they have been created. Have you tried re-creating the graphs? Try just re-creating (deleting the graph and DS, and adding them again) one graph and see if that works.
Seems to be working ok so far now, except it doesnt show anything for total in/out. How long should it take before it displays that data?
Attachments
cacti.png
cacti.png (4.96 KiB) Viewed 2854 times
kgonzales
Posts: 18
Joined: Wed Aug 18, 2004 11:23 am

Post by kgonzales »

Anonymous wrote:
melchandra wrote:
Anonymous wrote: Changing the template type in Graph Management to any total bandwidth/95th percentile graph from a regular bits/bytes/sec graph template immediately breaks the graph and gives errors.
I've encountered some issues with changing graphs after they have been created. Have you tried re-creating the graphs? Try just re-creating (deleting the graph and DS, and adding them again) one graph and see if that works.
Seems to be working ok so far now, except it doesnt show anything for total in/out. How long should it take before it displays that data?
In my experience, I believe that it is currently broken, and I think it has something to do with cactid. Are you using cactid or cmd.php? And are you using 0.85a?
Guest

Post by Guest »

cmd.php and 0.85a
kgonzales
Posts: 18
Joined: Wed Aug 18, 2004 11:23 am

Post by kgonzales »

Anonymous wrote:cmd.php and 0.85a
Hmmm..... so perhaps the 95th percentile and bandwidth summation equations are plain broke? Neither one works for me, either.

Does anyone have a clue about these? Is there some sort of debugging we can do?
Guest

Post by Guest »

kgonzales wrote:
Anonymous wrote:cmd.php and 0.85a
Hmmm..... so perhaps the 95th percentile and bandwidth summation equations are plain broke? Neither one works for me, either.

Does anyone have a clue about these? Is there some sort of debugging we can do?
I turned on graph debug mode in graph management and it doesn't list any errors there. Not sure if there's anything else to check. Executing cmd.php in console also gives no errors.
kgonzales
Posts: 18
Joined: Wed Aug 18, 2004 11:23 am

Post by kgonzales »

Anonymous wrote:
kgonzales wrote:
Anonymous wrote:cmd.php and 0.85a
Hmmm..... so perhaps the 95th percentile and bandwidth summation equations are plain broke? Neither one works for me, either.

Does anyone have a clue about these? Is there some sort of debugging we can do?
I turned on graph debug mode in graph management and it doesn't list any errors there. Not sure if there's anything else to check. Executing cmd.php in console also gives no errors.
My guess is that the math does not work on certain versions of either rrdtool or php.

I did update my rrdtool recently. I will back date it, and see if I can fix the issue.
kgonzales
Posts: 18
Joined: Wed Aug 18, 2004 11:23 am

Post by kgonzales »

kgonzales wrote:My guess is that the math does not work on certain versions of either rrdtool or php.

I did update my rrdtool recently. I will back date it, and see if I can fix the issue.
It was rrdtool. Upgrading to rrdtool 1.0.49 broken 95th percentile and bandwdith summation equations. Downgrading to 1.0.46 fixed it.

I assume there will still be an issue with the new Cacti. Bug has been filed here:

http://bugzilla.raxnet.net/bug_view_pag ... id=0000273
Guest

Post by Guest »

Thanks for the info, I'll down grade to 1.0.46 for now :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests