Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
I would like to keep data with 5 minute precision for a very detailed Monthly graph, but only for a handful of hosts since I understand that doing it for all ~2400 of the ports I'm graphing would be disastrous to my disks. I've created a new RRA called "Monthly with 5 Minute Precision" defined as AVERAGE and MAX just like the other RRAs, and with the following parameters:
X-Files Factor: 0.5
Steps: 1
Rows: 18000
Timespan: 2678400
I also created new Graph and Data templates modeled on the existing Interface Traffic templates and including my newly defined timespan, but no matter what I try I can't get a graph to be created. The graphs simply don't get created, as opposed to being full of NaN for data.
Is making new graph and data templates even the right way to go about what I want to do? Did I define the new RRA with the appropriate parameters? If I'm going about this the wrong way I won't be offended in the slightest to be corrected.
The debug of one of the graphs is below. Obviously it's not creating the RRD file, but why?
That is correct. But it will allow to view only a single timespan when clicking on any graph.
Currently, Cacti requires an RRA definition to define a new timespan to be viewed (by default, there are 4 timespans). You may add some "pseudo-RRA" definitions to have a timespan with only very few CDPs to get around that
R.
gandalf wrote:That is correct. But it will allow to view only a single timespan when clicking on any graph.
Currently, Cacti requires an RRA definition to define a new timespan to be viewed (by default, there are 4 timespans). You may add some "pseudo-RRA" definitions to have a timespan with only very few CDPs to get around that
R.
I'm only interested in a single timespan for this so that is not an issue. I did define a new RRA in the gui, but is there more to it than that or did I choose badly for the parameters? I've included a screenshot of it below.
Finally, if I'm going about this completely wrong let me know that too. My goal is simply to have a monthly graph with a 5 minute level of precision, but only for select hosts so that my collection of RRD files doesn't grow to enormous proportions.
The RRA itself looks fine.
But to use it, you need a data template that refers to THAT rra set.
In general, you will duplicate an existing Data Template and change the RRA associations only.
Then, duplicate the graph template and associate the graph template items to that new data template.
Next, apply that graph template to those hosts.
Yes, that's ugly.
We have plans to improve that area, but our main focus is to support different poller intervals. This hits the same part of the code. So perhaps, we'll improve it, but not before 089.
R.
That's basically what I did before by trial and error, but just to be sure I deleted my previous data and graph templates and did it again in the way that you described. Now when I try to create a graph with the new graph template I get the following error:
Notice: Undefined index: local_data_id in /usr/share/cacti/site/graphs_new.php on line 214
Warning: Invalid argument supplied for foreach() in /usr/share/cacti/site/graphs_new.php on line 214
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/graphs_new.php:214) in /usr/share/cacti/site/graphs_new.php on line 330
I checked the lines in the file referred to and they are:
Not showing on the screen at the bottom are index value and index type, which are checked. And just in case you ever need it, here's the technical support info for my cacti installation. Thank you so much for taking the time to work through this with me. It is very impressive to get personal attention from the developer of such a useful project.
Technical Support
General Information
Date Wed, 21 Jul 2010 13:38:37 -0500
Cacti Version 0.8.7e
Cacti OS unix
SNMP Version NET-SNMP version: 5.2.3
RRDTool Version RRDTool 1.2.x
Hosts 141
Graphs 2167
Data Sources Script/Command: 32
SNMP: 37
SNMP Query: 2051
Script Query: 1
Script Query - Script Server: 48
Total: 2169
Poller Information
Interval 300
Type spine
Items Action[0]: 4171
Action[1]: 29
Action[2]: 92
Total: 4292
Concurrent Processes 2
Max Threads 5
PHP Servers 5
Script Timeout 25
Max OID 10
Last Run Statistics Time:41.5094 Method:spine Processes:2 Threads:5 Hosts:141 HostsPerProcess:71 DataSources:4292 RRDsProcessed:2014
PHP Information
PHP Version 5.2.5-0.dotdeb.2
PHP OS Linux
PHP uname Linux howard 2.6.18-6-686 #1 SMP Fri Feb 19 23:40:03 UTC 2010 i686
PHP SNMP Not Installed
max_execution_time 30
memory_limit 128M
}elseif ($current_form_type == "sg") {
while (list($snmp_index, $true) = each($snmp_index_array)) {
$snmp_query_array["snmp_index"] = decode_data_query_index($snmp_index, $snmp_query_array["snmp_query_id"], $_POST["host_id"]);
$return_array = create_complete_graph_from_template($graph_template_id, $_POST["host_id"], $snmp_query_array, $values["sg"]{$snmp_query_array["snmp_query_id"]});
debug_log_insert("new_graphs", "Created graph: " . get_graph_title($return_array["local_graph_id"]));
/* lastly push host-specific information to our data sources */
if (sizeof($return_array["local_data_id"])) { # we expect at least one data source associated
foreach($return_array["local_data_id"] as $item) {
push_out_host($_POST["host_id"], $item);
}
} else {
debug_log_insert("new_graphs", "ERROR: no Data Source associated. Check Template");
}
}
}
This leads to the assumption, that sth is wrong with the templates. The data template looks indeed fine, from a first glance. So I suspect the graph template ...
R.
Well I fixed the error about not being able to create graphs. I had forgotten to update the data query for "SNMP - Interface Statistics" to point to the new graph template. With that fixed, I still get non-existent graphs and this on the graph debug.
RRDTool Says:
ERROR: opening '/usr/share/cacti/site/rra/facility_router_long_traffic_in_2410.rrd': No such file or directory
I get the same result from using that data query and from making a graph completely manually. You mentioned you suspect the graph template. Did you mean you suspect that I did something wrong in creating the new one, which is quite possible, or there is a bug in the code? Do I need to upgrade to e from g?
No change of code required.
I will have to play through all steps again to make sure that I did not forget anything important. From theory, it should be doable. But sometimes the real world is hard enough.
R.
copy the data template and change titles at will, select the new RRA only
copy the graph template. Change all graph items to point the the new data sources. Delete the superfluous Graph Item Inputs as both the new ones show up now
visit Data Query. Add the new Graph Template. Edit it and associate the correct Data Source Items. Check the checkboxes! At will, add some "Suggested Values"
copy the data template and change titles at will, select the new RRA only
copy the graph template. Change all graph items to point the the new data sources. Delete the superfluous Graph Item Inputs as both the new ones show up now
visit Data Query. Add the new Graph Template. Edit it and associate the correct Data Source Items. Check the checkboxes! At will, add some "Suggested Values"
works for me; tested on 087g.
R.
This works for me now. I believe I was neglecting to check the checkboxes earlier when I was editing the Data Query.
However, I am experiencing something quite strange. On some of the interfaces the traffic is much lower than it should be. It's hard to put into words so I'm attaching a screenshot. The first graph is the WAN side of one of our routers, the T3 1/1 interface. This is the completely stock bits/sec with 95th percentile template. The next graph is the LAN interface of the same router, but with my new longer term templates. It should be and is a mirror image of the first graph, other than the fact they were started at slightly different times. The strange part is the 3rd graph in the screenshot. It should be exactly the same as the first graph, and a mirror image of the second. HDLC 1 is just the logical interface of the T3 1/1 shown in the first graph. If I had a longer screen you could see the T3 1/1 below matches exactly the HDLC 1 in the third graph, and does not match the first graph at all.
This screenshot is of a fresh new host I made just for testing this, but this behavior is the same when I add these alternate timescale graphs to the existing host. The LAN side Eth 0/1 interface graphs fine in the stock and my modified templates, but the T3 and HDLC interfaces graph much less traffic in my modified templates, but still graph fine in the stock templates.
If I can't get this resolved I'll just use the Eth 0/1 interface for this timescale, but it's puzzling either way.
At least the 2nd graph, perhaps the 3rd as well, is broken. It shows same data for both outbound and inbound. I assume, that the data sources are wrong either on the graph template or at least on the graph itself.
Please create "old fashioned" graph for the logical interfaces as well to compare them to the "new" ones
R.