Update support for avaya-vsp and fix problem in functions.php for avaya-vsp #4237

Merged
merged 27 commits into from Aug 29, 2016

Projects

None yet

4 participants

@ospfbgp
Contributor
ospfbgp commented Aug 28, 2016 edited

Please note

Please read this information carefully.

Added to allow Avaya VSP switches to discover its ports. All the Avaya VSP switches contain "Avaya Virtual Services Platform" in the port ifDescr and so you can not graph the ports with the current code.

@ospfbgp ospfbgp Update functions.php
Added to allow Avaya VSP switches to discover its ports.  All the Avaya VSP switches contain "Avaya Virtual Services Platform" in the port ifDescr and so you can not graph the ports with the current code.
81a0052
@ospfbgp ospfbgp Update definitions.inc.php
Better description of the actual operating system on an Avaya VSP
1c83657
@ospfbgp ospfbgp Update functions.php
bc1d41f
@ospfbgp ospfbgp Update avaya-vsp.inc.php
add more support for sysObjectID for avaya-vsp
79e1726
@ospfbgp ospfbgp Update avaya-vsp.inc.php
add more support for better information on an avaya-vsp switch
322aa6f
ospfbgp added some commits Aug 28, 2016
@ospfbgp ospfbgp Update avaya-vsp.inc.php
changed from using the current cpu to 5 minute average since librenms polls on a 5 minute average
54a5a1e
@ospfbgp ospfbgp Create avaya-vsp.ini.php
create polling for cpu on avaya-vsp
4043b55
@laf
Member
laf commented Aug 28, 2016

Will check through but yes this is how we wanted it :)

ospfbgp added some commits Aug 28, 2016
@ospfbgp ospfbgp Create avaya-vsp.inc.php
add support for correct memory utilization on avaya-vsp
26a641c
@ospfbgp ospfbgp Create avaya-vsp.inc.php
support for polling of avaya-vsp memory
8891734
@ospfbgp ospfbgp Rename avaya-vsp.ini.php to avaya-vsp.inc.php
49ae3c7
@ospfbgp
Contributor
ospfbgp commented Aug 28, 2016

I have updated all the files and put this in 1 pull request. thanks for the patience I am new to github and librenms.

@ospfbgp ospfbgp changed the title from Update functions.php to update support for avaya-vsp and fix problem in functions.php for avaya-vsp Aug 28, 2016
@ospfbgp ospfbgp changed the title from update support for avaya-vsp and fix problem in functions.php for avaya-vsp to Update support for avaya-vsp and fix problem in functions.php for avaya-vsp Aug 28, 2016
@laf laf commented on an outdated diff Aug 28, 2016
includes/definitions.inc.php
@@ -1019,7 +1019,7 @@
$config['os'][$os]['icon'] = 'avaya';
$os = 'avaya-vsp';
-$config['os'][$os]['text'] = 'Avaya VSP';
+$config['os'][$os]['text'] = 'VOSS';
@laf
laf Aug 28, 2016 Member

How come this is changed to VOSS? It's only a text description and Avaya VSP seems more relevant still.

