Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jul 17, 2019 9:52 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Network discovery for Cacty
PostPosted: Thu Jan 12, 2006 7:01 pm 
Offline
User avatar

Joined: Thu Jul 07, 2005 6:15 pm
Posts: 3
eu fiz um network discovery aki, pois a nossa urgência era grande e queria a opinião de vcs..

this text was writed in Portuguese-Brasil

té mais!!!


Attachments:
File comment: screen shot discovery plug-in
discovery.JPG
discovery.JPG [ 105.39 KiB | Viewed 21984 times ]

_________________
Tim Hunter
Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 15, 2006 6:15 am 
Offline
Cacti User

Joined: Tue Aug 02, 2005 4:12 am
Posts: 85
and where i can get a script ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 11:36 am 
Offline
Developer

Joined: Thu Apr 07, 2005 3:29 pm
Posts: 2768
Location: B/CS Texas
I have been working on a simular Plugin for a while now, and its just about ready for release. I just need to add a few more options. It currently runs automatically via the poller every few hours (adding option to specify how long between) and you can specify multiple subnets to scan. It only scans hosts that are currently not in your Cacti install (to save time) and allows for easy Addition into Cacti (currently redirects you to the Add Host page with everything already preset except Description and Host Template). At a later date you will be able to specify which host template to use for what OS it finds. It only uses internal Cacti functions to do it works now (before it required NMAP) and should work fine on both Windows and Linux. You currently can specify several different Community Names for it to try, and I am about to have it show on the info page the actual community name that it uses. The contact and location OIDs are properly shown, I just don't have it setup on those particular hosts. It also will DNS the IPs and return the result, but I had it disabled for that screen shot.

Anyways, here is a screen shot of it, I should have it released by the end of the week.

As a side note, does anyone believe it is showing too much info? I'm thinking about trimming down the amount of initial info it shows, but instead have it show the Location, Contact, and Description as a DHTML popup when you mouse over the device.


Attachments:
File comment: Discover Plugin
discover.jpeg
discover.jpeg [ 233.56 KiB | Viewed 21645 times ]

_________________
Report a bug
Download Releases
1.X Compatible Plugins
Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 2:18 pm 
Offline

Joined: Mon Jan 16, 2006 2:12 pm
Posts: 5
I think there is enough information...

I was wondering to use NMAP, but it seems to be a kind of slow with a lot of hosts...
How did you do it with just PHP functions?

best regards,

cacontece


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 2:40 pm 
Offline
Developer

Joined: Thu Apr 07, 2005 3:29 pm
Posts: 2768
Location: B/CS Texas
cacontece wrote:
I think there is enough information...

I was wondering to use NMAP, but it seems to be a kind of slow with a lot of hosts...
How did you do it with just PHP functions?

best regards,

cacontece


Cacti already has internal ping and snmp functions, which work quite nicely, so all I really do is loop through the subnets you request, and query them using the cacti functions. This makes it the most portable as you don't have to install NMap and all its requirements. NMap worked fine at this, and it really wasn't any slower than the script already is (its not blazing fast by any means) but was just too much overhead for me.

_________________
Report a bug
Download Releases
1.X Compatible Plugins


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 7:09 am 
Offline

Joined: Mon Jan 16, 2006 2:12 pm
Posts: 5
Hi cigamit...

can I try your discovery plugin?? :D

tks...

cacontece


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 1:17 pm 
Offline

Joined: Fri Dec 30, 2005 1:45 pm
Posts: 8
cigamit : I am also very interested in your Discovery plugin !


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 23, 2006 10:38 pm 
Offline

Joined: Wed Dec 14, 2005 9:37 pm
Posts: 8
waiting for your release :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 26, 2006 10:11 am 
Offline

Joined: Wed Dec 07, 2005 3:43 am
Posts: 25
Location: Arizona
ditto


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 2:12 pm 
Offline
Cacti User
User avatar

Joined: Sun Mar 20, 2005 9:14 am
Posts: 61
lanyao wrote:
waiting for your release :)

Just grab the iso from his site and extract the plugins dir...
Lots of other goodies in it as well :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 3:05 pm 
Offline
Developer

Joined: Thu Apr 07, 2005 3:29 pm
Posts: 2768
Location: B/CS Texas
NHDave wrote:
lanyao wrote:
waiting for your release :)

Just grab the iso from his site and extract the plugins dir...
Lots of other goodies in it as well :wink:


Heh. Granted, thats not the newest version, that version requires NMap. I went ahead and threw the developmental snapshot up on my site as a beta so everyone can test out and let me know how it works for them. Warning, there are very little configuration options at the moment (well, only 1 actually) which is the subnet to scan, currently on being able to set it like so (ex: 192.168.0.*) or specific IP addresses. You can scan multiple subnets by using a comma, I am currently working on allowing you to use 192.168.0.0/16 or even ranges like 192.168.0.19-192.168.4.254.

It should start polling a little after you actually set the subnet (5-10 minutes), it should tell you in the Cacti log when it actually does. There is no "error" or debug checking at this point, so don't get your hopes up.

_________________
Report a bug
Download Releases
1.X Compatible Plugins


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 4:02 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
cigamit wrote:
I went ahead and threw the developmental snapshot up on my site as a beta so everyone can test out and let me know how it works for them.

Hi cigamit

I installed the discovery plugin 0.1b on top of my test system (Cacti 0.8.6h + patches + plugin architecture 0.8 + monitor 0.4), and get this error when accessing the "discover" tab :
Code:
Unknown column 'hash' in 'order clause'

This test system is running MySQL 4.1.14, Apache 2.0.55 and PHP 5.0.5

_________________

HOWTOs :
Templates :


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 4:30 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
Well, I'm running into another issue :
Code:
$ php findhosts.php
02/01/2006 10:25:37 AM - POLLER: Poller[0] Network Discover is now running xx.xx.xx.xx
Fatal error: Call to undefined function socket_create() in /cacti/cacti-0.8.6h/lib/ping.php on line 117

Let's recompile PHP with sockets support...

To all Gentooers, add this to /etc/portage/package.use :
Code:
dev-lang/php session cli xml sockets

_________________

HOWTOs :
Templates :


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 5:37 am 
Offline

Joined: Fri Sep 09, 2005 2:34 am
Posts: 3
Location: Austria
First of all: This plugin is a very good idea and so long it is also well done -Thank you!

I installed the plugin and it seems that is working correctly, but I have a question about the interval when discover is scanning the subnet(s):
Where can I configure the time-interval? Is it hardcoded at the moment and if so where can I modify it?

Thanks,
Alex.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 9:08 am 
Offline

Joined: Fri Sep 09, 2005 2:34 am
Posts: 3
Location: Austria
I found where I can configure the time-interval:

setup.php:
...
function discovery_poller_bottom () {
global $config;

include_once($config["library_path"] . "/database.php");

$t = read_config_option("discovery_last_poll");

if ($t != '' && time() - $t < 21600)
return;
...

The bold value is the time interval since last poll in seconds, which is by default 6 hours.

;-)
Alex.


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


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