I have been using Cacti pretty extensively lately, but I have found something that Cacti does (maybe on purpose) very annoying.
I have a data template created that contains 3 items: BIO, CPU, MEM.
When creating a new data source Cacti does as it should:
/usr/bin/rrdtool create \
<rrd path>
--step 300 \
DS:BIO:GAUGE:600:0:1000 \
DS:CPU:GAUGE:600:0:100 \
DS:MEM:GAUGE:600:0:100 \
<avg and max stuff>
*Note how the DS's are in order
but! when you save this item, then duplicate it, Cacti likes to put the "Data Source Item Fields" in some random order.
e.g.
...
DS:MEM:GAUGE:600:0:100 \
DS:CPU:GAUGE:600:0:100 \
DS:BIO:GAUGE:600:0:1000 \
...
But it MATTERS that the order is the same as the one I am copying since I am doing my graph updates using actual
"rrdupdate" scripts which assume the order is alphabetical.
i.e.
rrdupdate <rrd filename>
epochtime:BIO:CPU:MEM
So, is this a bug, or is Cacti trying to randomize this for some reason? It would be nice to have the option to preserve the ordering.
current fix:
copying many times and waiting until I get the right order, and delete the bad ones.
~Jayhoo
Cacti Bug - Duplicating Data Sources
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
I will send to the author of Cacti for a response.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
The lack of ordering is definitely not intentional, just me forgetting to add an 'order by' clause to an SQL query. Try applying the attached patch to see if it helps. It orders the data sources in alphabetical order when generating the rrdcreate statement.
To apply this patch, download it to your Cacti directory and do:
-Ian
To apply this patch, download it to your Cacti directory and do:
Code: Select all
patch -p1 < data_source_item_order.patch
- Attachments
-
- data_source_item_order.patch
- Data source item ordering patch
- (526 Bytes) Downloaded 87 times
Who is online
Users browsing this forum: No registered users and 1 guest