mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Bats support (#14108)
* BATS support * Removed disabled discovery modules * Style change, more test data, removed unused rows * Style correction LibreNMS/OS/Bats.php * Removed old reference * Another style correction add LibreNMS/OS/Bats.php * Changed location info and temperature * Style, again * Style, again * New testdata needed * Fix wrong state color in discovery/bats.yaml * New test data * Update bats_bats.json * Saved the test data in a different way * More test data * Manually changed test data * New test data * New test data * Update bats_bats.json * Saved the test data in a different way * More test data * Manually changed test data * New test data * New test data * Delete bats_bats.snmprec * Update bats.json * Update bats.json Co-authored-by: Maikel de Boer <mdb@tampnet.com> Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
parent
e8bcbfd944
commit
7b3a6250f0
69
LibreNMS/OS/Bats.php
Normal file
69
LibreNMS/OS/Bats.php
Normal file
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* Bats.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.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link https://www.librenms.org
|
||||
*
|
||||
* @copyright 2017 Tony Murray
|
||||
* @author Tony Murray <murraytony@gmail.com>
|
||||
*/
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use App\Models\Location;
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Discovery\OSDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessSnrDiscovery;
|
||||
use LibreNMS\OS;
|
||||
|
||||
class Bats extends OS implements
|
||||
OSDiscovery,
|
||||
WirelessSnrDiscovery,
|
||||
WirelessRssiDiscovery
|
||||
{
|
||||
public function fetchLocation(): Location
|
||||
{
|
||||
$location = parent::fetchLocation();
|
||||
$lat = snmp_get($this->getDeviceArray(), 'AATS-MIB::networkGPSLatitudeFloat.0', '-Oqv');
|
||||
$lng = snmp_get($this->getDeviceArray(), 'AATS-MIB::networkGPSLongitudeFloat.0', '-Oqv');
|
||||
$pointing = snmp_get($this->getDeviceArray(), 'AATS-MIB::status.0', '-Oqv');
|
||||
|
||||
return new Location([
|
||||
'location' => 'At ' . (string) $lat . ', ' . (string) $lng . '. ' . $pointing,
|
||||
'lat' => $lat,
|
||||
'lng' => $lng,
|
||||
]);
|
||||
}
|
||||
|
||||
public function discoverWirelessSnr()
|
||||
{
|
||||
$oid = '.1.3.6.1.4.1.37069.1.2.5.3.0';
|
||||
|
||||
return [
|
||||
new WirelessSensor('snr', $this->getDeviceId(), $oid, 'bats', 0, 'SNR'),
|
||||
];
|
||||
}
|
||||
|
||||
public function discoverWirelessRssi()
|
||||
{
|
||||
$oid = '.1.3.6.1.4.1.37069.1.2.4.3.0';
|
||||
|
||||
return [
|
||||
new WirelessSensor('rssi', $this->getDeviceId(), $oid, 'bats', 0, 'RSSI'),
|
||||
];
|
||||
}
|
||||
}
|
BIN
html/images/logos/bats.png
Normal file
BIN
html/images/logos/bats.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.3 KiB |
BIN
html/images/os/bats.png
Normal file
BIN
html/images/os/bats.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 667 B |
11
includes/definitions/bats.yaml
Normal file
11
includes/definitions/bats.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
os: bats
|
||||
text: 'BATS AATS'
|
||||
type: wireless
|
||||
icon: bats
|
||||
over:
|
||||
- { graph: device_ping_perf, text: 'Ping Times' }
|
||||
discovery:
|
||||
-
|
||||
sysObjectID:
|
||||
- .1.3.6.1.4.1.37069
|
||||
mib_dir: bats
|
155
includes/definitions/discovery/bats.yaml
Normal file
155
includes/definitions/discovery/bats.yaml
Normal file
@ -0,0 +1,155 @@
|
||||
mib: AATS-MIB
|
||||
modules:
|
||||
sensors:
|
||||
temperature:
|
||||
data:
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: cpuTemp
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.1.4.{{ $index }}'
|
||||
descr: 'System CPU'
|
||||
index: 'cpuTemp.{{ $index }}'
|
||||
count:
|
||||
options:
|
||||
skip_value_lt: 0
|
||||
data:
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: status
|
||||
group: Positioner
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.1.1.{{ $index }}'
|
||||
descr: 'Link distance (km)'
|
||||
index: 'status.{{ $index }}'
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: currentHeading360ScaleFloat
|
||||
group: 'Currently used GPS / Heading'
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.4.7.2.5.{{ $index }}'
|
||||
descr: 'GPS Heading'
|
||||
index: 'currentHeading360ScaleFloat.{{ $index }}'
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: currentHeading360ScaleInt
|
||||
group: 'Currently used GPS / Heading'
|
||||
divisor: 100
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.4.7.2.4.{{ $index }}'
|
||||
descr: 'GPS Heading / 100'
|
||||
index: 'currentHeading360ScaleInt.{{ $index }}'
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: azimuth360ScaleFloat
|
||||
group: Positioner
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.3.1.3.5.{{ $index }}'
|
||||
descr: 'Azimuth'
|
||||
index: 'azimuth360ScaleFloat.{{ $index }}'
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: antennaHeading360ScaleFloat
|
||||
group: Positioner
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.3.1.5.5.{{ $index }}'
|
||||
descr: 'Antenna heading'
|
||||
index: 'antennaHeading360ScaleFloat.{{ $index }}'
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: currentGPSAltitudeFloat
|
||||
group: 'Currently used GPS / Heading'
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.4.6.3.{{ $index }}'
|
||||
descr: 'GPS height (m)'
|
||||
index: 'currentGPSAltitudeFloat.{{ $index }}'
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: currentPitchFloat
|
||||
group: 'Currently used GPS / Heading'
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.4.8.1.3.{{ $index }}'
|
||||
descr: 'Pitch'
|
||||
index: 'currentPitchFloat.{{ $index }}'
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: currentRollFloat
|
||||
group: 'Currently used GPS / Heading'
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.4.8.2.3.{{ $index }}'
|
||||
descr: 'Roll'
|
||||
index: 'currentRollFloat.{{ $index }}'
|
||||
state:
|
||||
data:
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: linkStatusInt
|
||||
group: Radio
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.2.3.2.{{ $index }}'
|
||||
descr: 'Link status'
|
||||
index: 'linkStatusInt.{{ $index }}'
|
||||
state_name: linkStatus
|
||||
states:
|
||||
- { value: 0, generic: 2, graph: 0, descr: Disconnected }
|
||||
- { value: 1, generic: 1, graph: 0, descr: Marginal }
|
||||
- { value: 2, generic: 0, graph: 0, descr: Connected }
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: currentGPSStatusInt
|
||||
group: 'Currently used GPS / Heading'
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.4.2.2.{{ $index }}'
|
||||
descr: 'Overall GPS status'
|
||||
index: 'currentGPSStatusInt.{{ $index }}'
|
||||
state_name: GPSLinkStatus
|
||||
states:
|
||||
- { value: 0, generic: 2, graph: 0, descr: Invalid }
|
||||
- { value: 1, generic: 0, graph: 0, descr: Valid }
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: localGPSStatusInt
|
||||
group: 'Local GPS'
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.5.2.2.{{ $index }}'
|
||||
descr: 'Local GPS status'
|
||||
index: 'localGPSStatusInt.{{ $index }}'
|
||||
state_name: LocalGPSLinkStatus
|
||||
states:
|
||||
- { value: 0, generic: 2, graph: 0, descr: Invalid }
|
||||
- { value: 1, generic: 0, graph: 0, descr: Valid }
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: networkGPSStatusInt
|
||||
group: 'Network GPS'
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.6.2.2.{{ $index }}'
|
||||
descr: 'Network GPS status'
|
||||
index: 'networkGPSStatusInt.{{ $index }}'
|
||||
state_name: NetworkGPSLinkStatus
|
||||
states:
|
||||
- { value: 0, generic: 2, graph: 0, descr: Invalid }
|
||||
- { value: 1, generic: 0, graph: 0, descr: Valid }
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: positionerConnected
|
||||
group: Positioner
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.3.1.1.{{ $index }}'
|
||||
descr: 'Positioner Connection'
|
||||
index: 'positionerConnected.{{ $index }}'
|
||||
state_name: PositionerConnection
|
||||
states:
|
||||
- { value: 0, generic: 2, graph: 0, descr: Disconnected }
|
||||
- { value: 1, generic: 0, graph: 0, descr: Connected }
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: positionerMoving
|
||||
group: Positioner
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.3.1.2.{{ $index }}'
|
||||
descr: 'Positioner Movement'
|
||||
index: 'positionerMoving.{{ $index }}'
|
||||
state_name: PositionerMovement
|
||||
states:
|
||||
- { value: 0, generic: 0, graph: 0, descr: Stopped }
|
||||
- { value: 1, generic: 0, graph: 0, descr: Moving }
|
||||
-
|
||||
oid: aatsDot1
|
||||
value: currentHeadingStatusInt
|
||||
group: 'Currently used GPS / Heading'
|
||||
num_oid: '.1.3.6.1.4.1.37069.1.4.7.1.2.{{ $index }}'
|
||||
descr: 'Heading status'
|
||||
index: 'currentHeadingStatusInt.{{ $index }}'
|
||||
state_name: PositionerHeadingState
|
||||
states:
|
||||
- { value: 0, generic: 2, graph: 0, descr: Invalid }
|
||||
- { value: 1, generic: 0, graph: 0, descr: Valid }
|
||||
os:
|
||||
sysDescr_regex: '/ radio;(?<hardware>.*) v(?<version>[0-9.]*);.*;SN: (?<serial>[0-9]+);/'
|
||||
|
1298
mibs/bats/AATS-MIB
Normal file
1298
mibs/bats/AATS-MIB
Normal file
File diff suppressed because it is too large
Load Diff
615
tests/data/bats.json
Normal file
615
tests/data/bats.json
Normal file
@ -0,0 +1,615 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "<private>",
|
||||
"sysObjectID": ".1.3.6.1.4.1.37069",
|
||||
"sysDescr": "AATS",
|
||||
"sysContact": "<private>",
|
||||
"version": null,
|
||||
"hardware": null,
|
||||
"features": null,
|
||||
"os": "bats",
|
||||
"type": "wireless",
|
||||
"serial": null,
|
||||
"icon": "bats.png",
|
||||
"location": "At 57.0268, 1.9663. Scanning Target G17DAP ENB 01 (344.4 km)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
},
|
||||
"sensors": {
|
||||
"discovery": {
|
||||
"sensors": [
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "count",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.3.1.5.5.0",
|
||||
"sensor_index": "antennaHeading360ScaleFloat.0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "Antenna heading",
|
||||
"group": "Positioner",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 168.98,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "count",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.3.1.3.5.0",
|
||||
"sensor_index": "azimuth360ScaleFloat.0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "Azimuth",
|
||||
"group": "Positioner",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 354.4,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "count",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.4.6.3.0",
|
||||
"sensor_index": "currentGPSAltitudeFloat.0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "GPS height (m)",
|
||||
"group": "Currently used GPS / Heading",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 23.6,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "count",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.4.7.2.5.0",
|
||||
"sensor_index": "currentHeading360ScaleFloat.0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "GPS Heading",
|
||||
"group": "Currently used GPS / Heading",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 168.98,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "count",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.4.7.2.4.0",
|
||||
"sensor_index": "currentHeading360ScaleInt.0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "GPS Heading / 100",
|
||||
"group": "Currently used GPS / Heading",
|
||||
"sensor_divisor": 100,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 168.98,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "count",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.4.8.1.3.0",
|
||||
"sensor_index": "currentPitchFloat.0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "Pitch",
|
||||
"group": "Currently used GPS / Heading",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 3.67,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "count",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.4.8.2.3.0",
|
||||
"sensor_index": "currentRollFloat.0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "Roll",
|
||||
"group": "Currently used GPS / Heading",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 1.34,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "count",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.1.1.0",
|
||||
"sensor_index": "status.0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "Link distance (km)",
|
||||
"group": "Positioner",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 17,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "state",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.4.2.2.0",
|
||||
"sensor_index": "currentGPSStatusInt.0",
|
||||
"sensor_type": "GPSLinkStatus",
|
||||
"sensor_descr": "Overall GPS status",
|
||||
"group": "Currently used GPS / Heading",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 1,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": "GPSLinkStatus"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "state",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.2.3.2.0",
|
||||
"sensor_index": "linkStatusInt.0",
|
||||
"sensor_type": "linkStatus",
|
||||
"sensor_descr": "Link status",
|
||||
"group": "Radio",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 0,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": "linkStatus"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "state",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.5.2.2.0",
|
||||
"sensor_index": "localGPSStatusInt.0",
|
||||
"sensor_type": "LocalGPSLinkStatus",
|
||||
"sensor_descr": "Local GPS status",
|
||||
"group": "Local GPS",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 0,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": "LocalGPSLinkStatus"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "state",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.6.2.2.0",
|
||||
"sensor_index": "networkGPSStatusInt.0",
|
||||
"sensor_type": "NetworkGPSLinkStatus",
|
||||
"sensor_descr": "Network GPS status",
|
||||
"group": "Network GPS",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 1,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": "NetworkGPSLinkStatus"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "state",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.3.1.1.0",
|
||||
"sensor_index": "positionerConnected.0",
|
||||
"sensor_type": "PositionerConnection",
|
||||
"sensor_descr": "Positioner Connection",
|
||||
"group": "Positioner",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 1,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": "PositionerConnection"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "state",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.4.7.1.2.0",
|
||||
"sensor_index": "currentHeadingStatusInt.0",
|
||||
"sensor_type": "PositionerHeadingState",
|
||||
"sensor_descr": "Heading status",
|
||||
"group": "Currently used GPS / Heading",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 1,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": "PositionerHeadingState"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "state",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.3.1.2.0",
|
||||
"sensor_index": "positionerMoving.0",
|
||||
"sensor_type": "PositionerMovement",
|
||||
"sensor_descr": "Positioner Movement",
|
||||
"group": "Positioner",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 0,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": "PositionerMovement"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "temperature",
|
||||
"poller_type": "snmp",
|
||||
"sensor_oid": ".1.3.6.1.4.1.37069.1.1.4.0",
|
||||
"sensor_index": "cpuTemp.0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "System CPU",
|
||||
"group": null,
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_current": 22,
|
||||
"sensor_limit": 42,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": 12,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_prev": null,
|
||||
"user_func": null,
|
||||
"state_name": null
|
||||
}
|
||||
],
|
||||
"state_indexes": [
|
||||
{
|
||||
"state_name": "GPSLinkStatus",
|
||||
"state_descr": "Invalid",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 0,
|
||||
"state_generic_value": 2
|
||||
},
|
||||
{
|
||||
"state_name": "GPSLinkStatus",
|
||||
"state_descr": "Valid",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 1,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "linkStatus",
|
||||
"state_descr": "Disconnected",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 0,
|
||||
"state_generic_value": 2
|
||||
},
|
||||
{
|
||||
"state_name": "linkStatus",
|
||||
"state_descr": "Marginal",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 1,
|
||||
"state_generic_value": 1
|
||||
},
|
||||
{
|
||||
"state_name": "linkStatus",
|
||||
"state_descr": "Connected",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 2,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "LocalGPSLinkStatus",
|
||||
"state_descr": "Invalid",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 0,
|
||||
"state_generic_value": 2
|
||||
},
|
||||
{
|
||||
"state_name": "LocalGPSLinkStatus",
|
||||
"state_descr": "Valid",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 1,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "NetworkGPSLinkStatus",
|
||||
"state_descr": "Invalid",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 0,
|
||||
"state_generic_value": 2
|
||||
},
|
||||
{
|
||||
"state_name": "NetworkGPSLinkStatus",
|
||||
"state_descr": "Valid",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 1,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "PositionerConnection",
|
||||
"state_descr": "Disconnected",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 0,
|
||||
"state_generic_value": 2
|
||||
},
|
||||
{
|
||||
"state_name": "PositionerConnection",
|
||||
"state_descr": "Connected",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 1,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "PositionerHeadingState",
|
||||
"state_descr": "Invalid",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 0,
|
||||
"state_generic_value": 2
|
||||
},
|
||||
{
|
||||
"state_name": "PositionerHeadingState",
|
||||
"state_descr": "Valid",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 1,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "PositionerMovement",
|
||||
"state_descr": "Stopped",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 0,
|
||||
"state_generic_value": 0
|
||||
},
|
||||
{
|
||||
"state_name": "PositionerMovement",
|
||||
"state_descr": "Moving",
|
||||
"state_draw_graph": 0,
|
||||
"state_value": 1,
|
||||
"state_generic_value": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": "matches discovery"
|
||||
},
|
||||
"wireless": {
|
||||
"discovery": {
|
||||
"wireless_sensors": [
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "snr",
|
||||
"sensor_index": "0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "SNR",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_aggregator": "sum",
|
||||
"sensor_current": -130,
|
||||
"sensor_prev": null,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_oids": "[\".1.3.6.1.4.1.37069.1.2.5.3.0\"]"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "rssi",
|
||||
"sensor_index": "0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "RSSI",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_aggregator": "sum",
|
||||
"sensor_current": -160,
|
||||
"sensor_prev": null,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_oids": "[\".1.3.6.1.4.1.37069.1.2.4.3.0\"]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": {
|
||||
"wireless_sensors": [
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "snr",
|
||||
"sensor_index": "0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "SNR",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_aggregator": "sum",
|
||||
"sensor_current": -130,
|
||||
"sensor_prev": -130,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_oids": "[\".1.3.6.1.4.1.37069.1.2.5.3.0\"]"
|
||||
},
|
||||
{
|
||||
"sensor_deleted": 0,
|
||||
"sensor_class": "rssi",
|
||||
"sensor_index": "0",
|
||||
"sensor_type": "bats",
|
||||
"sensor_descr": "RSSI",
|
||||
"sensor_divisor": 1,
|
||||
"sensor_multiplier": 1,
|
||||
"sensor_aggregator": "sum",
|
||||
"sensor_current": -160,
|
||||
"sensor_prev": -160,
|
||||
"sensor_limit": null,
|
||||
"sensor_limit_warn": null,
|
||||
"sensor_limit_low": null,
|
||||
"sensor_limit_low_warn": null,
|
||||
"sensor_alert": 1,
|
||||
"sensor_custom": "No",
|
||||
"entPhysicalIndex": null,
|
||||
"entPhysicalIndex_measured": null,
|
||||
"sensor_oids": "[\".1.3.6.1.4.1.37069.1.2.4.3.0\"]"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
98
tests/snmpsim/bats.snmprec
Normal file
98
tests/snmpsim/bats.snmprec
Normal file
@ -0,0 +1,98 @@
|
||||
1.3.6.1.2.1.1.1.0|4|AATS
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.37069
|
||||
1.3.6.1.2.1.1.3.0|67|16889633
|
||||
1.3.6.1.2.1.1.4.0|4|<private>
|
||||
1.3.6.1.2.1.1.5.0|4|<private>
|
||||
1.3.6.1.2.1.1.6.0|4|<private>
|
||||
1.3.6.1.2.1.2.2.1.6.3|4x|A887921001D9
|
||||
1.3.6.1.2.1.4.3.0|65|15037551
|
||||
1.3.6.1.2.1.4.4.0|65|0
|
||||
1.3.6.1.2.1.4.5.0|65|0
|
||||
1.3.6.1.2.1.4.6.0|65|0
|
||||
1.3.6.1.2.1.4.7.0|65|0
|
||||
1.3.6.1.2.1.4.8.0|65|0
|
||||
1.3.6.1.2.1.4.9.0|65|15037551
|
||||
1.3.6.1.2.1.4.10.0|65|15020667
|
||||
1.3.6.1.2.1.4.11.0|65|80
|
||||
1.3.6.1.2.1.4.12.0|65|0
|
||||
1.3.6.1.2.1.4.14.0|65|0
|
||||
1.3.6.1.2.1.4.15.0|65|0
|
||||
1.3.6.1.2.1.4.16.0|65|0
|
||||
1.3.6.1.2.1.4.17.0|65|0
|
||||
1.3.6.1.2.1.4.18.0|65|0
|
||||
1.3.6.1.2.1.4.19.0|65|0
|
||||
1.3.6.1.2.1.4.20.1.2.10.6.63.65|2|3
|
||||
1.3.6.1.2.1.4.20.1.2.127.0.0.1|2|1
|
||||
1.3.6.1.2.1.4.20.1.3.10.6.63.65|64|255.255.255.248
|
||||
1.3.6.1.2.1.4.20.1.3.127.0.0.1|64|255.0.0.0
|
||||
1.3.6.1.2.1.4.22.1.2.3.10.6.63.67|4x|0090E89C77BF
|
||||
1.3.6.1.2.1.4.22.1.2.3.10.6.63.68|4x|643AEA424C00
|
||||
1.3.6.1.2.1.4.22.1.2.3.10.6.63.69|4x|0CA40293664E
|
||||
1.3.6.1.2.1.4.31.1.1.3.1|65|15038039
|
||||
1.3.6.1.2.1.4.31.1.1.4.1|70|15038039
|
||||
1.3.6.1.2.1.4.31.1.1.5.1|65|898818468
|
||||
1.3.6.1.2.1.4.31.1.1.6.1|70|898818468
|
||||
1.3.6.1.2.1.4.31.1.1.7.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.8.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.9.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.10.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.11.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.12.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.13.1|70|0
|
||||
1.3.6.1.2.1.4.31.1.1.14.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.15.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.16.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.17.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.18.1|65|15038039
|
||||
1.3.6.1.2.1.4.31.1.1.19.1|70|15038039
|
||||
1.3.6.1.2.1.4.31.1.1.20.1|65|15021155
|
||||
1.3.6.1.2.1.4.31.1.1.21.1|70|15021155
|
||||
1.3.6.1.2.1.4.31.1.1.22.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.23.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.24.1|70|0
|
||||
1.3.6.1.2.1.4.31.1.1.25.1|65|80
|
||||
1.3.6.1.2.1.4.31.1.1.26.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.27.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.28.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.29.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.30.1|65|15021075
|
||||
1.3.6.1.2.1.4.31.1.1.31.1|70|15021075
|
||||
1.3.6.1.2.1.4.31.1.1.32.1|65|836686742
|
||||
1.3.6.1.2.1.4.31.1.1.33.1|70|836686742
|
||||
1.3.6.1.2.1.4.31.1.1.34.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.35.1|70|0
|
||||
1.3.6.1.2.1.4.31.1.1.36.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.37.1|70|0
|
||||
1.3.6.1.2.1.4.31.1.1.38.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.39.1|70|0
|
||||
1.3.6.1.2.1.4.31.1.1.40.1|65|0
|
||||
1.3.6.1.2.1.4.31.1.1.41.1|70|0
|
||||
1.3.6.1.2.1.4.31.1.1.42.1|65|33664
|
||||
1.3.6.1.2.1.4.31.1.1.43.1|70|33664
|
||||
1.3.6.1.2.1.4.31.1.1.44.1|65|16841
|
||||
1.3.6.1.2.1.4.31.1.1.45.1|70|16841
|
||||
1.3.6.1.2.1.4.31.1.1.46.1|67|0
|
||||
1.3.6.1.2.1.4.31.1.1.47.1|66|60000
|
||||
1.3.6.1.2.1.4.35.1.4.3.1.4.10.6.63.67|4x|0090E89C77BF
|
||||
1.3.6.1.2.1.4.35.1.4.3.1.4.10.6.63.68|4x|643AEA424C00
|
||||
1.3.6.1.2.1.4.35.1.4.3.1.4.10.6.63.69|4x|0CA40293664E
|
||||
1.3.6.1.4.1.37069.1.1.1.0|4|Scanning Target G17DAP ENB 01 (344.4 km)
|
||||
1.3.6.1.4.1.37069.1.1.4.0|2|22
|
||||
1.3.6.1.4.1.37069.1.2.3.2.0|2|0
|
||||
1.3.6.1.4.1.37069.1.2.4.3.0|4|-160.00
|
||||
1.3.6.1.4.1.37069.1.2.5.3.0|4|-130.00
|
||||
1.3.6.1.4.1.37069.1.3.1.1.0|2|1
|
||||
1.3.6.1.4.1.37069.1.3.1.2.0|2|0
|
||||
1.3.6.1.4.1.37069.1.3.1.3.5.0|4|354.40
|
||||
1.3.6.1.4.1.37069.1.3.1.5.5.0|4|168.98
|
||||
1.3.6.1.4.1.37069.1.4.2.2.0|2|1
|
||||
1.3.6.1.4.1.37069.1.4.6.3.0|4|23.60
|
||||
1.3.6.1.4.1.37069.1.4.7.1.2.0|2|1
|
||||
1.3.6.1.4.1.37069.1.4.7.2.4.0|2|16898
|
||||
1.3.6.1.4.1.37069.1.4.7.2.5.0|4|168.98
|
||||
1.3.6.1.4.1.37069.1.4.8.1.3.0|4|3.67
|
||||
1.3.6.1.4.1.37069.1.4.8.2.3.0|4|1.34
|
||||
1.3.6.1.4.1.37069.1.5.2.2.0|2|0
|
||||
1.3.6.1.4.1.37069.1.6.2.2.0|2|1
|
||||
1.3.6.1.4.1.37069.1.6.4.3.0|4|57.0268
|
||||
1.3.6.1.4.1.37069.1.6.5.3.0|4|1.9663
|
Loading…
Reference in New Issue
Block a user