Cacti 1.0.3 won't automatically add discovered devices

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Cacti 1.0.3 won't automatically add discovered devices

Post by stormonts »

In the "Automation" section in Cacti 1.0.3, I have created a network and then executed a scan. Devices are discovered as they show up in the "Discovered Devices" section, however they aren't automatically created in Cacti. If I click on one and then choose the "Add Device" option, it is successfully added to Cacti. When I run the discovery, I see the attached image in the log, so it looks like it is trying to add them to Cacti and failing.
log.png
log.png (173.21 KiB) Viewed 1052 times
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cacti 1.0.3 won't automatically add discovered devices

Post by cigamit »

As a quick test, open lib/api_automation.php and change line 2671 from

Code: Select all

	$ip                   = $device['ip'];
to

Code: Select all

	$ip                   = $device['ip_address'];
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Re: Cacti 1.0.3 won't automatically add discovered devices

Post by stormonts »

That resolved my issue! Ran a discovery and the devices were added to Cacti correctly. Thank you!
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Cacti 1.0.3 won't automatically add discovered devices

Post by cigamit »

Np, I will try to get that fix in for the next release.
cmantzel
Posts: 15
Joined: Fri Oct 05, 2012 12:22 am

Re: Cacti 1.0.3 won't automatically add discovered devices

Post by cmantzel »

Hi,

I had nearly the same problem.
cacti_error.png
cacti_error.png (6.09 KiB) Viewed 1013 times
Installed version 1.0.4. Now i changed line 2671 in the other way from 'ip_address' to 'ip' and that worked.

regards
christian
Debian 8.7
Cacti 1.06
cjolly3053
Posts: 48
Joined: Thu Jan 06, 2011 9:30 am
Location: Nashville, TN
Contact:

Re: Cacti 1.0.3 won't automatically add discovered devices

Post by cjolly3053 »

looks like you fixed this but could this bee the issue with adding a device from device discovery????

2017-03-03 18:08:49 - CMDPHP PHP ERROR NOTICE Backtrace: (/automation_devices.php: 59 form_actions)(/automation_devices.php: 102 automation_add_device)(/lib/api_automation.php: 2671 CactiErrorHandler)(/lib/functions.php: 4264 cacti_debug_backtrace)
2017-03-03 18:08:49 - ERROR PHP NOTICE: Undefined index: ip_address in file: /var/www/html/cacti/lib/api_automation.php on line: 2671
User avatar
Cramin
Posts: 23
Joined: Mon Mar 06, 2017 4:06 pm
Contact:

Re: Cacti 1.0.3 won't automatically add discovered devices

Post by Cramin »

I have the same error in 1.0.4.
Image
Don't know why unknown?
Image
Image
Previous in 1.0 it worked ok.
cjolly3053
Posts: 48
Joined: Thu Jan 06, 2011 9:30 am
Location: Nashville, TN
Contact:

[SOLVED] Re: Cacti 1.0.3 won't automatically add discovered

Post by cjolly3053 »

So I submitted a ticket on this and got a response.

The fix that was found has been added to the next release.

If you can't wait for that I could probably help you fix it temporary if not it should be included in the next release.

Basically they fixed the one issue above with one code rev but then cause an issue from the discovery by making that change.
They then corrected that in the next release which I imagine would be 1.0.5.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests