Cacti discovery plugin reporting duplicate hostsname or ips

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
rock100773
Posts: 11
Joined: Mon Apr 04, 2011 4:01 pm

Cacti discovery plugin reporting duplicate hostsname or ips

Post by rock100773 »

Hello,

Am running:
cacti version 0.8.7g
OS: CentOS release 5.2
PHP: PHP 5.1.6
--------

I just installed the latest cacti discovery plugin, http://docs.cacti.net/plugin:discovery#discovery which is working fine however am seeing duplicates hostnames or ips whenever discovery runs again after first polling takes place. Can someone please help with this issue or offer suggestion on fixing this?

I also check this forum posts but no answer was posted, http://forums.cacti.net/viewtopic.php?f=14&t=42122

Thanks and will appreciate your comment
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti discovery plugin reporting duplicate hostsname or

Post by gandalf »

This is which release of discovery?
R.
rock100773
Posts: 11
Joined: Mon Apr 04, 2011 4:01 pm

Re: Cacti discovery plugin reporting duplicate hostsname or

Post by rock100773 »

gandalf wrote:This is which release of discovery?
R.
I installed the lastest version Version 1.2a, http://docs.cacti.net/_media/plugin:discovery-v1.2a.tgz
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti discovery plugin reporting duplicate hostsname or

Post by gandalf »

Please post the discovery settings that you're using
R.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Cacti discovery plugin reporting duplicate hostsname or

Post by TheWitness »

This is fixed in the 1.3 release.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
rgardam
Posts: 5
Joined: Fri Mar 09, 2012 12:09 am

Re: Cacti discovery plugin reporting duplicate hostsname or

Post by rgardam »

Hi,
I am on release 1.5 of the discovery plugin using cacti 8.7h and v3 of the PIA.
I am seeing duplicated host entries in my devices list. I have performed a clean of all the hosts so that no hosts exist and it still creates them. I had thought that it was picking up the same host on different IP's (Which is doing for hosts that have multiple ips) but it's also doing it for hosts that only have one interface.

Any ideas?

Thanks
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti discovery plugin reporting duplicate hostsname or

Post by gandalf »

Does this happen for ALL discovered hosts or for some of them only?
R.
rgardam
Posts: 5
Joined: Fri Mar 09, 2012 12:09 am

Re: Cacti discovery plugin reporting duplicate hostsname or

Post by rgardam »

HI Sorry for the late reply, didn't have the email responder on. It seems to happen for only some hosts.

THanks,
ROb
rgardam
Posts: 5
Joined: Fri Mar 09, 2012 12:09 am

Re: Cacti discovery plugin reporting duplicate hostsname or

Post by rgardam »

Hi I am still seeing this. It seems like the system description field is being ignored and hosts are still being added even when they have a different IP.
rgardam
Posts: 5
Joined: Fri Mar 09, 2012 12:09 am

Re: Cacti discovery plugin reporting duplicate hostsname or

Post by rgardam »

I noticed that Nothing was being populated in the plugin_discover_hosts table when the discover plugin ran.

I have Found a fix that solves my problem by editing the findhosts.php

Bad Code -

Code: Select all

$isDuplicateSysName = sizeof(db_fetch_assoc("SELECT * FROM plugin_discover_hosts WHERE sysName='" . $snmp_sysName[0] . "'"));
By having it look up the description from the host table it didn't add hosts that had the same system description already present.

Fixed code -

Code: Select all

$isDuplicateSysName = sizeof(db_fetch_assoc("SELECT * FROM host WHERE description='" . $snmp_sysName[0] . "'"));
Let me know what you think of this change.
Post Reply

Who is online

Users browsing this forum: fpiorek and 6 guests