Nmap discovery tool

Skip to first unread message

Jeremy Grosser

Apr 26, 2010, 2:22:29 AM4/26/10
to clu...@googlegroups.com
I didn't manage to get this into the first release of clusto, but I
wanted to get it out there to make things a bit less painful for
people doing first-time network discovery.

This script runs an nmap ping scan "nmap -sP" over the given subnet or
range and attempts to discover in-depth information using the
discover_hardware method from /var/lib/clusto/sysinfo.py. The default
installed version of that method will attempt to SSH to the host, run
a bunch of basic commands, parse the output, and return a dict that
gets passed to the update_server method in the same module, where the
host's info in clusto is created or updated.

If you need to customize the discovery portion of things, simply edit
/var/lib/clusto/sysinfo.py to suit your needs. The installed version
of this file has only been tested with Debian servers with our base
set of packages installed... YMMV

$ clusto discover-subnet
Starting nmap scan...
Scan complete, beginning clusto discovery

You'll either see hosts getting added to the database, or errors
because the discovery failed. Discovery can fail for one of two
1. The script couldn't open an SSH connection to the target host on port 22
2. One or more of the discovery commands failed or the output could
not be parsed

Jeremy Grosser

Subscription settings: http://groups.google.com/group/clusto/subscribe?hl=en
Reply all
Reply to author
0 new messages