Skip to content

Commit

Permalink
Enable processor/mempool support for ewc using existing enterasys imp…
Browse files Browse the repository at this point in the history
…lementation
  • Loading branch information
trs80 committed Feb 28, 2018
1 parent 0a62f52 commit 668982c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
16 changes: 8 additions & 8 deletions LibreNMS/OS/Ewc.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ public function discoverWirelessErrors()

$sensors = array();
foreach ($oids as $index => $entry) {
$name = $ap_interfaces[explode('.',$index)[0]];
$name = $ap_interfaces[explode('.', $index)[0]];
$sensors[] = new WirelessSensor(
'errors',
$this->getDeviceId(),
'.1.3.6.1.4.1.4329.15.3.5.2.5.1.18.' . $index,
'ewc',
$index . 'Retx',
"Retransmits ($name radio " . explode('.',$index)[1]. ")"
"Retransmits ($name radio " . explode('.', $index)[1]. ")"
);
}
return $sensors;
Expand Down Expand Up @@ -237,14 +237,14 @@ public function discoverWirelessRssi()

$sensors = array();
foreach ($oids as $index => $entry) {
$name = $ap_interfaces[explode('.',$index)[0]];
$name = $ap_interfaces[explode('.', $index)[0]];
$sensors[] = new WirelessSensor(
'rssi',
$this->getDeviceId(),
'.1.3.6.1.4.1.4329.15.3.5.2.5.1.9.' . $index,
'ewc',
$index,
"RSS ($name radio " . explode('.',$index)[1]. ")"
"RSS ($name radio " . explode('.', $index)[1]. ")"
);
}
return $sensors;
Expand All @@ -263,14 +263,14 @@ public function discoverWirelessSnr()

$sensors = array();
foreach ($oids as $index => $entry) {
$name = $ap_interfaces[explode('.',$index)[0]];
$name = $ap_interfaces[explode('.', $index)[0]];
$sensors[] = new WirelessSensor(
'snr',
$this->getDeviceId(),
'.1.3.6.1.4.1.4329.15.3.5.2.5.1.13.' . $index,
'ewc',
$index,
"SNR ($name radio " . explode('.',$index)[1]. ")"
"SNR ($name radio " . explode('.', $index)[1]. ")"
);
}
return $sensors;
Expand All @@ -289,14 +289,14 @@ public function discoverWirelessUtilization()

$sensors = array();
foreach ($oids as $index => $entry) {
$name = $ap_interfaces[explode('.',$index)[0]];
$name = $ap_interfaces[explode('.', $index)[0]];
$sensors[] = new WirelessSensor(
'utilization',
$this->getDeviceId(),
'.1.3.6.1.4.1.4329.15.3.5.2.5.1.5.' . $index,
'ewc',
$index,
"Utilization ($name radio " . explode('.',$index)[1]. ")"
"Utilization ($name radio " . explode('.', $index)[1]. ")"
);
}
return $sensors;
Expand Down
9 changes: 9 additions & 0 deletions includes/definitions/discovery/ewc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mib: ENTERASYS-RESOURCE-UTILIZATION-MIB
modules:
processors:
data:
-
oid: etsysResourceCpuLoad5min
num_oid: '.1.3.6.1.4.1.5624.1.2.49.1.1.1.1.4.{{ $index }}'
index: '{{ $count }}'
precision: 10
4 changes: 4 additions & 0 deletions includes/definitions/ewc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ type: wireless
icon: extreme
over:
- { graph: device_bits, text: 'Device Traffic' }
- { graph: device_processor, text: 'CPU Usage' }
- { graph: device_mempool, text: 'Memory Usage' }
- { graph: device_wireless_ap-count, text: 'Connected APs' }
- { graph: device_wireless_clients, text: 'Connected Clients' }
discovery:
- sysObjectID:
- .1.3.6.1.4.1.4329.15.1.1.
mib_dir:
- enterasys
2 changes: 1 addition & 1 deletion includes/discovery/mempools/enterasys.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* the source code distribution for details.
*/

if ($device['os'] == 'enterasys') {
if ($device['os'] == 'enterasys' || $device['os'] == 'ewc') {
$enterasys_mem = snmpwalk_cache_threepart_oid($device, 'etsysResourceStorageTable', array(), 'ENTERASYS-RESOURCE-UTILIZATION-MIB');
foreach ($enterasys_mem as $index => $mem_data) {
foreach ($mem_data['ram'] as $mem_id => $ram) {
Expand Down

0 comments on commit 668982c

Please sign in to comment.