Closed
Description
Describe the bug
So, when you create a Data Template that includes Data Sources for multiple Data Query Graph Templates, Cacti accidentally creates the RRDfile with all the Data Sources included. This leads to much larger RRDfiles that you would expect. In large environments this can be a problem.
To Reproduce
Steps to reproduce the behavior:
- Create a Data Template like below:
- In the example, there are three load average Data Sources that will go on one Graph and two each paired for another Graph as shown below:
- However, when you dump the resulting RRDfiles, you get this:
[root@vmhost3 ~]# rrdtool fetch /var/www/html/cacti/rra/1/13/9/2305.rrd LAST | more
Device_Reads Bytes_Written Device_Writes 1Min_LoadAvg 5Min_LoadAvg 15Min_LoadAvg Bytes_Read
1667664000: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667664900: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667665800: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667666700: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667667600: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667668500: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667669400: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667670300: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667671200: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667672100: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667673000: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667673900: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667674800: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667675700: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667676600: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667677500: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667678400: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667679300: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
1667680200: -nan 0.0000000000e+00 -nan -nan -nan -nan 0.0000000000e+00
The most important thing is all the NAN's. This specific Data Source is for the Device Read/Writes graph template, and you can see that all the other Data Sources are included in this Data Source resulting in wasted space in the RRDfile.
Expected behavior
Cacti should only create the used Data Sources from the Data Template as associated with the specific Graph.