I installed cacti 0.8.7g, and it was relatively easy to set it up to use snmp to query my linux-based router for interface statistics, which is my main goal. However, the graph does not seem to be calculating total out on any of my interfaces..
Total in works, and as you can see, I am getting some info for outbound, so i do not know why total out is not working right.
I've looked through what I can in the graph template, and everything looks the same between the definition for total in and total out, same for maximum in and out..
I've looked through the documentation, and from what I can tell, the template's definition for the Total Out sum is correct: "Total Out: |sum:auto:current:2:auto|".
As for the inbound/outbound maximums I have verified that the data source is different between the two graph template items.
Is this a bug in the backend code that creates the graph?
Total Out: not working, Maximum: using same value for in/out
Moderators: Developers, Moderators
Re: Total Out: not working, Maximum: using same value for in
I have made some progress, and I'm starting to think that the maximum using the same value is a code bug..
I was trying to follow the code (which takes me some time since I'm not used to the internal structure of cacti..), and I've found something out.
In rrd.php, line 1187 (as of 0.8.7g):
If $cf_ds_cache{$graph_item["data_template_rrd_id"]}[$cf_id] is not set, "current" defaults to $cf_id 0. At least, that's how I'm reading it.. I'm not exactly a php programmer.
I edited my copy of rrd.php so that the 'default' is 1:
After making this change, if I view a graph, I see the correct Maximum on my output side.. so my suspicion is that that data structure is not being updated properly for the second data item in a graph. Where that is supposed to happen, I haven't found yet. So, this isn't meant as the fix, but it verifies the fact that this is a code bug in my mind. Should I be submitting this somewhere else?
I'm still researching the total out problem as well.
I was trying to follow the code (which takes me some time since I'm not used to the internal structure of cacti..), and I've found something out.
In rrd.php, line 1187 (as of 0.8.7g):
Code: Select all
$cdef_string = str_replace("CURRENT_DATA_SOURCE", generate_graph_def_name(strval((isset($cf_ds_cache{$graph_item["data_template_rrd_id"]}[$cf_id]) ? $cf_ds_cache{$graph_item["data_template_rrd_id"]}[$cf_id] : "0"))), $cdef_string);
I edited my copy of rrd.php so that the 'default' is 1:
Code: Select all
$cdef_string = str_replace("CURRENT_DATA_SOURCE", generate_graph_def_name(strval((isset($cf_ds_cache{$graph_item["data_template_rrd_id"]}[$cf_id]) ? $cf_ds_cache{$graph_item["data_template_rrd_id"]}[$cf_id] : "1"))), $cdef_string);
I'm still researching the total out problem as well.
Who is online
Users browsing this forum: No registered users and 1 guest