Skip to content

Commit

Permalink
newdevice: Updated JunOS os polling to detect version correctly (#6904)
Browse files Browse the repository at this point in the history
  • Loading branch information
laf authored and murrant committed Jun 30, 2017
1 parent 9a2b2ad commit 72da2c7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions includes/polling/os/junos.inc.php
@@ -1,6 +1,6 @@
<?php

$jun_ver = snmp_get($device, '.1.3.6.1.2.1.25.6.3.1.2.2', '-Oqv', 'HOST-RESOURCES-MIB');
$version = snmp_get($device, 'jnxVirtualChassisMemberSWVersion.0', '-Oqv', 'JUNIPER-VIRTUALCHASSIS-MIB');

if (strpos($poll_device['sysDescr'], 'olive')) {
$hardware = 'Olive';
Expand All @@ -11,6 +11,4 @@
$serial = snmp_get($device, '.1.3.6.1.4.1.2636.3.1.3.0', '-OQv', '+JUNIPER-MIB', 'junos');
}

list($version) = explode(']', $jun_ver);
list(,$version) = explode('[', $version);
$features = '';

1 comment on commit 72da2c7

@dneto82
Copy link
Contributor

@dneto82 dneto82 commented on 72da2c7 Jul 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this change. My OS version on JunOS isn't loading. Even with specific path to MIB:

# snmpwalk -c COMMUNITY -v2c srx-device .1.3.6.1.2.1.25.6.3.1.2.2
HOST-RESOURCES-MIB::hrSWInstalledName.2 = STRING: "JUNOS Software Release [15.1X49-D75.5]"

# snmpwalk -c COMMUNUTY -v2c srx-device jnxVirtualChassisMemberSWVersion.0 -m /usr/share/snmp/mibs/mib-jnx-virtualchassis.txt
JUNIPER-VIRTUALCHASSIS-MIB::jnxVirtualChassisMemberSWVersion.0 = No Such Object available on this agent at this OID

Please sign in to comment.