From dcf48ae16d51a6814800a65611b31d40c7b0e4aa Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Fri, 27 Jan 2012 11:29:37 +0000 Subject: [PATCH] add avaya ers support git-svn-id: http://www.observium.org/svn/observer/trunk@2854 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/images/os/avaya.png | Bin 0 -> 634 bytes includes/discovery/mempools/avaya-ers.inc.php | 29 ++++++++++++ includes/discovery/os/avaya-ers.inc.php | 9 ++++ .../discovery/processors/avaya-ers.inc.php | 18 +++++++ .../discovery/temperatures/avaya-ers.inc.php | 25 ++++++++++ includes/polling/mempools/avaya-ers.inc.php | 19 ++++++++ includes/polling/os/avaya-ers.inc.php | 44 ++++++++++++++++++ includes/static-config.php | 7 +++ 8 files changed, 151 insertions(+) create mode 100644 html/images/os/avaya.png create mode 100644 includes/discovery/mempools/avaya-ers.inc.php create mode 100755 includes/discovery/os/avaya-ers.inc.php create mode 100644 includes/discovery/processors/avaya-ers.inc.php create mode 100644 includes/discovery/temperatures/avaya-ers.inc.php create mode 100644 includes/polling/mempools/avaya-ers.inc.php create mode 100644 includes/polling/os/avaya-ers.inc.php diff --git a/html/images/os/avaya.png b/html/images/os/avaya.png new file mode 100644 index 0000000000000000000000000000000000000000..857e18b4745785ff63b79ddc6c17fdd3912a49ed GIT binary patch literal 634 zcmV-=0)_pFP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L00Bh+00Bh-pG#M`00007bV*G`2ipf0 z3M(;LM(UaX00H_*L_t(o!|l^gXwGpQ!134j=hoSdAT|Aoga%P6LFLQ0x(yxvLKlks|tLPmE+@iEIFV>0Dbz5j^*j8|h6QabDX z8cFT&lcSgk)uah0abSu@h=jlq40cdLA7-lW1kML`W;DPU^CJf%109sAaew=B3YcUG zb|-AXhLm+J+`#8qw!;M7Sp0?2aoVv4+pv3*C6TLWjBJL5?7+`OTuxbs_Q=+nKc|2q zJ-FAxoycgQFHjB)L=Ho_Qu$B^v!T-c#Wrr@VUeCTz6CA?_C}IenbzqQd=K|BN1Hf8{%8jAfM{^zRv`J>y&bmgnT;= 6.1) { + $mem = snmp_walk($device, $OID, "-Osqn"); + + echo "$mem\n"; + + foreach (explode("\n", $mem) as $i => $t) { + $t = explode(" ",$t); + $oid = str_replace($OID, "", $t[0]); + discover_mempool($valid_mempool, $device, $oid, "avaya-ers", "Unit " . ($i+1) . " memory", "1", NULL, NULL); + } + } + } +} + +?> diff --git a/includes/discovery/os/avaya-ers.inc.php b/includes/discovery/os/avaya-ers.inc.php new file mode 100755 index 000000000..c4d6c9c50 --- /dev/null +++ b/includes/discovery/os/avaya-ers.inc.php @@ -0,0 +1,9 @@ + diff --git a/includes/discovery/processors/avaya-ers.inc.php b/includes/discovery/processors/avaya-ers.inc.php new file mode 100644 index 000000000..1e1092cf1 --- /dev/null +++ b/includes/discovery/processors/avaya-ers.inc.php @@ -0,0 +1,18 @@ + $t) { + $t = explode(" ",$t); + $oid = $t[0]; + $val = $t[1]; + discover_processor($valid['processor'], $device, $oid, zeropad($i+1), "avaya-ers", "Unit " . ($i+1) . " processor", "1", $val, $i, NULL); + } + } +} + +?> diff --git a/includes/discovery/temperatures/avaya-ers.inc.php b/includes/discovery/temperatures/avaya-ers.inc.php new file mode 100644 index 000000000..2d4e7bd63 --- /dev/null +++ b/includes/discovery/temperatures/avaya-ers.inc.php @@ -0,0 +1,25 @@ += 6.1) { + $temps = snmp_walk($device, "1.3.6.1.4.1.45.1.6.3.7.1.1.5.5", "-Osqn"); + + foreach (explode("\n", $temps) as $i => $t) { + $t = explode(" ",$t); + $oid = $t[0]; + $val = $t[1]; + # Sensors are reported as 2 * value + $val = trim($val) / 2; + discover_sensor($valid['sensor'], 'temperature', $device, $oid, zeropad($i+1), 'avaya-ers', "Unit " . ($i+1) . " temperature", '2', '1', NULL, NULL, NULL, NULL, $val); + } + } +} + +?> diff --git a/includes/polling/mempools/avaya-ers.inc.php b/includes/polling/mempools/avaya-ers.inc.php new file mode 100644 index 000000000..641a137fe --- /dev/null +++ b/includes/polling/mempools/avaya-ers.inc.php @@ -0,0 +1,19 @@ + diff --git a/includes/polling/os/avaya-ers.inc.php b/includes/polling/os/avaya-ers.inc.php new file mode 100644 index 000000000..24227fce3 --- /dev/null +++ b/includes/polling/os/avaya-ers.inc.php @@ -0,0 +1,44 @@ + 1) { + $features = "Stack of $stack_size units"; +} + + +$version = str_replace("\"","", $version); +$features = str_replace("\"","", $features); +$hardware = str_replace("\"","", $hardware); + +?> diff --git a/includes/static-config.php b/includes/static-config.php index 1a07e36a7..ba6624e9c 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -408,6 +408,13 @@ $config['os'][$os]['over'][1]['text'] = "CPU Usage"; $config['os'][$os]['over'][2]['graph'] = "device_mempool"; $config['os'][$os]['over'][2]['text'] = "Memory Usage"; +$os = "avaya-ers"; +$config['os'][$os]['text'] = "ERS Firmware"; +$config['os'][$os]['type'] = "network"; +$config['os'][$os]['icon'] = "avaya"; +$config['os'][$os]['over'][0]['graph'] = "device_bits"; +$config['os'][$os]['over'][0]['text'] = "Device Traffic"; + $os = "arista_eos"; $config['os'][$os]['text'] = "Arista EOS"; $config['os'][$os]['type'] = "network";