GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NETDISCO-SSHCOLLECTOR (1)

.ds Aq ’

NAME

netdisco-sshcollector - Collect ARP data for Netdisco from devices without full SNMP support

CONTENTS

SYNOPSIS



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

 # run manually, or add to cron:
 ~/bin/netdisco-sshcollector [-DQ]



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::ACE - Cisco ACE
o App::Netdisco::SSHCollector::Platform::ASA - Cisco ASA
o App::Netdisco::SSHCollector::Platform::BigIP - F5 Networks BigIP
o App::Netdisco::SSHCollector::Platform::IOS - Cisco IOS
o App::Netdisco::SSHCollector::Platform::IOSXR - Cisco IOS XR
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 2 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: letmein
     platform: IOS



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

If the password is -, public key authentication will be attempted.

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 or die "unable to run remote command";
 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 <B>inetaddrB> and <B>macaddrB> datatypes in PostgreSQL can handle.

DEBUG LEVELS

The flags "-DQ" can be specified, multiple times, and enable the following items in order:
-D Netdisco debug log level
-Q DBIx::Class trace enabled

DEPENDENCIES

App::Netdisco
Net::OpenSSH
Expect
Search for    or go to Top of page |  Section 1 |  Main Index


perl v5.20.3 NETDISCO-SSHCOLLECTOR (1) 2015-07-13

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.