@laf laf commented on an outdated diff Aug 28, 2016
includes/discovery/os/avaya-vsp.inc.php
@@ -2,7 +2,7 @@
/*
* LibreNMS
*
- * Copyright (c) 2016 Neil Lathwood <neil@lathwood.co.uk>
@laf
laf Aug 28, 2016 Member

You can't remove my copyright, it's fine to add your copyright with it as well but you'll need to restore this line.

@laf laf commented on an outdated diff Aug 28, 2016
includes/polling/mempools/avaya-vsp.inc.php
+ * Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version. Please see LICENSE.txt at the top level of
+ * the source code distribution for details.
+ */
+
+// Avaya VSP Memory w/ VOSS
+// rcKhiSlotMemUsed 1.3.6.1.4.1.2272.1.85.10.1.1.6.1
+// rcKhiSlotMemFree 1.3.6.1.4.1.2272.1.85.10.1.1.7.1
+// rcKhiSlotMemUtil 1.3.6.1.4.1.2272.1.85.10.1.1.8.1
+
+if ($device['os'] == 'avaya-vsp') {
+ $used = (snmp_get($device, "1.3.6.1.4.1.2272.1.85.10.1.1.6.1", '-OvQ') * 1000);
+ $free = (snmp_get($device, "1.3.6.1.4.1.2272.1.85.10.1.1.7.1", '-OvQ') * 1000);
+ $perc = snmp_get($device, "1.3.6.1.4.1.2272.1.85.10.1.1.8.1", '-OvQ');
+ $total = ($used + $free);
+ echo "Avaya VSP Memory ";
@laf
laf Aug 28, 2016 Member

You will need to change echo to d_echo(); I.e:

d_echo("Avaya VSP Memory");

@laf laf commented on an outdated diff Aug 28, 2016
includes/polling/os/avaya-vsp.inc.php
@@ -2,15 +2,29 @@
/*
* LibreNMS
*
- * Copyright (c) 2016 Neil Lathwood <neil@lathwood.co.uk>
@laf
laf Aug 28, 2016 Member

You can't remove my copyright, it's fine to add your copyright with it as well but you'll need to restore this line.

@laf laf commented on an outdated diff Aug 28, 2016
includes/polling/os/avaya-vsp.inc.php
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
-$temp = explode(' ', $poll_device['sysDescr']);
-$hardware = $temp[0];
-$serial = snmp_get($device, 'rcChasSerialNumber', '-Osqv', 'RAPID-CITY');
-$version = snmp_get($device, 'rcSysVersion', '-Osqv', 'RAPID-CITY');
+// rcSysVersion
+$version = snmp_get($device, '.1.3.6.1.4.1.2272.1.1.7.0', '-Oqvn');
@laf
laf Aug 28, 2016 Member

Are these just the numerical OID of things like rcChasSerialNumber. If so you should leave them as names so it makes it easier to read.

@laf laf commented on an outdated diff Aug 28, 2016
includes/polling/os/avaya-vsp.inc.php
-$temp = explode(' ', $poll_device['sysDescr']);
-$hardware = $temp[0];
-$serial = snmp_get($device, 'rcChasSerialNumber', '-Osqv', 'RAPID-CITY');
-$version = snmp_get($device, 'rcSysVersion', '-Osqv', 'RAPID-CITY');
+// rcSysVersion
+$version = snmp_get($device, '.1.3.6.1.4.1.2272.1.1.7.0', '-Oqvn');
+$version = explode(' ', $version);
+$version = $version[0];
+$version = str_replace('"', '', $version);
+
+// rcChasSerialNumber
+$serial = snmp_get($device, '.1.3.6.1.4.1.2272.1.4.2.0', '-Oqvn');
+$serial = str_replace('"', '', $serial);
+
+// rcChasHardwareRevision
+$sysDescr = $poll_device['sysDescr'];
@laf
laf Aug 28, 2016 Member

No point in declaring this. Just use $poll_device['sysDescr']; on the line below.

@laf
Member
laf commented Aug 28, 2016

Nearly all good - just some comments you need to look at and resolve.

@laf laf commented on an outdated diff Aug 28, 2016
includes/functions.php
@@ -802,7 +802,7 @@ function is_port_valid($port, $device) {
global $config;
- if (strstr($port['ifDescr'], "irtual")) {
+ if (strstr($port['ifDescr'], "irtual") && strpos($port['ifDescr'], "Virtual Services Platform") == false) {
@laf
laf Aug 28, 2016 Member

You should do === false here.

@laf
Member
laf commented Aug 28, 2016

please also see the travis output for some formatting issues:

https://travis-ci.org/librenms/librenms/jobs/155791665

ospfbgp added some commits Aug 29, 2016
@ospfbgp ospfbgp Update avaya-vsp.inc.php
8f185c1
@ospfbgp ospfbgp Update functions.php
366445c
@ospfbgp ospfbgp Update avaya-vsp.inc.php
7d5bd4d
ospfbgp added some commits Aug 29, 2016
@ospfbgp ospfbgp Update avaya-vsp.inc.php
74bff86
@ospfbgp ospfbgp Update avaya-vsp.inc.php
1dd699b
@ospfbgp ospfbgp Update definitions.inc.php
How about Avaya VOSS?  VOSS is what Avaya calls the operating system on the VSP product.   I was trying to be very good description.  In my testing VOSS looked really nice in the webui.   Within Avaya the OS is called VOSS.

I know other definitions were 
$config['os'][$os]['text']             = 'ArubaOS';
$config['os'][$os]['text'] = 'PanOS';
8121b52
@ospfbgp ospfbgp Update avaya-vsp.inc.php
e16d50d
@ospfbgp ospfbgp Update avaya-vsp.inc.php
Had a mistake should be sysObjectId not sysObjectID.
0c81567
ospfbgp added some commits Aug 29, 2016
@ospfbgp ospfbgp Update avaya-vsp.inc.php
more testing revealed that I needed the add .0 to oid name
bf434ac
@ospfbgp ospfbgp Update avaya-vsp.inc.php
bbce73a
@ospfbgp ospfbgp Update avaya-vsp.inc.php
no need for determining the os since it is a poller
6b8533e
@ospfbgp ospfbgp Update avaya-vsp.inc.php
f610d16
ospfbgp added some commits Aug 29, 2016
@ospfbgp ospfbgp Update avaya-vsp.inc.php
more mistakes revealed with my multiplication of values
864fdc8
@ospfbgp ospfbgp Update avaya-vsp.inc.php
d68a9eb
ospfbgp added some commits Aug 29, 2016
@ospfbgp ospfbgp Update avaya-vsp.inc.php
f011599
@ospfbgp ospfbgp Update avaya-vsp.inc.php
04c070a
@ospfbgp ospfbgp Update avaya-vsp.inc.php
2118a3b
@scrutinizer-notifier

The inspection completed: No new issues

@ospfbgp
Contributor
ospfbgp commented Aug 29, 2016

This is close to being ready. I am going to double check everything. My testing revealed a few issues but now things seem to be working properly on my test vsp switches with discovery and polling. I would like to call the operating system Avaya VOSS or VOSS in the definitions.inc.php. Here are some screen shots of what it looks like with Avaya VOSS.
screen1_voss
screen2_voss

@laf laf removed the Blocker label Aug 29, 2016
@laf laf merged commit d62f2f9 into librenms:master Aug 29, 2016

2 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment