device: Change Ironware mempools NetIron checking logic from sysObjectID to sysDescr (#7602)

* Changed the NetIron checking logic from sysObjectID to sysDescr

* updated method of checking sysDescr in ironware mempool files

* Update ironware-dyn.inc.php
This commit is contained in:
Chris A. Evans
2017-11-01 16:41:15 -05:00
committed by Neil Lathwood
parent a688a77864
commit 47b999cebd
2 changed files with 2 additions and 6 deletions

View File

@@ -4,9 +4,7 @@ $oid = $mempool['mempool_index'];
d_echo('Ironware Mempool'."\n");
$is_netiron = snmp_get($device, 'sysObjectID.0', '-OvQ', 'FOUNDRY-SN-AGENT-MIB');
if (strpos($is_netiron, 'NI') === false && strpos($is_netiron, 'MLX') === false && strpos($is_netiron, 'Cer') === false) {
if (str_contains($device['sysDescr'], array('NetIron', 'MLX', 'CER'))) {
$mempool['total'] = snmp_get($device, 'snAgGblDynMemTotal.0', '-OvQ', 'FOUNDRY-SN-AGENT-MIB');
$mempool['free'] = snmp_get($device, 'snAgGblDynMemFree.0', '-OvQ', 'FOUNDRY-SN-AGENT-MIB');
$mempool['used'] = ($mempool['total'] - $mempool['free']);