From 28ea10483fb5e69d7c699917946ca2e7dcdba3b1 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sun, 11 Jul 2010 15:27:42 +0000 Subject: [PATCH] APC UPS and older Masterswitch identification, both tested on AP9606 controller card git-svn-id: http://www.observium.org/svn/observer/trunk@1342 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/toner.inc.php | 2 +- includes/polling/device-apc.inc.php | 32 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/includes/discovery/toner.inc.php b/includes/discovery/toner.inc.php index 5058e7f15f..2835b609fc 100644 --- a/includes/discovery/toner.inc.php +++ b/includes/discovery/toner.inc.php @@ -2,7 +2,7 @@ if ($config['enable_printers']) { -$valid_toner = array(); + $valid_toner = array(); echo("Toner : "); diff --git a/includes/polling/device-apc.inc.php b/includes/polling/device-apc.inc.php index a85398fc2d..9bb1bdf4b8 100755 --- a/includes/polling/device-apc.inc.php +++ b/includes/polling/device-apc.inc.php @@ -9,6 +9,18 @@ if ($serial == "") $serial = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.8.1.6.0", "-OQv", "", ""),'"'); } +if ($serial == "") +{ + # UPS + $serial = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.1.1.2.3.0", "-OQv", "", ""),'"'); +} + +if ($serial == "") +{ + # Masterswitch/AP9606 + $serial = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.4.1.5.0", "-OQv", "", ""),'"'); +} + ###################### # PDU @@ -22,6 +34,20 @@ if ($hardware == " ") $hardware .= ' ' . trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.8.1.1.0", "-OQv", "", ""),'"'); } +if ($hardware == " ") +{ + # UPS + $hardware = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.1.1.1.1.0", "-OQv", "", ""),'"'); + $hardware .= ' ' . trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.1.1.2.1.0", "-OQv", "", ""),'"'); +} + +if ($hardware == " ") +{ + # Masterswitch/AP9606 + $hardware = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.4.1.4.0", "-OQv", "", ""),'"'); + $hardware .= ' ' . trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.4.1.1.0", "-OQv", "", ""),'"'); +} + ###################### # PDU @@ -33,4 +59,10 @@ if ($version == "") $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", "", ""),'"'); +} + ?>