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

Data Source reapply names does not update name from data query or template. #2499

Closed
jdcoats opened this issue Mar 9, 2019 · 15 comments
Closed
Labels
blocker Blocking release resolved A fixed issue
Milestone

Comments

@jdcoats
Copy link

jdcoats commented Mar 9, 2019

I have changed graph template suggested name and data query suggested name and reapply suggested name works. However when I change data source name in the template and data query, sync template to device and reapply names does not work. Is this already a known issue? Am I doing something wrong? I don't want to have to recreate or change each individually :)

@jdcoats jdcoats changed the title Data Source reapply names does not update name from template. Data Source reapply names does not update name from data query or template. Mar 9, 2019
@jdcoats
Copy link
Author

jdcoats commented Mar 9, 2019

This typically isn't a big deal unless you are trying to update a bunch of weather maps and to select the interface link they all say Hostname - Traffic (dumb default ds name) :)
connectivity

@jdcoats
Copy link
Author

jdcoats commented Mar 9, 2019

I can reapply DS name changes to other snmp interface related data queries for example Interface status updated fine with the exact same variables |host_description|-|query_ifName|-|query_ifAlias|. so It appears that just the interface traffic doesn't work?

@jdcoats
Copy link
Author

jdcoats commented Mar 9, 2019

I checked the other default native cacti snmp interface DS's and cant reapply names but the Interface Status that I added does work.

@cigamit
Copy link
Member

cigamit commented Mar 10, 2019

It this just for Data Sources or for both Data Sources and Graphs?

@cigamit cigamit added the blocker Blocking release label Mar 10, 2019
@cigamit cigamit added this to the v1.2.3 milestone Mar 10, 2019
@jdcoats
Copy link
Author

jdcoats commented Mar 10, 2019

Just data sources. Graphs update fine

@cigamit
Copy link
Member

cigamit commented Mar 12, 2019

Resolved.

@cigamit cigamit added the resolved A fixed issue label Mar 12, 2019
@jdcoats
Copy link
Author

jdcoats commented Mar 12, 2019

Awesome! I updated 500 DS individually today. I’ll test with the rest in the morning :)

@jdcoats
Copy link
Author

jdcoats commented Mar 12, 2019

just jumped in and applied latest changes and the result is still the same. Ill test more tomorrow but the initial result is the same

@jdcoats
Copy link
Author

jdcoats commented Mar 12, 2019


2019/03/11 22:25:48 - CMDPHP PHP ERROR WARNING Backtrace: (/cli/poller_data_sources_reapply_names.php[137]:CactiErrorHandler())
--
2019/03/11 22:25:48 - ERROR PHP WARNING: Invalid argument supplied for foreach() in file: /var/www/localhost/htdocs/cacti/cli/poller_data_sources_reapply_names.php on line: 137
2019/03/11 22:25:48 - CMDPHP SQL Backtrace: (/cli/poller_data_sources_reapply_names.php[130]:db_fetch_assoc(), /lib/database.php[450]:db_fetch_assoc_prepared(), /lib/database.php[464]:db_execute_prepared())
2019/03/11 22:25:48 - CMDPHP ERROR: A DB Row Failed!, Error: Unknown column 'debug' in 'where clause'


@jdcoats
Copy link
Author

jdcoats commented Mar 12, 2019

hmm cant find a commit the references these changes

@netniV
Copy link
Member

netniV commented Mar 12, 2019

download the latest version of that file and it should be corrected. However, if you use the debug option, it should also give you the SQL being used that produced no results.

@jdcoats
Copy link
Author

jdcoats commented Mar 12, 2019

It still does not change the name to the current name in the data query like the graphs do. It just uses Description - Traffic which is not any of the suggested names in the template or the data query.

 # php poller_data_sources_reapply_names.php --host-id=775 --debug
WARNING: Do not interrupt this script.  Interrupting during rename can cause issues
DEBUG: There are '530' Data Sources to rename
......
......
DEBUG: Data Source Name 'BIXLER-CORE-7009-01-N7K2 - Traffic' starting
DEBUG: Data Source Rename Done for Data Source 'BIXLER-CORE-7009-01-N7K2 - Traffic'
DEBUG: Data Source Name 'BIXLER-CORE-7009-01-N7K2 - Traffic' starting
DEBUG: Data Source Rename Done for Data Source 'BIXLER-CORE-7009-01-N7K2 - Traffic'
DEBUG: Data Source Name 'BIXLER-CORE-7009-01-N7K2 - Traffic' starting
DEBUG: Data Source Rename Done for Data Source 'BIXLER-CORE-7009-01-N7K2 - Traffic'
DEBUG: Data Source Name 'BIXLER-CORE-7009-01-N7K2 - Traffic' starting
DEBUG: Data Source Rename Done for Data Source 'BIXLER-CORE-7009-01-N7K2 - Traffic'
DEBUG: Data Source Name 'BIXLER-CORE-7009-01-N7K2 - Traffic' starting
DEBUG: Data Source Rename Done for Data Source 'BIXLER-CORE-7009-01-N7K2 - Traffic'
DEBUG: Data Source Name 'BIXLER-CORE-7009-01-N7K2 - Traffic' starting
DEBUG: Data Source Rename Done for Data Source 'BIXLER-CORE-7009-01-N7K2 - Traffic'
DEBUG: Data Source Name 'BIXLER-CORE-7009-01-N7K2 - Traffic' starting
DEBUG: Data Source Rename Done for Data Source 'BIXLER-CORE-7009-01-N7K2 - Traffic'
.....
.....

@jdcoats
Copy link
Author

jdcoats commented Mar 12, 2019

I can confirm that It does work for the interface status data query. I just added Status- to |host_description|-|query_ifName|-|query_ifAlias| It just does not work for the interface traffic data queries.

DEBUG: Data Source Name 'Status-BIXLER-CORE-7009-01-N7K2-Ethernet3/1-IDF H-BN-65' starting
DEBUG: Data Source Rename Done for Data Source 'Status-BIXLER-CORE-7009-01-N7K2-Ethernet3/1-IDF H-BN-65'
DEBUG: Data Source Name 'Status-BIXLER-CORE-7009-01-N7K2-Ethernet3/2-IDF H-GA-38' starting
DEBUG: Data Source Rename Done for Data Source 'Status-BIXLER-CORE-7009-01-N7K2-Ethernet3/2-IDF H-GA-38'
DEBUG: Data Source Name 'Status-BIXLER-CORE-7009-01-N7K2-Ethernet3/3-IDF H-GN-50' starting
DEBUG: Data Source Rename Done for Data Source 'Status-BIXLER-CORE-7009-01-N7K2-Ethernet3/3-IDF H-GN-50'

cigamit added a commit that referenced this issue Mar 13, 2019
Data Source reapply names does not update name from data query or template
@cigamit
Copy link
Member

cigamit commented Mar 16, 2019

I have confirmed that this is resolved now.

@cigamit cigamit closed this as completed Mar 16, 2019
@jdcoats
Copy link
Author

jdcoats commented Mar 17, 2019

Sorry for not responding, yes it works great now. Thanks!

@github-actions github-actions bot locked as resolved 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
blocker Blocking release resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants