Patch: graph template items save bug

Addons for Cacti and discussion about those addons

Moderators: Moderators, Developers

Post Reply
Author
Message
SR
Posts: 3
Joined: Fri May 28, 2004 12:33 pm
Location: Seattle, WA
Contact:

Patch: graph template items save bug

#1 Post by SR » Fri May 28, 2004 12:49 pm

Hi guys. I just posted this to the cacti-user mailing list, but now that I see this forum is a lot more active than that list, here it is here, too:

In using cacti over the past week or two, I've noticed an annoying bug when editing a graph template item: Specifically, when editing a graph template with more than one data souce of the same type (ie. same task_item_id), subsequent edits to graph template items always resets them to be associated with the last added data source of the appropriate type.

For example: Suppose I have two hosts for which I'd like to graph their traffic_in interface data on the same graph. If I add hostA's data source first, then hostB's data source second, then go back and edit a graph template item that refers to hostA's data source, when I save the graph template item its association will be switched to hostB's data source.

The attached patch corrects this problem: When editing a graph template item, if you don't change the data source type (task_item_id), then its association with a data source won't be changed if one already exists.
Attachments
graph_templates_items.php-patch.gz
This patch works against version 0.8.5a of cacti
(1.11 KiB) Downloaded 386 times

Mika
Cacti User
Posts: 64
Joined: Tue Mar 23, 2004 3:01 am

#2 Post by Mika » Mon Jun 28, 2004 10:50 am

Hi,
Today I notices very similar bug in Cacti. Hope this patch will help for my case as well.
Situations is like this: I have more than few ds on one data and graph templates (about 8 data sources). And as soos as I start editing my graph template, graphs are being destroyd (red crosses and that's all). In order to start graphing again, I have to delete data source and start it over again.

Anyone met this kind of problem?

I use Debian and cacti0.8.5

Thanks in advance for any help

SR
Posts: 3
Joined: Fri May 28, 2004 12:33 pm
Location: Seattle, WA
Contact:

#3 Post by SR » Mon Jun 28, 2004 11:29 am

I've not seen that problem myself. And unfortunately I don't think my patch will fix things for you. (Give it a try if you want though-- it probably won't hurt anything.)

Post Reply