[ixpmanager] update-l2database.pl not updating database

Barry O'Donovan barry.odonovan at inex.ie
Wed Sep 25 10:43:42 IST 2013



On 25/09/13 10:34, Nick Hilliard wrote:
> If you're not seeing this, then probably there is a mismatch between the
> switch port names in the database and the switch port interfaces that are
> being picked up via SNMP.
>
> The --debug option dumps out two data structures: $l2mapping is what's
> picked up from the switch and is a list of all the MAC addresses picked up
> on each port, keyed on the name of the port.  $ports is a list of ports
> from the database, keyed on the name of the port.  The two key names should
> match for each switch. If they don't, there is a problem.
>
> JUNOS can be a bit funny about interface names (e.g. ge-0/0/1 vs
> ge-0/0/1.0), and there is a good degree of scope for interpretation in the
> various MIBs.

This should be less of an issue these days (with the caveat:) so long as 
switches are added via SNMP-polling [1]; and, even if they are not, the 
cron based SNMP poller should auto-correct any issues [2].

Note that the database now also records the ifIndex of ports (and other 
additional info - see below) which can also be keyed against rather than 
ifName / ifDescription.

  - Barry

[1] http://git.io/dmWA6g
[2] http://git.io/7ZPmUw


MariaDB [inex]> desc switch;
+----------------+--------------+
| Field          | Type         |
+----------------+--------------+
| id             | int(11)      |
| cabinetid      | int(11)      |
| vendorid       | int(11)      |
| name           | varchar(255) |
| ipv4addr       | varchar(255) |
| ipv6addr       | varchar(255) |
| snmppasswd     | varchar(255) |
| infrastructure | int(11)      |
| switchtype     | int(11)      |
| model          | varchar(255) |
| active         | tinyint(1)   |
| notes          | longtext     |
| hostname       | varchar(255) |
| os             | varchar(255) |
| osDate         | datetime     |
| osVersion      | varchar(255) |
| lastPolled     | datetime     |
+----------------+--------------+
17 rows in set (0.02 sec)




More information about the ixpmanager mailing list