From e607ac770800f93670a0cfb655b0556508931021 Mon Sep 17 00:00:00 2001 From: Lionel Sausin Date: Thu, 9 Feb 2017 16:01:20 +0100 Subject: [PATCH] Correctly detect the Routing Engines on Virtual Chassis The current recommended firmware for EX3400 (JUNOS 15.1X53-D55.5) lists the routing engines as 'Routing engine ' when the switches are stacked in a Virtual Chassis. The former code failed to detect these strings, so I relaxed it a bit. This matches the documentation found here: https://kb.juniper.net/InfoCenter/index?page=content&id=KB17526&actp=search --- plugins/snmp/snmp__juniper | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/snmp/snmp__juniper b/plugins/snmp/snmp__juniper index 44ee5ae3..e2873511 100755 --- a/plugins/snmp/snmp__juniper +++ b/plugins/snmp/snmp__juniper @@ -109,8 +109,7 @@ class JunOSSnmpClient(object): if not str(name).startswith(jnxOperatingTable): continue - # TODO: Find a better way to get the routing engines in a cluster - if str(value).endswith(' Routing Engine'): + if 'Routing Engine' in str(value): devices[str(name)[len(jnxOperatingTable):]] = re.sub("[^\w]", '_', str(value).replace(' Routing Engine', '')) return devices