Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon May 29, 2017 8:11 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Announcing the 1.41 release of DPDiscover
PostPosted: Sun Mar 16, 2014 1:14 pm 
Offline

Joined: Sun Mar 16, 2014 1:00 pm
Posts: 2
I'm hoping I can get some clarification on the dpdiscover reports:

I get dpdiscover reports emailed to me weekly and get a long list of devices under:

"REPORT: Has IP, but not added:"

Why is dpdiscover not adding these devices?


Top
 Profile  
 
 Post subject: Re: Announcing the 1.41 release of DPDiscover
PostPosted: Sun Mar 16, 2014 1:30 pm 
Offline

Joined: Mon Oct 21, 2013 10:16 am
Posts: 27
For some reason, DPDiscover can't actually connect to those devices; it has found them via a discovery protocol and successfully located an IP in DNS, but cannot otherwise pull any SNMP data from it. If the SNMP community or v3 information is not available to DPDiscover, or the IP is wrong in DNS, it can't add a device.

If you think it should be able to with what you've configured, you can try running:

php -q findhosts.php -d -f

This will force a debug run that will dump a crapload of debugging info to the screen and may give you a hint as to what's wrong. Make sure you have a very large scrollback buffer, or pipe the output somewhere to look at later.

Can you snmpwalk the devices in question at the IPs discovered using SNMP info provided to DPDiscover? If not, then that's why DPDiscover isn't adding them. If so ... well, then check a debug run for other clues.

_________________
Eric Stewart
http://runningoffatthemouth.com/


Top
 Profile  
 
 Post subject: Re: Announcing the 1.41 release of DPDiscover
PostPosted: Sun Mar 16, 2014 1:34 pm 
Offline

Joined: Mon Oct 21, 2013 10:16 am
Posts: 27
Oh - and check for exclusions - if any part of the host names of the found devices match something you've told DPDiscover not to add, it of course won't add it.

_________________
Eric Stewart
http://runningoffatthemouth.com/


Top
 Profile  
 
 Post subject: Re: Announcing the 1.41 release of DPDiscover
PostPosted: Sun Jun 15, 2014 2:42 pm 
Offline

Joined: Sun Mar 16, 2014 1:00 pm
Posts: 2
It's been a while since i've been able to revist this. But i had a moment to follow your suggestions. I'm able to snmpwalk the device that's reported as "has an IP but not added" from the cacti server. All dns records point to the correct IP as well. I ran the findhosts script in debug

PHP Notice: Undefined index: 0 in /usr/share/cacti/plugins/dpdiscover/findhosts.php on line 264
PHP Notice: Undefined index: 0 in /usr/share/cacti/plugins/dpdiscover/findhosts.php on line 264
PHP Notice: Undefined index: 0 in /usr/share/cacti/plugins/dpdiscover/findhosts.php on line 264
PHP Notice: Undefined index: 0 in /usr/share/cacti/plugins/dpdiscover/findhosts.php on line 264



Trying parent SNMP! ggcs-stageswitch2 parent ggstageswitch3
IT WORKED! .1.3.6.1.4.1.9.1.615
I think we can add ggcs-stageswitch2
PHP Warning: stristr(): Empty delimiter in /usr/share/cacti/plugins/dpdiscover/findhosts.php on line 948
Trying parent SNMP! ggcs-stageswitch parent ggstageswitch3
IT WORKED! .1.3.6.1.4.1.9.1.615
I think we can add ggcs-stageswitch
PHP Warning: stristr(): Empty delimiter in /usr/share/cacti/plugins/dpdiscover/findhosts.php on line 948
Trying parent SNMP! ggstage2-tor-01.sfo2 parent ggstageswitch3
IT WORKED! .1.3.6.1.4.1.9.1.626
I think we can add ggstage2-tor-01.sfo2
PHP Warning: stristr(): Empty delimiter in /usr/share/cacti/plugins/dpdiscover/findhosts.php on line 948

Not to sure how to move forward from here... :/


Top
 Profile  
 
 Post subject: Re: Announcing the 1.41 release of DPDiscover
