Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Zmtel greenpacket devices (os: zmtel) #10067

Merged
merged 6 commits into from Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added html/images/os/greenpacket.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 96 additions & 0 deletions includes/definitions/discovery/zmtel.yaml
@@ -0,0 +1,96 @@
mib: ZMTEL-ODU-MIB
modules:
sensors:
snr:
data:
-
oid: sinr
num_oid: '.1.3.6.1.4.1.38595.10.3.15.{{ $index }}'
descr: Signal to Interference
index: 'sinr.{{ $index }}'
-
oid: cinr0
num_oid: '.1.3.6.1.4.1.38595.10.3.16.{{ $index }}'
descr: Carrier to Interference 0
index: 'cinr0.{{ $index }}'
-
oid: cinr1
num_oid: '.1.3.6.1.4.1.38595.10.3.17.{{ $index }}'
descr: Carrier to Interference 1
index: 'cinr1.{{ $index }}'
frequency:
data:
-
oid: dlFrequency
num_oid: '.1.3.6.1.4.1.38595.10.3.8.{{ $index }}'
descr: Download
index: 'dlFrequency.{{ $index }}'
-
oid: ulFrequency
num_oid: '.1.3.6.1.4.1.38595.10.3.9.{{ $index }}'
descr: Upload
index: 'ulFrequency.{{ $index }}'
-
oid: bandwidth
num_oid: '.1.3.6.1.4.1.38595.10.3.10.{{ $index }}'
descr: Bandwidth
index: 'bandwidth.{{ $index }}'
dbm:
data:
-
oid: rsrp0
num_oid: '.1.3.6.1.4.1.38595.10.3.11.{{ $index }}'
descr: RSRP0
index: 'rsrp0.{{ $index }}'
group: Reference Signal Received Power
-
oid: rsrp1
num_oid: '.1.3.6.1.4.1.38595.10.3.12.{{ $index }}'
descr: RSRP1
index: 'rsrp1.{{ $index }}'
group: Reference Signal Received Power
-
oid: rsrq
num_oid: '.1.3.6.1.4.1.38595.10.3.13.{{ $index }}'
descr: Reference Signal Received Quality
index: 'rsrq.{{ $index }}'
-
oid: rssi
num_oid: '.1.3.6.1.4.1.38595.10.3.14.{{ $index }}'
descr: Received Signal Strength Indicator
index: 'rssi.{{ $index }}'
-
oid: txPower
num_oid: '.1.3.6.1.4.1.38595.10.3.18.{{ $index }}'
descr: Tx Power
index: 'txPower.{{ $index }}'
state:
data:
-
oid: wanMode
num_oid: '.1.3.6.1.4.1.38595.10.4.1.{{ $index }}'
index: 'wanMode.{{ $index }}'
descr: WAN Mode
state_name: wanMode
states:
- { value: 0, descr: NAT, graph: 0, generic: 0 }
- { value: 1, descr: Router, graph: 0, generic: 0 }
- { value: 2, descr: Router, graph: 0, generic: 0 }
-
oid: wanType
num_oid: '.1.3.6.1.4.1.38595.10.4.2.{{ $index }}'
index: 'wanType.{{ $index }}'
descr: WAN type
state_name: wanType
states:
- { value: 0, descr: DHCP, graph: 0, generic: 0 }
- { value: 1, descr: Static, graph: 0, generic: 0 }
-
oid: firewall
num_oid: '.1.3.6.1.4.1.38595.10.2.9.{{ $index }}'
index: 'firewall.{{ $index }}'
descr: Firewall Status
state_name: firewall
states:
- { value: 0, descr: disabled, graph: 0, generic: 2 }
- { value: 1, descr: enabled, graph: 0, generic: 0 }
9 changes: 9 additions & 0 deletions includes/definitions/zmtel.yaml
@@ -0,0 +1,9 @@
os: zmtel
text: 'Zmtel Greenpacket'
icon: greenpacket
type: network
mib_dir:
- zmtel
discovery:
- sysObjectID:
- .1.3.6.1.4.1.38595.10
18 changes: 18 additions & 0 deletions includes/polling/os/zmtel.inc.php
@@ -0,0 +1,18 @@
<?php

$temp_data = snmpwalk_cache_oid($device, 'deviceInfo', [], 'ZMTEL-ODU-MIB', 'zmtel');
spencerbutler marked this conversation as resolved.
Show resolved Hide resolved

foreach ($temp_data as $data) {
$oids = 'dlMCS ulMCS eNBID pCID';
$oid_data = array_keys(snmp_getnext_multi($device, $oids, '-OUvq', 'ZMTEL-ODU-MIB'));
$dlmcs = $oid_data[0];
$ulmcs = $oid_data[1];
$enbid = $oid_data[2];
$pcid = $oid_data[3];

$version = $data['softwareVersion'];
$hardware = $data['modelName'] . ' ' . $data['hardwareVersion'];
$serial = $data['SN'];
$features = 'eNodeB: ' . $enbid . ' Physical Cell: ' . $pcid . ' DL Modulation: ' . $dlmcs . ' UL Modulation: ' . $ulmcs . ' bootROM: ' . $data['bootROM'] . ' LTE Band: ' . $data['lteBand'];
}
unset($temp_data);