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
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

Added support for Zmtel greenpacket devices (os: zmtel)

  • Loading branch information...
spencerbutler committed Apr 4, 2019
commit 57bec7524471b90516ade767d139662142910879
Binary file not shown.
@@ -0,0 +1,75 @@
mib: ZMTEL-ODU-MIB
modules:
sensors:
frequency:
data:
-
oid: dlFrequency
num_oid: '.1.3.6.1.4.1.38595.10.3.8.{{ $index }}'
descr: Download
index: 'dlFrequency.{{ $index }}'
multiplier: 1000
-
oid: ulFrequency
num_oid: '.1.3.6.1.4.1.38595.10.3.9.{{ $index }}'
descr: Upload
index: 'ulFrequency.{{ $index }}'
multiplier: 1000
-
oid: bandwidth
num_oid: '.1.3.6.1.4.1.38595.10.3.10.{{ $index }}'
descr: Bandwidth
index: 'bandwidth.{{ $index }}'
multiplier: 1000
dbm:
data:
-
oid: rsrp0
num_oid: '.1.3.6.1.4.1.38595.10.3.11.{{ $index }}'
descr: RSRP0
index: 'rsrp0.{{ $index }}'
-
oid: rsrp1
num_oid: '.1.3.6.1.4.1.38595.10.3.12.{{ $index }}'
descr: RSRP1
index: 'rsrp1.{{ $index }}'
-
oid: rssi
num_oid: '.1.3.6.1.4.1.38595.10.3.14.{{ $index }}'
descr: RSSI
index: 'rssi.{{ $index }}'
-
oid: txPower
num_oid: '.1.3.6.1.4.1.38595.10.3.18.{{ $index }}'
descr: Tx Power
index: 'rssi.{{ $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 }
@@ -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
@@ -0,0 +1,11 @@
<?php
$temp_data = snmpwalk_cache_oid($device, 'deviceInfo', [], 'ZMTEL-ODU-MIB', 'zmtel');
This conversation was marked as resolved by spencerbutler

This comment has been minimized.

Copy link
@laf

laf Apr 9, 2019

Member

Can you not just do a multi get here for the 4 values you need rather than working additional data?

This comment has been minimized.

Copy link
@spencerbutler

spencerbutler Apr 9, 2019

Author Contributor

fixed

foreach ($temp_data as $data) {
$version = $data['softwareVersion'];
$hardware = $data['modelName'] . ' ' . $data['hardwareVersion'];
$serial = $data['SN'];
$features = 'bootROM ' . $data['bootROM'] . 'LTE Band ' . $data['lteBand'];
}
unset($temp_data);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.