Help me better understand how RRD files are created.

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
odinsdream
Posts: 8
Joined: Fri Jun 01, 2007 8:14 am

Help me better understand how RRD files are created.

Post by odinsdream »

Hi there, I'm now maintaining a Cacti installation that has already been set up. I've read through all of the HOWTOs on the main site, but still am a bit confused about how each individual RRD file gets created. Do I create them manually? If so - how?

For instance, we have a switch with several blades. The first blade's 24 interfaces are already graphed. We'd like to add graphs for the next 24 interfaces - but do I need to make 24 new RRD files?

Many thanks - and by all means, please post documentation that may help me out - I really appreciate it.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You may have a look at the first link of my signature for more help. But your question is not answered there.
RRD files always are created by the poller that runs every 5 min from crontab. Before doing so, the target host is checked for availability. Not available = no rrd files
Reinhard
odinsdream
Posts: 8
Joined: Fri Jun 01, 2007 8:14 am

Post by odinsdream »

Hi, thanks for the reply.

I am new to this, but I'm comfortable exploring. I've been using snmpwalk/get to explore the device, and I even found that if I go to create a new graph, I do in fact see a list of all the available ethernet interfaces.

However, I get no data for the new interface we're attempting to monitor. It's using the same template as the other 24 on the same switch, but this one's RRD file contains things like this:

Code: Select all

rrdtool info core_1_traffic_in_449.rrd | grep ds
ds[traffic_in].type = "COUNTER"
ds[traffic_in].minimal_heartbeat = 120
ds[traffic_in].min = 0.0000000000e+00
ds[traffic_in].max = 1.0000000000e+08
ds[traffic_in].last_ds = "2656250461"
ds[traffic_in].value = 0.0000000000e+00
ds[traffic_in].unknown_sec = 2
ds[traffic_out].type = "COUNTER"
ds[traffic_out].minimal_heartbeat = 120
ds[traffic_out].min = 0.0000000000e+00
ds[traffic_out].max = 1.0000000000e+08
ds[traffic_out].last_ds = "2828734329"
ds[traffic_out].value = 0.0000000000e+00
ds[traffic_out].unknown_sec = 2
Whereas one of the ports whose graphs are working shows something like this:

Code: Select all

rrdtool info core_1_traffic_in_391.rrd | grep ds
ds[traffic_out].type = "COUNTER"
ds[traffic_out].minimal_heartbeat = 600
ds[traffic_out].min = 0.0000000000e+00
ds[traffic_out].max = 1.0000000000e+08
ds[traffic_out].last_ds = "1477318758"
ds[traffic_out].value = 7.9138533333e+03
ds[traffic_out].unknown_sec = 0
ds[traffic_in].type = "COUNTER"
ds[traffic_in].minimal_heartbeat = 600
ds[traffic_in].min = 0.0000000000e+00
ds[traffic_in].max = 1.0000000000e+08
ds[traffic_in].last_ds = "719281392"
ds[traffic_in].value = 4.7550033333e+03
ds[traffic_in].unknown_sec = 0
I can see from this that the Min and Max isn't a problem, but there is the unknown_sec difference between the two, as well as the value field.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

So the rrd files exist. The problem seems to be elsewhere. See second link of my signature as a start
Reinhard
odinsdream
Posts: 8
Joined: Fri Jun 01, 2007 8:14 am

Post by odinsdream »

It was your link, actually, that got me to where I am now, as far as testing the data with rrdtool. I get NaN from this file, but am not sure why. I wasn't the one who originally set this up, so it could have been done incorrectly.

In any case, I've already worked through the documents in your signature, but I'm still stuck. What information can I provide that would help me diagnose the problem?

It doesn't seem to be a Min-Max issue..
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please report results of each step of the debug procedure. Either we'll find it somewhere or I have to extend my HowTo
Reinhard
odinsdream
Posts: 8
Joined: Fri Jun 01, 2007 8:14 am

Post by odinsdream »

Thanks.

I skipped directly to step 5 of your Debug NaN troubleshooting guide, since all of our other graphs are being updated properly.

I found the query in Poller Cache, along with all the other queries:

Code: Select all

Data Source: Core 1 - Traffic - ethernet3/1
RRD: /var/www/html/cacti/rra/core_1_traffic_in_453.rrd
Action: 0, OID: .1.3.6.1.2.1.2.2.1.16.129 (Host: XX.XX.XX.XX, Community: public)
Step 6: Ownership verified; all files in /rra/ belong to cactiuser and are r/w.

Step 7: Results are as I posted earlier. Using rrdtool to get AVERAGE shows only nan nan.

Step 8: Enabling Graph Debug results in the following:

RRDTool Says:
OK

At this point, I'm not sure where to look. Thanks for your help!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Got it, finally (I hope). You've change the interval on the failing rrd file to 120 sec. Was this done by accident?
ds[traffic_in].minimal_heartbeat = 120
If cacti still polls every 300 sec, but rrdtool will wait only for 120 sec, rrdtool will report all data as NaN because it needs at least two subsequent data points for a COUNTER to calculate valid data.
Reinhard
odinsdream
Posts: 8
Joined: Fri Jun 01, 2007 8:14 am

Post by odinsdream »

Great! That must be the problem. I am not sure how to adjust this value, though - could you provide some links to how I'd adjust it? This is the part of cacti that I haven't quite gotten a good handle on - how to work with the RRD backend files.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Find it when defining a Data Template. I'm not sure, if there's a "rrdtool tune" option to change existing files ...
Reinhard
odinsdream
Posts: 8
Joined: Fri Jun 01, 2007 8:14 am

Post by odinsdream »

I changed the Data Template from 120 to 600, but the existing files weren't updated - can I delete them from the command-line and let cacti re-create them?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You can do so, but there's no need for it. Use

Code: Select all

rrdtool tune filename [--heartbeat│-h ds-name:heartbeat]
instead
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest