Skip to content
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

Associated Graph Template for Data Query can sometime disappear #2573

Closed
kurowskydb opened this issue Mar 26, 2019 · 14 comments
Closed

Associated Graph Template for Data Query can sometime disappear #2573

kurowskydb opened this issue Mar 26, 2019 · 14 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@kurowskydb
Copy link

I have had an associated graph template repeatedly disappear from the SNMP-Interface Statistics data query

Currently have no idea how to reproduce.

I can re-add the template to the query but of course the mapping id increments.
The I need to go and update / replace the old id with the new in the local_graph table.

Screenshots
If applicable, add screenshots to help explain your problem.
2019-03-26 10_36_54-Console -_ Graph Management

Cacti version 1.2.2

Desktop (please complete the following information):

  • OS: Win10
  • Browser: Chrome
  • Version: Version 73.0.3683.86 (Official Build) (64-bit)

I noticed when re-applying suggested names. But not sure if it disappears during the re-applying or during the editing of suggested names.

@kurowskydb
Copy link
Author

Digging some more it seems I didn't have to update the graph_local table (snmp_query_graph_id).
Looks like the snmp_query_graph table is where the issue resides.
I can see the graph templates that I keep re-adding. The snmp_query_id keeps getting set to '0'.

@netniV
Copy link
Member

netniV commented Mar 26, 2019

Is this a custom data query?

@cigamit
Copy link
Member

cigamit commented Mar 26, 2019

So, are you saying that you have graphs that were created from an SNMP Query Graph that was removed from the Data Query list? If that is so, then you need to repair your database, and it's not going to be easy.

Before you do that, you should re-run the Database upgrade and force a pre 1.x version. That column should have been added during the upgrade to 1.0.0. So, if you do the following:

cd /var/www/html/cacti/cli
php -q upgrade_database.php --forcever=0.8.8a

It should return clean and the snmp_query_graph_id should be populated for any graphs that have an snmp_index_id > 0. If that's not the case, I would repair your original Data Query by re-importing it, and then create the graphs all over again, and then copy the old RRDfile over the new one.

I'm not sure that there is any change to Cacti that is warranted.

@cigamit cigamit added the unverified Some days we don't have a clue label Mar 27, 2019
@kurowskydb
Copy link
Author

So this is a little hard to explain. I'll try my best. Not a custom query, Just an 'enhanced' graph template I'm associating to the query.

image

I've had it disappear from this list now 3 or 4 times. While investigating I discovered they were still listed in the snmp_query_graph table (I deleted them since then) with a value of "0" in the 'snmp_query_id' field.

image

@cigamit
Copy link
Member

cigamit commented Mar 27, 2019

Well that is unusual. So, from my perspective, you need to root this out using the two tables: graph_local and data_local. For both tables, the snmp_query_id must be set properly. For the graph_local, the snmp_query_graph_id must be set to, in your case 24. Now, since there was hacking going on, I know that there is one more table that holds the snmp_query_graph_id, for the moment, I just don't remember it.

It goes without saying that we need an updated ERD for this database, and it's something that we will do more along the lines of a 1.3+ release where we plan to cut all the fat out of the schema.

For now, start with those two changes, and see if it's still not displaying properly or resetting to 0. Also, when does the resetting take place? Is it as a part of a re-index? Please confirm. This will help with diagnosing where you need to continue to hack to get this right. Sorry that you have to hack.

@kurowskydb
Copy link
Author

I have not been able to reproduce this same issue, but I have run into a couple other problems that appear to be related. All revolving around the data queries. There appear to be some linkage issues.
When clicking on the source name for the interface traffic graphs, the associated data templates are empty. I did a clean install on 1.2.2. I upgraded to 1.2.3 and problem persists. Then a clean install on 1.2.3. no change.

image

image

@kurowskydb
Copy link
Author

kurowskydb commented Apr 1, 2019

I have also gone to some graph sources (prior to the clean install) and the data templates where not empty, but they were not set and had been disabled. After fixing It and clicking save it would crate the duplicate data query mentioned earlier in the original message. The original query remained unset and disabled.

@cigamit
Copy link
Member

cigamit commented Apr 10, 2019

It looks like you had a custom XML file, or the XML file has disappeared from the resources/snmp_queries directory, or it's not readable by the web site.

@cigamit
Copy link
Member

cigamit commented Apr 10, 2019

@kurowskydb, please close once you've figured things out.

@kurowskydb
Copy link
Author

Looks like data queries listed under the source column on the Graph management page are missing "&snmp_query_id=" in the link. "&snmp_query_id=4" in my case.

@kurowskydb kurowskydb reopened this Apr 24, 2019
@cigamit
Copy link
Member

cigamit commented Apr 25, 2019

The reason the column is missing is that the upgrade is removing the column from the XML file, which then subsequently mucks up your system. Upload your 'good' XML file. I might just incorporate those changes. There are others too.

@kurowskydb
Copy link
Author

kurowskydb commented Apr 26, 2019 via email

@cigamit cigamit added bug Undesired behaviour and removed unverified Some days we don't have a clue labels Jun 23, 2019
@cigamit cigamit added this to the v1.2.5 milestone Jun 23, 2019
@cigamit
Copy link
Member

cigamit commented Jun 23, 2019

I've verified this now. Fixing shortly.

cigamit added a commit that referenced this issue Jun 23, 2019
Associated graph template for Data Query Disappears
@cigamit cigamit added the resolved A fixed issue label Jun 23, 2019
@cigamit
Copy link
Member

cigamit commented Jun 23, 2019

This issue is resolved now.

@netniV netniV closed this as completed Jun 27, 2019
@netniV netniV changed the title Associated graph template for Data Query Disappears Associated graph template for Data Query can sometime disappear Jul 14, 2019
@netniV netniV changed the title Associated graph template for Data Query can sometime disappear Associated Graph Template for Data Query can sometime disappear Jul 14, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants