Traffic graph not displaying information
Moderators: Developers, Moderators
Traffic graph not displaying information
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!
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!
-
- Cacti User
- Posts: 311
- Joined: Tue Jun 29, 2004 12:52 pm
- Location: Indiana
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.
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
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.
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 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
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
-
- Cacti User
- Posts: 311
- Joined: Tue Jun 29, 2004 12:52 pm
- Location: Indiana
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.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.
Dave
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?melchandra wrote: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.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.
- Attachments
-
- cacti.png (4.96 KiB) Viewed 2859 times
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?Anonymous wrote: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?melchandra wrote: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.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 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 wrote:Hmmm..... so perhaps the 95th percentile and bandwidth summation equations are plain broke? Neither one works for me, either.Anonymous wrote:cmd.php and 0.85a
Does anyone have a clue about these? Is there some sort of debugging we can do?
My guess is that the math does not work on certain versions of either rrdtool or php.Anonymous wrote: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 wrote:Hmmm..... so perhaps the 95th percentile and bandwidth summation equations are plain broke? Neither one works for me, either.Anonymous wrote:cmd.php and 0.85a
Does anyone have a clue about these? Is there some sort of debugging we can do?
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.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.
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
Who is online
Users browsing this forum: No registered users and 0 guests