Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
NETDISCO-SSHCOLLECTOR(User Contributed Perl DocumentatNETDISCO-SSHCOLLECTOR(1)

NAME
       netdisco-sshcollector - DEPRECATED!

DEPRECATION NOTICE
       The functionality of this standalone script has been incorporated into
       Netdisco	core.

       Please read the deprecation notice if you are using
       "netdisco-sshcollector":

       o   <https://github.com/netdisco/netdisco/wiki/sshcollector-Deprecation>

SYNOPSIS
	# install dependencies:
	~/bin/localenv cpanm --notest Net::OpenSSH Expect

	# run manually,	or add to cron:
	~/bin/netdisco-sshcollector [-DQO] [-w <max_workers>]

	# limit	run to a single	device defined in the config
	~/bin/netdisco-sshcollector [-DQO] [-w <max_workers>] -d <device>

DESCRIPTION
       Collects	ARP data for Netdisco from devices without full	SNMP support.
       Currently, ARP tables can be retrieved from the following device
       classes:

       o   App::Netdisco::SSHCollector::Platform::GAIAEmbedded - Check Point
	   GAIA	Embedded

       o   App::Netdisco::SSHCollector::Platform::CPVSX	- Check	Point VSX

       o   App::Netdisco::SSHCollector::Platform::ACE -	Cisco ACE

       o   App::Netdisco::SSHCollector::Platform::ASA -	Cisco ASA

       o   App::Netdisco::SSHCollector::Platform::IOS -	Cisco IOS

       o   App::Netdisco::SSHCollector::Platform::IOSXR	- Cisco	IOS XR

       o   App::Netdisco::SSHCollector::Platform::NXOS - Cisco NXOS

       o   App::Netdisco::SSHCollector::Platform::BigIP	- F5 Networks BigIP

       o   App::Netdisco::SSHCollector::Platform::FreeBSD - FreeBSD

       o   App::Netdisco::SSHCollector::Platform::Linux	- Linux

       o   App::Netdisco::SSHCollector::Platform::PaloAlto - Palo Alto

       The collected arp entries are then directly stored in the netdisco
       database.

CONFIGURATION
       The following should go into your Netdisco configuration	file,
       ~/environments/deployment.yml.

       "sshcollector"
	   Data	is collected from the machines specified in this setting. The
	   format is a list of dictionaries. The keys "ip", "user",
	   "password", and "platform" are required. Optionally the "hostname"
	   key can be used instead of the "ip".	For example:

	    sshcollector:
	      -	ip: '192.0.2.1'
		user: oliver
		password: letmein
		platform: IOS
	      -	hostname: 'core-router.example.com'
		user: oliver
		password:
		platform: IOS

	   Platform is the final part of the classname to be instantiated to
	   query the host, e.g.	platform ACE will be queried using
	   "App::Netdisco::SSHCollector::Platform::ACE".

	   If the password is blank, public key	authentication will be
	   attempted with the default key for the netdisco user. Password
	   protected keys are currently	not supported.

ADDING DEVICES
       Additional device classes can be	easily integrated just by adding and
       additonal class to the "App::Netdisco::SSHCollector::Platform"
       namespace.  This	class must implement an	"arpnip($hostname, $ssh)"
       method which returns an array of	hashrefs in the	format

	@result	= ({ ip	=> IPADDR, mac => MACADDR }, ...)

       The parameter $ssh is an	active "Net::OpenSSH" connection to the	host.
       Depending on the	target system, it can be queried using simple methods
       like

	my @data = $ssh->capture("show whatever")

       or automated via	Expect - this is mostly	useful for non-Linux
       appliances which	don't support command execution	via ssh:

	my ($pty, $pid)	= $ssh->open2pty;
	unless ($pty) {
	  debug	"unable	to run remote command [$hostlabel] " . $ssh->error;
	  return ();
	}
	my $expect = Expect->init($pty);
	my $prompt = qr/#/;
	my ($pos, $error, $match, $before, $after) = $expect->expect(10, -re, $prompt);
	$expect->send("terminal	length 0\n");
	# etc...

       The returned IP and MAC addresses should	be in a	format that the
       respective inetaddr and macaddr datatypes in PostgreSQL can handle.

COMMAND	LINE OPTIONS
       "-D"
	   Netdisco debug log level.

       "-Q"
	   DBIx::Class trace enabled.

       "-O"
	   Net::OpenSSH	trace enabled.

       "-w"
	   Set maximum parallel	workers	for MCE::Loop. The default is auto.

       "-d device"
	   Only	run for	a single device. Takes an IP or	hostname, must exactly
	   match the value in the config file.

DEPENDENCIES
       App::Netdisco
       Net::OpenSSH
       Expect
       <http://www.openssh.com/>

perl v5.32.1			  2021-09-22	      NETDISCO-SSHCOLLECTOR(1)

NAME | DEPRECATION NOTICE | SYNOPSIS | DESCRIPTION | CONFIGURATION | ADDING DEVICES | COMMAND LINE OPTIONS | DEPENDENCIES

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=netdisco-sshcollector&sektion=1&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help