From 7de52b2f91880fa8917463e94d5392f7d169b5f8 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Thu, 29 Jul 2010 13:30:59 +0000 Subject: [PATCH] better versions for APC AOS git-svn-id: http://www.observium.org/svn/observer/trunk@1514 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/polling/os/apc.inc.php | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/includes/polling/os/apc.inc.php b/includes/polling/os/apc.inc.php index 9bb1bdf4b8..619bc8e522 100755 --- a/includes/polling/os/apc.inc.php +++ b/includes/polling/os/apc.inc.php @@ -50,19 +50,29 @@ if ($hardware == " ") ###################### -# PDU -$version = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.12.1.3.0", "-OQv", "", ""),'"'); +$AOSrev = trim(snmp_get($device, "1.3.6.1.4.1.318.1.4.2.4.1.4.1", "-OQv", "", ""),'"'); +$APPrev = trim(snmp_get($device, "1.3.6.1.4.1.318.1.4.2.4.1.4.2", "-OQv", "", ""),'"'); -if ($version == "") +if ($AOSrev == '') { - # ATS - $version = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.8.1.2.0", "-OQv", "", ""),'"'); + # PDU + $version = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.12.1.3.0", "-OQv", "", ""),'"'); + + if ($version == "") + { + # ATS + $version = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.8.1.2.0", "-OQv", "", ""),'"'); + } + + if ($version == "") + { + # Masterswitch/AP9606 + $version = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.4.1.2.0", "-OQv", "", ""),'"'); + } } - -if ($version == "") +else { - # Masterswitch/AP9606 - $version = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.4.1.2.0", "-OQv", "", ""),'"'); + $version = "AOS $AOSrev / App $APPrev"; } ?>