Commit Graph

8 Commits

Author SHA1 Message Date
Brian De Wolf
788d3ac26b dump sshcollector stderr into null (#396)
If SSH prints anything to stderr, it leaks out to the caller of sshcollect.
This change dumps it into /dev/null instead.
2018-04-28 11:43:39 +01:00
Oliver Gorwits
2caae8a642 clean up check_mac() interface (ml-cms) 2018-04-18 19:24:08 +01:00
Brian De Wolf
bebaaba626 fix sshcollector errors when devices are empty (#391)
While setting up an sshcollector, I found that the script doesn't handle an
arpless device very gracefully.  The log looks like:

	[46567] 2018-04-10 16:59:08  warn WARNING: no entries received from <IP>
	Can't use string ("1") as an ARRAY ref while "strict refs" in use at perl5/bin/netdisco-sshcollector line 114, <__ANONIO__> line 3.

This is fixed by making the process function always return the expected
structure, even if it's empty.  After this error, the following errors showed
up:

	[53232] 2018-04-10 17:06:15  warn WARNING: no entries received from <IP>
	[53210] 2018-04-10 17:06:15  info  [134.71.0.126] arpnip - retrieved 0 entries
	Use of uninitialized value in sprintf at perl5/bin/netdisco-sshcollector line 119, <__ANONIO__> line 3.
	[53210] 2018-04-10 17:06:15  info arpnip - processed  ARP Cache entries from 1 devices

This is because $stats{entry} only becomes an integer by being incremented, so
if there aren't any entries, it never exists.  This is fixed by starting it at 0.
2018-04-10 21:12:20 +01:00
Oliver Gorwits
fc4bfa8628 fix sshcollector 2017-12-14 21:42:01 +00:00
antonc42
8c0ee95189 Missing Pod::Usage dependency (#315)
It is necessary to include the "Pod::Usage" module to use the "pod2usage" method. Otherwise, an error occurs if an incorrect CLI option is used.
2017-07-05 05:55:49 +01:00
Oliver Gorwits
7dddf743e5 #320 DNS subroutines are redefined 2017-06-24 11:13:47 +01:00
Oliver Gorwits
16fa8ecc23 and mention NXOS in SSHCollector list 2017-04-19 22:00:40 +01:00
Oliver Gorwits
d23b32500f relocate repo files so ND2 is the only code 2017-04-14 23:08:55 +01:00