Juniper EX Switch - Trunk Port Down Alarms - MySQL Table entry

Hi All,

We have a large Juniper EX switch install to monitor. We would like to trigger alerts when a trunk port goes down, not bothered about access ports.

root@netmon00:/opt/librenms# ./validate.php

Component Version
LibreNMS 1.38-33-g5d64c5d
DB Schema 247
PHP 7.0.28-0ubuntu0.16.04.1
MySQL 10.0.34-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.6.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

When we run a discovery against a Juniper switch it is using the JUNIPER-VLAN-MIB and pulling back jnxExVlanPortTagness

jnxExVlanPortTagness OBJECT-TYPE
SYNTAX INTEGER {
tagged (1),
untagged (2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
“The VlanPortTaqness gives whether the Port is tagged or untagged.”
::= { jnxExVlanPortGroupEntry 4 }

SNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQeUs --hexOutputLength=0 -m JUNIPER-VLAN-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/junos udp:HOSTNAME:161 jnxExVlanPortTagness]
jnxExVlanPortTagness.3.517 = 1
jnxExVlanPortTagness.3.518 = 1
jnxExVlanPortTagness.3.519 = 1
jnxExVlanPortTagness.3.520 = 1

However, I can’t see where this is added to the MySQL database.

MariaDB [librenms]> SELECT * FROM vlans WHERE device_id = ‘14’;
±--------±----------±----------±------------±----------±----------±---------+
| vlan_id | device_id | vlan_vlan | vlan_domain | vlan_name | vlan_type | vlan_mtu |
±--------±----------±----------±------------±----------±----------±---------+
| 17089 | 14 | 0 | 1 | default | NULL | NULL |
| 663 | 14 | 10 | 1 | VLAN10 | NULL | NULL |
| 674 | 14 | 40 | 1 | WLAN_IPP | NULL | NULL |
| 669 | 14 | 55 | 1 | VLAN55 | NULL | NULL |
| 670 | 14 | 60 | 1 | VLAN60 | NULL | NULL |
| 671 | 14 | 63 | 1 | VLAN63 | NULL | NULL |
| 672 | 14 | 64 | 1 | VLAN64 | NULL | NULL |
| 664 | 14 | 100 | 1 | VLAN100 | NULL | NULL |
| 666 | 14 | 101 | 1 | VLAN101 | NULL | NULL |
| 667 | 14 | 111 | 1 | VLAN111 | NULL | NULL |
| 668 | 14 | 112 | 1 | VLAN112 | NULL | NULL |
| 665 | 14 | 1000 | 1 | VLAN1000 | NULL | NULL |
±--------±----------±----------±------------±----------±----------±---------+

No actual question asked.

Hi Laf, sorry was firts time post, just editing it now.

I have also checked this table,.

MariaDB [librenms]> describe ports_vlans;
±-------------±------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±-------------±------------±-----±----±--------±---------------+
| port_vlan_id | int(11) | NO | PRI | NULL | auto_increment |
| device_id | int(11) | NO | MUL | NULL | |
| port_id | int(11) | NO | | NULL | |
| vlan | int(11) | NO | | NULL | |
| baseport | int(11) | NO | | NULL | |
| priority | bigint(32) | NO | | NULL | |
| state | varchar(16) | NO | | NULL | |
| cost | int(11) | NO | | NULL | |
| untagged | tinyint(4) | NO | | 0 | |
±-------------±------------±-----±----±--------±---------------+

But if I check the table it doesn’t have many devices in it;

MariaDB [librenms]> SELECT * FROM ports_vlans;
±-------------±----------±--------±-----±---------±---------±-----------±------±---------+
| port_vlan_id | device_id | port_id | vlan | baseport | priority | state | cost | untagged |
±-------------±----------±--------±-----±---------±---------±-----------±------±---------+
| 1 | 13 | 597 | 1 | 7 | 0 | unknown | 0 | 1 |
| 2 | 13 | 611 | 1 | 21 | 128 | forwarding | 65535 | 0 |
| 3 | 13 | 612 | 1 | 22 | 0 | unknown | 0 | 1 |
| 4 | 13 | 613 | 1 | 23 | 0 | unknown | 0 | 1 |
| 5 | 13 | 592 | 1 | 2 | 0 | unknown | 0 | 0 |
| 6 | 13 | 598 | 1 | 8 | 0 | unknown | 0 | 1 |
| 7 | 13 | 603 | 1 | 13 | 0 | unknown | 0 | 0 |
| 8 | 13 | 604 | 1 | 14 | 0 | unknown | 0 | 1 |
| 9 | 13 | 605 | 1 | 15 | 128 | forwarding | 20000 | 1 |
| 10 | 13 | 606 | 1 | 16 | 0 | unknown | 0 | 1 |
| 12 | 13 | 609 | 1 | 19 | 0 | unknown | 0 | 1 |
| 13 | 13 | 614 | 1 | 24 | 0 | unknown | 0 | 1 |
| 14 | 13 | 615 | 1 | 25 | 0 | unknown | 0 | 1 |
| 15 | 13 | 616 | 1 | 26 | 0 | unknown | 0 | 1 |
| 16 | 13 | 617 | 1 | 27 | 0 | unknown | 0 | 1 |
| 17 | 13 | 618 | 1 | 28 | 0 | unknown | 0 | 1 |
| 18 | 13 | 591 | 10 | 1 | 0 | unknown | 0 | 1 |
| 19 | 13 | 597 | 10 | 7 | 0 | unknown | 0 | 0 |

We don’t seem to store that information (or use it).

What would be the process to get this information into the DB?
Is this a feature request or is this something we can do on our install?

My collegue found this earlier. But it is Alpha and unmaintained;

https://docs.librenms.org/#Extensions/MIB-based-polling/

Feature request I’d say. MIB polling is going to go so don’t use that.

Can I turn this post into a fetaure request or should I log a new post?

I think you should do a new post specifying exactly what you want.