Issues creating data source profile

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

Moderators: Developers, Moderators

Post Reply
Helmut Schneider
Cacti User
Posts: 151
Joined: Mon Feb 05, 2007 3:57 am
Location: Munich, Germany

Issues creating data source profile

Post by Helmut Schneider »

Hi,

I want to create a data source profile (1.2.8). It should do a 1-minute polling over 4 weeks.

- I create the profile with a polling interval of 1 minute and a heartbeat of 2 minutes.
- I create the first rra (1 hour view) with 60 rows, aggregation level is fixed to "each insert is new row". step is 1.

When I then want to add additional rows the smallest aggregation level is "5 minutes" which sets step to "5" which from what I understand breaks my 1-minute polling as only every 5th value is stored.

Did I miss something?

Thank you.
tertius
Cacti User
Posts: 82
Joined: Wed Mar 01, 2017 2:34 pm

Re: Issues creating data source profile

Post by tertius »

It's not "step", it's "steps" - the number of primary data points consolidated to one that's stored in that rra.
It's not clear what you mean with "...over 4 weeks". Is this the maximum timespan you want to store for the rra with the primary data points? Or for the most aggregated rra?
If you install a cacti database from scratch and are not updating an old database, you get 3 default data source profiles: one 30 seconds polling, one 1 minute polling and one 5 minute polling. Install a fresh cacti and look how the 1 minute polling data source profile is built. Since there are no data sources using it, you can change the properties to your liking. Then create some random graph+data source that is using this profile, then export this graph and its dependencies. And this export you import to your productive cacti and get the new data source profile created here.
Helmut Schneider
Cacti User
Posts: 151
Joined: Mon Feb 05, 2007 3:57 am
Location: Munich, Germany

Re: Issues creating data source profile

Post by Helmut Schneider »

Maybe my concept was wrong.

I used to have graphs for 1h, 6h, 24h, 1 week and so on. For each I had a 1-minute polling.

Am I correct that a single rra for 1 week with a 1-minute polling and when viewing the data using appropriate time spans (e.g. last day) is the correct way to do so?
tertius
Cacti User
Posts: 82
Joined: Wed Mar 01, 2017 2:34 pm

Re: Issues creating data source profile

Post by tertius »

It seems you don't have the complete picture on the matter.

You have a device, which is queried repeatedly.
The timespan between queries is called step.
The object in cacti that represents the queried values from the device is a data source.
A data source may query one or more values, for example upstream and downstream volume of a network device.
The value(s) that are queried with one query is called a data point.

How the values are stored in a round-robin database (rrd):
Each time a data point is generated (by polling, every step seconds), it is written to a sub-database within a rrd, called round-robin archive (rra).
A rra has a fixed number of data points it can contain. If it is full, the oldest data point is overwritten with the newest, thus "round-robin".
The data retention time of the rra that contains the data points directly read from the device is step * number of data points.
For example, you want a resolution of 1 minute, thus polling once every minute, and retain this resolution for 2 days of data. How many data points do need for this? 2 days are 2 * 24 * 3600 = 172800 seconds. 1 minute polling is once every 60 seconds, thus you need 172800 / 60 = 2880 data points. The data points in this rra are called primary data points, because they contain the original unaggregated data.

Now, the point of a rrd is to store not only the primary data points, but also for older data aggregated data points that take less disk space and less computing work. You can create additional rra's within a rrd with different data retention and aggregation.
In addition to the above, you might want to keep older data with 15-minute resolution for 2 weeks. 15 minute resolution means 15 primary data points aggregated into 1. Then, 2 weeks are 2 * 7 * 24 * 3600 = 1209600 seconds. 15 primary data points into one aggregated data point is 15 * 60 = 900 seconds. So you need 1209600 / 900 = 1344 data points in the second rra.

Even older data you want to store for 2 months with a resolution of 1 hour in a 3rd rra. So: 2 months are 2 * 31 * 24 * 3600 = 5356800 seconds. 1 Hour are 60 primary data points or 3600 seconds. You need 5356800 / 3600 = 1488 data points.
The last aggregation should be 2 years with a resolution of 4 hours. So: 2 * 365 * 24 * 3600 = 63072000 seconds. 4 hours are 4 * 3600 = 14400 seconds. So you need 63072000 / 14400 = 4380 data points.

Now you have the values you need to enter in the data source profile specification. I described how to develop the default 1 minute polling profile - you find the values in the actual profile, they are only a bit rounded up in cacti.

In addition, you are able to define a "default timespan" in the cacti configuration. This is not something that is stored in the rra or shape the data in the rra. Instead, it is a hint to cacti's graphing what timespan it should choose for a graph, whenever you open a graph that's based on a data source that has a polling from this profile. It is best seen if you click on the 3rd icon next to a graph that is called "Time graph view" on mouseover. 4 graphs open, one for each rra. The default timespans you see here are the default timespan values from the profile definition.

From your post, it's not clear what you mean with "1h, 6h, 24h 1 week". It may be the data retention for each rra, or it may be default timespan. But with the above information you should be able to find out how many rra's you want to use for your profile, and how many rows you want to store within each rra.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest