App-Netdisco
view release on metacpan or search on metacpan
bin/netdisco-do view on Meta::CPAN
~/bin/netdisco-do pingsweep -d 192.0.2.0/24 --enqueue
The default ping timeout is 0.1 seconds. To change this, pass any number
to the C<-e> parameter.
=head2 macsuck
Run a macsuck on the device (specified with C<-d>).
~/bin/netdisco-do macsuck -d 192.0.2.1
Submit macsuck data directly to Netdisco in JSON format (see API web
docs for data format example):
#Â pipe to standard input
~/bin/netdisco-do macsuck -d 192.0.2.1 -e '@-'
#Â read from a file
~/bin/netdisco-do macsuck -d 192.0.2.1 -e '@/tmp/mac-address-table.json'
#Â pass directly
~/bin/netdisco-do macsuck -d 192.0.2.1 -e '[{"ip": "string", "mac": "string", "dns": "string"}]'
=head2 macwalk
Queue a macsuck for all known devices.
=head2 arpnip
Run an arpnip on the device (specified with C<-d>).
~/bin/netdisco-do arpnip -d 192.0.2.1
Submit arpnip data directly to Netdisco in JSON format (see API web
docs for data format example):
#Â pipe to standard input
~/bin/netdisco-do arpnip -d 192.0.2.1 -e '@-'
#Â read from a file
~/bin/netdisco-do arpnip -d 192.0.2.1 -e '@/tmp/mac-address-table.json'
#Â pass directly
~/bin/netdisco-do arpnip -d 192.0.2.1 -e '[{"ip": "string", "mac": "string", "dns": "string"}]'
=head2 arpwalk
Queue an arpnip for all known devices.
=head2 delete
Delete a device (specified with C<-d>). Pass a log message for the action in
the C<-e> parameter. Optionally request for associated nodes to be archived
(rather than deleted) by setting the C<-p> parameter to "C<yes>" (mnemonic:
B<p>reserve).
~/bin/netdisco-do delete -d 192.0.2.1
~/bin/netdisco-do delete -d 192.0.2.1 -e 'older than the sun'
~/bin/netdisco-do delete -d 192.0.2.1 -e 'older than the sun' -p yes
=head2 renumber
Change the canonical IP address of a device (specified with C<-d>). Pass the
new IP address in the C<-e> parameter. All related records such as topology,
log and node information will also be updated to refer to the new device.
Note that I<no> check is made as to whether the new IP is reachable for future
polling.
~/bin/netdisco-do renumber -d 192.0.2.1 -e 192.0.2.254
=head2 nbtstat
Run an nbtstat on the node (specified with C<-d>).
~/bin/netdisco-do nbtstat -d 192.0.2.2
=head2 nbtwalk
Queue an nbtstat for all known nodes.
=head2 Custom Field update
Update a Device or Device Port custom field using `netdisco-do`. Specify
the field name as the "action" prefixed with `cf_`. The content can be
passed in the command, or taken from a file, or from standard input.
#Â pass directly
~/bin/netdisco-do cf_myfield --enqueue -d 192.0.2.1 -e 'field value'
#Â pipe from standard input
~/bin/netdisco-do cf_myfield --enqueue -d 192.0.2.1 -e '@-'
#Â read from a file
~/bin/netdisco-do cf_myfield --enqueue -d 192.0.2.1 -e '@/tmp/myfield'
Note that `--enqueue ` is *required* for the feature to work. The change
is, however, applied instanty in the database when `netdisco-do` runs.
=head2 expire
Run Device and Node expiry actions according to configuration.
=head2 expirenodes
Archive nodes on the specified device. If you want to delete nodes, set the
C<-e> parameter to "C<no>" (mnemonic: B<e>xpire). If you want to perform the
action on a specific port, set the C<-p> parameter.
~/bin/netdisco-do expirenodes -d 192.0.2.1
~/bin/netdisco-do expirenodes -d 192.0.2.1 -p FastEthernet0/1 -e no
=head2 graph
Generate GraphViz graphs for the largest cluster of devices.
You'll need to install the L<Graph::Undirected> and L<GraphViz> Perl modules,
and possibly also the C<graphviz> utility for your operating system. Also
create a directory for the output files.
mkdir ~/graph
~/bin/localenv cpanm Graph::Undirected
~/bin/localenv cpanm GraphViz
=head2 show
Dump the content of an SNMP MIB Object or an L<SNMP::Info> method, useful for
( run in 0.665 second using v1.01-cache-2.11-cpan-39bf76dae61 )