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

Manually adding a device discovered by Automation causes errors to be logged #2376

Closed
hmorandell opened this issue Feb 6, 2019 · 9 comments
Labels
resolved A fixed issue

Comments

@hmorandell
Copy link
Contributor

Hi,
when I try to add a device manually discovered by Automation, I get the following error in the logfile:

2019/02/06 09:27:19 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2019/02/06 09:27:19 - ERROR PHP ERROR: Uncaught Error: Call to undefined function create_complete_graph_from_template() in /var/www/html/lib/api_automation.php:2445 Stack trace: #0 /var/www/html/lib/api_automation.php(2148): create_dq_graphs('11727', '1', Array) #1 /var/www/html/lib/data_query.php(335): automation_execute_data_query('11727', '1') #2 /var/www/html/lib/api_device.php(861): run_data_query('11727', '1') #3 /var/www/html/lib/api_device.php(779): api_device_update_host_template('11727', 5) #4 /var/www/html/lib/api_automation.php(2803): api_device_save('0', 5, 'NOME_DEVICE_...', 'XX.XX.XX.XX', 'COMMUNITY', '2', '', '', '161', '3000', '', 1, '1', '23', '3000', '2', 'Added manually ...', 'MD5', '', '[None]', '', '', 10, 1, 1, '0') #5 /var/www/html/automation_devices.php(103): automation_add_device(Array, true) #6 /var/www/html/automation_devices.php(60): form_actions() #7 {main} thrown in file: /var/www/html/lib/api_automation.php on line: 2445

The device is added anyway, but I have then to create the graphs manually (it seems that the graph rules won't get applied).
Any idea whats wrong and why this error is triggered?

@netniV
Copy link
Member

netniV commented Feb 6, 2019

What version of Cacti are you using and from which source?

@hmorandell
Copy link
Contributor Author

Hi,
sorry - Version 1.2.1 from official release

@cigamit
Copy link
Member

cigamit commented Feb 6, 2019

Describe how your 'manually' run automation.

@hmorandell
Copy link
Contributor Author

Hi. I make a discovery of a subnet but have "Automatically add to Cacti" not selected (for a few reasons)
Some of the discovered devices I add them by selecting them and by choosing "Add Device" from the dropdown menu. Then I get a new screen, click then save and that where the error is triggered,
Tomorrow I can attach some screenshots as I have a new discovery running right now.

@cigamit
Copy link
Member

cigamit commented Feb 7, 2019

Well, that's odd. Thought that had been fixed.

cigamit added a commit that referenced this issue Feb 7, 2019
Error when adding a device discovered by Automation manually
@cigamit cigamit added the resolved A fixed issue label Feb 7, 2019
@cigamit
Copy link
Member

cigamit commented Feb 7, 2019

Resolved now.

@hmorandell
Copy link
Contributor Author

Hi, I changed the file automation_devices.php with the one from the repository, now another error ist thrown in the log file and the device is not even added:

2019/02/08 10:31:14 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler()) 2019/02/08 10:31:14 - ERROR PHP ERROR: Uncaught Error: Call to undefined function api_device_save() in /var/www/html/lib/api_automation.php:2798 Stack trace: #0 /var/www/html/automation_devices.php(113): automation_add_device(Array, true) #1 /var/www/html/automation_devices.php(70): form_actions() #2 {main} thrown in file: /var/www/html/lib/api_automation.php on line: 2798

cigamit added a commit that referenced this issue Feb 8, 2019
Still having missing apis.  Clone from host.php
@cigamit
Copy link
Member

cigamit commented Feb 8, 2019

Try again. Was being sloppy.

@hmorandell
Copy link
Contributor Author

everything working now! great, thanks!

@netniV netniV changed the title Error when adding a device discovered by Automation manually Manually adding a device discovered by Automation causes errors to be logged Feb 24, 2019
@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
resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants