NAME

netdisco-do - Run any Netdisco job from the command-line.

SYNOPSIS

~/bin/netdisco-do <action> [-DISQR] [--enqueue] [--force] [--quiet] [-d <device> [-p <port>] [-e <extra>]]

DESCRIPTION

This program allows you to run any Netdisco poller job from the command-line.

BEHAVIOR

Note that some jobs (discoverall, macwalk, arpwalk, nbtwalk) simply add entries to the Netdisco job queue for other jobs, so won't seem to do much when you trigger them. Everything else happens in real-time.

However the "--enqueue" option will force the queueing of the job, regardless of type. This may be useful for cron-driven actions, or for actions working across large IP spaces. Netdisco will refuse to queue more than 512 jobs at once unless you also add the "--force" option.

For any action, if you wish to run one of its individual worker stages, then pass action::stage as the first argument to netdisco-do, for example discover::neighbors.

Any action taking a device parameter can be passed either a hostname or IP address of any interface of a known or unknown device, or an IP prefix (subnet) which will cause netdisco-do to run the action on all addresses in that range. If the device parameter begins with "@" it is interpreted as a filename to open and read hostnames, IPs, or prefixes, one per line.

The device parameter may be passed multiple times. In this case, all addresses (after expanding IP Prefixes) will be handled one by one.

ACTIONS

For a complete list of actions and their accepted parameters, see the Netdisco wiki: https://github.com/netdisco/netdisco/wiki/Actions

DEBUG OPTIONS

The flag "-R" will cause any changes to the database to be rolled back at the end of the action.

The flags "-DISQ" can be specified, multiple times, and enable the following items in order:

-D

Netdisco debug log level.

-I or -II

SNMP::Info trace level (1 or 2).

-S or -SS or -SSS

SNMP (net-snmp) trace level (1, 2 or 3).

-Q

DBIx::Class trace enabled.

In case of issues with the colored output, setting the environment variable ANSI_COLORS_DISABLED or NO_COLOR can be used to suppress it.

The --dry-run option can be provided to show the workers that will run without actually executing their content. Setting the ND2_WORKER_ROLL_CALL environment variable does the same thing.