-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Graph/Data Source with custom fields to prompt during manual creation #3879
Comments
Well that's a good catch. Not sure what caused it, but thanks for reporting. Won't take to long to fix. |
I've just verified that is does work. What you should do is disable Automatic Graph Creation under Console > Configuration > Settings > General. Currently, when Automatic Graph Creation is enabled, the 'defaults' are take for custom Data Sources. |
I did disable automatic graph creation though as mentioned in my initial report. Even with automatic graph creation disabled and manually creating all the graphs after saving the device, the first time graphs with custom values in the data sources are created it will not prompt for them and still creates them with empty values. If you then create a second set of the same graphs on the same device it will prompt you. Either way, the behavior originally was to prompt for the values, regardless of automatic graph creation being enabled or not. |
It seems to me that when something is working as expected in a previous version but suddenly and unintentionally stops working in a new version that qualifies it as a bug, even if there is supposedly a work around for it (which again, that work around did not work for me). |
Turn off graph automation, and it'll work exactly as before. |
@TheWitness As I have mentioned a few times now, disabling automatic graph creation has not made any difference for me. Even with it disabled I still have this bug where the first time the graphs are created it does not prompt for the custom fields and instead creates the graphs with empty fields. Only upon the second time the graphs are created will it prompt. I did a screencapture demonstrating this for you since my words seem to be failing to convey the message: https://youtu.be/X2U7Io-PNAw |
So Paul, when you edit the Data Template, is the checkbox to allow you to override the default value checked? Verify for your Data Templates, and upload images of them. Also, for one of the problem Data Templates, that you have confirmed that the checkbox es are checked, send the output of: SELECT *
FROM data_template_data
WHERE data_template_id = X
AND local_data_id = 0\G |
@TheWitness
BTW, I am upgraded to cacti 1.2.15 now and still having this issue. Automatic graph creation is still disabled. |
So watched the video. Pretty clear now. It's quite odd, and this part of Cacti needs a redesign as it have really remained unchanged for a long time and it's not very strait forward. I'll figure it out now that I have the video. As they say, a picture tells 1000 words. |
I just updated lib/html_graph.php from the 1.2.x branch. Update it and tell me if the issue is solved. |
Graph/Data Source creation with custom fields not prompting during 1st creation
@TheWitness That fixed the issue if you leave automatic graph creation disabled. Thanks! If you have automatic graph creation enabled though it still creates the graphs the first time with empty fields, but going back and creating graphs again prompts for the fields. It would still be nice to have that working again since I know it used to work with automatic graph creation enabled. |
It has to be a feature request. The automation is designed to take the defaults, and there is no way to, in a common way, figure out what the updates would be. I guess we could just skip autocreate if anything required input during automation. Make that a part of the feature request. If you have better ideas, put them in the feature request. Old code for sure. array_sum(), don't think I've ever used that function. |
When adding a new device and doing the initial creating of graphs/data sources for the device if there are any data sources that have custom fields (such as network traffic has a custom field for the interface to monitor) the previous behavior was after the device has been added those graphs would not auto create if graph auto creation was enabled and you would have to follow the "Create Graphs for this device" link and then select the graphs, then click the "Create Graphs" button and you would then be taken to the next page to enter the custom fields (interface, drive, etc) and then you could finalize the graph/data source creation.
Now the behavior, whether or not you have automatic graph creation enabled or not, is upon the initial creation of graphs it will not prompt for the custom fields, resulting in data sources without required fields (such as the interface to monitor) resulting in broken graphs. You then have to go into each data source and manually update the data source with the missing information before it starts working again. The additional behavior of this is that when you have graphs/data sources that are configured to allow more than one instance for a single device, if you create the second instance of that graph for the device it does prompt for the custom fields as one would expect. So it is only a problem upon the first creation of those graphs/data sources. I checked through all the settings I could find (none of which were changed before the behavior started) and nothing seemed to address the problem. I also looked at the individual data source templates to make sure nothing was set wrong in them and could not find anything. Granted, the templates I am using in this manner are sourced from Percona, but this is the first time I have had this kind of issue and it seems unlikely it is a problem with the templates, though it might be.
This appears to have changed between 1.2.12 and 1.2.14.
This is on a Debian 10 system that is up to date and running php7.3 with Percona MySQL 5.7.31
The text was updated successfully, but these errors were encountered: