Send netdisco-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:
1. Re: No more MAC to IP resolution on remote campus(es)!
(Nikolaos Milas)
2. Re: No more MAC to IP resolution on remote campus(es)!
(Christian Ramseyer)
--- Begin Message ---
On 23/10/2019 11:19 μ.μ., Nikolaos Milas wrote:
We are having a serious problem in latest versions: I can't see IP
addresses in device info; a switch list shows only mac addresses at
ports and some private IP addresses (not all), but public addresses
are not provided.
Interestingly, this only happens to remote campuses. The Netdisco
server is at campus A but it monitors both campus A and remote campus
B. The issue happens only with devices at campus B.
After further thinking, I suspected that something may be going wrong
with sshcollector in late NetDisco Versions.
"Campus B" as described in my initial message, at its center has a Cisco
ASA device, which could only provide data through an sshcollector.
Indeed, I found that sshcollector is deprecated:
https://github.com/netdisco/netdisco/wiki/sshcollector-Deprecation
I would never have checked before upgrade...
This is how the sshcollector had been configured (for years) in Netdisco
<home>/environments/deployment.yml
sshcollector:
- ip: '195.251.xxx.xxx'
user: asa_admin
password: ****************
enable_password: ****************
platform: ASA
Now I replaced the above configuration with the new (suggested) one. I
tried:
device_auth:
- tag: ASA
driver: cli
platform: ASA
only: '195.251.xxx.xxx'
username: asa_admin
password: ****************
enable_password: ****************
and it (finally) worked, after I created a pseudo device for the IP
address: 195.251.xxx.xxx because ASA wouldn't accept SNMP queries. (All
discover attempts failed.)
Then:
$ ~/bin/netdisco-do arpnip -d 195.251.xxx.xxx
[17366] 2019-10-24 10:02:17 info App::Netdisco version 2.044003 loaded.
[17366] 2019-10-24 10:02:18 info arpnip: [195.251.xxx.xxx] started
at Thu Oct 24 13:02:18 2019
[17366] 2019-10-24 10:02:28 info arpnip: finished at Thu Oct 24
13:02:28 2019
[17366] 2019-10-24 10:02:28 info arpnip: status done: Gathered arp
caches from 195.251.xxx.xxx
So, things seem to be working OK now. I noticed that IP address data is
being collected again for all devices (to the extent I have checked).
Yet, as I have mentioned, I have lost all historical data of real IP
Address usage for devices behind the ASA...
I have two questions:
1. Why deprecation of sshcollector caused the deletion of all historical
data of IP Addresses behind ASA?
2. I have a backup of the db (a few weeks old), just before the upgrade
to 2.042010 (which -now I know- was the first one I used in which
sshcollector has changed). The database schema must be version 53 (that
of v2.040003). Is there a way to import data about usage of particular
IP ranges? If not, can I restore the backup (and scrap the current db)
and force a new "deploy" which will upgrade the db to current schema
version?
I guess the latter solution should be more straightforward. I would lose
IP Address use data spanning a period of a few weeks, but I will retain
older data, which cover a period of many years.
Please advise!
Thanks in advance for your feedback.
Cheers,
Nick
--- End Message ---
--- Begin Message ---
Hi Nikolaos
On 24.10.19 12:40, Nikolaos Milas wrote:
>
> So, things seem to be working OK now. I noticed that IP address data is
> being collected again for all devices (to the extent I have checked).
That's good to hear. Yes the sshcollector deprecation was a somewhat
disruptive change, sorry for the trouble.
>
> Yet, as I have mentioned, I have lost all historical data of real IP
> Address usage for devices behind the ASA...
>
> I have two questions:
>
> 1. Why deprecation of sshcollector caused the deletion of all historical
> data of IP Addresses behind ASA?
I imagine that's because the entries did not get updated anymore, at
some point the expiration kicks in and deletes them. This depends on
your expire_nodes and expire_nodeip_freshness, by default they would
disappear after 90 days.
>
> 2. I have a backup of the db (a few weeks old), just before the upgrade
> to 2.042010 (which -now I know- was the first one I used in which
> sshcollector has changed). The database schema must be version 53 (that
> of v2.040003). Is there a way to import data about usage of particular
> IP ranges? If not, can I restore the backup (and scrap the current db)
> and force a new "deploy" which will upgrade the db to current schema
> version?
>
> I guess the latter solution should be more straightforward. I would lose
> IP Address use data spanning a period of a few weeks, but I will retain
> older data, which cover a period of many years.
>
Yes you can do both. The restore and deploy should work exactly as you
wrote.
However if you want to only restore the lost IP-Mac mappings from
certain networks, you can do it like that:
1. Import your backup into a separate Postgres instance
2. In this separate instance, from the node_ip table, delete all records
that you don't want to restore, e.g. for all but one subnet:
delete from node_ip where not ip << '10.192.0.0/16';
3. Dump this data in column-insert format with pgdump into an SQL file
pg_dump --column-inserts -t node_ip > node_ip_records_to_restore.sql
4. Check the file if it contains everything you're missing, then nsert
the exported data back into your actual Postgres database using psql:
netdisco-do psql < node_ip_records_to_restore.sql
Cheers
Christian
--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users