PostPosted: Sun Jun 15, 2014 3:21 pm 
Offline

Joined: Mon Oct 21, 2013 10:16 am
Posts: 27
Okay - without more information, I'm just guessing here:

First, 1.43 is out, so I'm guessing that that you're using an older version, because line numbers are not lining up.

There are a few things going on. First, I need to make sure everywhere (like, say, my blog) has proper instructions of what's required before hand, and I need to have some stuff double checked (and logged if it's missing) before findhosts.php will actually run. So there will be some minor bug proofing added in the next day or so resulting in the release of 1.44.

Does your Cacti install have an *DP capable host to start with?

Assuming it does, the next thing is that you need to tell DPDiscover (through the Templates option, which you might have to grant yourself access to if you're not the "admin" user - user with admin rights not always enough) what Host Template matches the sysdescription pulled via SNMP.

I'd like to know in version 1.43 what might be triggering that Undefined Index - I can't figure it out.

I'm guessing that the stristr problem is either one of two things: whatever you're scanning isn't pulling a proper string sysdescription, or you don't have any DPDiscover Templates set up for your Host Template/sysdescription matched up.

I'll look at it some more but it's Sunday afternoon where I'm at so further development may have to wait until tomorrow.

_________________
Eric Stewart
http://runningoffatthemouth.com/


Top
 Profile  
 
 Post subject: Re: Announcing the 1.44 release of DPDiscover
PostPosted: Mon Jun 16, 2014 8:30 am 
Offline

Joined: Mon Oct 21, 2013 10:16 am
Posts: 27
1.44 is released - it includes a couple of sanity checks that will stop findhosts.php from running and will log errors to cacti's logging indicating what supposedly went wrong.

My blog post and the docs page were updated with some verbage that should indicate certain requirements that may not have been obvious before.

_________________
Eric Stewart
http://runningoffatthemouth.com/


Top
 Profile  
 
 Post subject: Re: Announcing the 1.44 release of DPDiscover
PostPosted: Mon May 11, 2015 6:30 am 
Offline
User avatar

Joined: Thu Nov 17, 2011 5:15 pm
Posts: 38
Hi,

am having the below:

Quote:
[root@xxxx dpdiscover]# php -q ./findhosts.php -d
PHP Notice: Undefined index: 0 in /var/www/html/cacti/plugins/dpdiscover/findhosts.php on line 284
PHP Notice: Undefined index: 0 in /var/www/html/cacti/plugins/dpdiscover/findhosts.php on line 284


Line: 284

Quote:
$dpdiscovered['dphost'][$dphost]['os'] = $templates[$dpdiscovered['dphost'][$dphost]['host_template_id']];


Thanks,

_________________
Regards,
Pizu


Top
 Profile  
 
 Post subject: Re: Announcing the 1.44 release of DPDiscover
PostPosted: Mon May 11, 2015 9:26 am 
Offline

Joined: Mon Oct 21, 2013 10:16 am
Posts: 27
Per: http://docs.cacti.net/userplugin:dpdiscover

Code:
Also, in the left menu, there should be a “DPDiscover Templates”. Configure entries so that discovered equipment is given the proper Host Template. Hosts that do not match any DPDiscover Template will not be added. Scanning will exit and log an error if there are no templates detected.


I'm guessing either you don't have any templates configured or you've managed to put in a template without all of the required information.

Perhaps you don't have any host templates at all?

You'll need to set up Host Templates and then configure DPDiscover per the instructions quoted above to attach the discovered devices to a given host template.

_________________
Eric Stewart
http://runningoffatthemouth.com/


Top
 Profile  
 
 Post subject: Re: Announcing the 1.44 release of DPDiscover
PostPosted: Mon May 11, 2015 9:57 am 
Offline

Joined: Mon Oct 21, 2013 10:16 am
Posts: 27
I've a newly updated version (1.46) on the download site and via github. It should appropriately detect what I think is the error and log it.

I was checking if a value was an array, which it should already be since I casted it that way ... but I didn't check to see if said array had a size of more than 0.

_________________
Eric Stewart
http://runningoffatthemouth.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group