diff --git a/LibreNMS/OS/Ciscosat.php b/LibreNMS/OS/Ciscosat.php new file mode 100644 index 0000000000..11978d4d9c --- /dev/null +++ b/LibreNMS/OS/Ciscosat.php @@ -0,0 +1,78 @@ +getDevice(), 'satSignalUncorErrCnt', array(), 'CISCO-DMN-DSG-TUNING-MIB', null, '-Ob'); + $sensors = array(); + foreach ($oids as $index => $entry) { + $sensors[] = new WirelessSensor( + 'errors', + $this->getDeviceId(), + '.1.3.6.1.4.1.1429.2.2.5.5.3.1.1.12.' . $index, + 'ciscosat', + $index, + 'Uncorrected Errors ' . $index + ); + } + return $sensors; + } + + public function discoverWirelessRssi() + { + $oids = snmpwalk_cache_oid($this->getDevice(), 'satSignalLevel', array(), 'CISCO-DMN-DSG-TUNING-MIB', null, '-Ob'); + $sensors = array(); + foreach ($oids as $index => $entry) { + $sensors[] = new WirelessSensor( + 'rssi', + $this->getDeviceId(), + '.1.3.6.1.4.1.1429.2.2.5.5.3.1.1.7.' . $index, + 'ciscosat', + $index, + 'Receive Signal Level ' .$index + ); + } + return $sensors; + } +// snr - Discover C/N Link Margin + + public function discoverWirelessSnr() + { + $cnmargin = snmpwalk_cache_oid($this->getDevice(), 'satSignalCnMargin', array(), 'CISCO-DMN-DSG-TUNING-MIB', null, '-OQUsb'); + $dbindex = 0; + foreach ($cnmargin as $index => $entry) { + $snrstatus[] = new WirelessSensor( + 'snr', + $this->getDeviceId(), + '.1.3.6.1.4.1.1429.2.2.5.5.3.1.1.6.' . $index, + 'ciscosat', + ++$dbindex, + 'C/N Link Margin ' .$index, + $entry + ); + } +// snr - Discover C/N Ratio + $cnratio = snmpwalk_cache_oid($this->getDevice(), 'satSignalCndisp', array(), 'CISCO-DMN-DSG-TUNING-MIB', null, '-OQUsb'); + foreach ($cnratio as $index => $entry) { + array_push($snrstatus, new WirelessSensor( + 'snr', + $this->getDeviceId(), + '.1.3.6.1.4.1.1429.2.2.5.5.3.1.1.5.' . $index, + 'ciscosat', + ++$dbindex, + 'C/N Ratio ' .$index, + $entry + ) + ); + } + return $snrstatus; + } +} diff --git a/includes/definitions/ciscosat.yaml b/includes/definitions/ciscosat.yaml new file mode 100644 index 0000000000..0770fabc09 --- /dev/null +++ b/includes/definitions/ciscosat.yaml @@ -0,0 +1,12 @@ +os: ciscosat +text: 'Cisco Satellite Receiver' +type: network +icon: cisco +mib_dir: + - cisco +over: + - { graph: device_bits, text: Traffic } + - { graph: device_wireless_rssi, text: Sat Signal Level } +discovery: + - + sysObjectID: .1.3.6.1.4.1.1429.2.2.6.5 diff --git a/includes/definitions/discovery/ciscosat.yaml b/includes/definitions/discovery/ciscosat.yaml new file mode 100644 index 0000000000..c4d065bb41 --- /dev/null +++ b/includes/definitions/discovery/ciscosat.yaml @@ -0,0 +1,30 @@ +mib: CISCO-DMN-DSG-TUNING-MIB:CISCO-DMN-DSG-DIAG-MIB +modules: + sensors: + state: + data: + - + oid: inputStatusTable + value: inputStatusSatLock + num_oid: '.1.3.6.1.4.1.1429.2.2.5.5.3.2.1.3.{{ $index }}' + descr: 'Sat Lock {{ $index }}' + index: 'inputStatusSatLock.{{ $index }}' + snmp_flags: '-OQUsbe' + state_name: inputStatusSatLock + states: + - { value: -1, generic: 3, graph: 0, descr: 'null' } + - { value: 1, generic: 2, graph: 1, descr: 'No Lock' } + - { value: 2, generic: 1, graph: 1, descr: 'Lock - Signal' } + - { value: 3, generic: 0, graph: 1, descr: 'Lock + Signal' } + fanspeed: + options: + # Some Models such as D9854 do not report fanspeed, but respond to OID with 0. + skip_values: 0 + data: + - + oid: diagFanRPMTable + value: diagFanRPMValue + num_oid: '.1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.{{ $index }}' + descr: 'Fan Speed {{ $index }}' + index: 'diagFanRPMValue.{{ $index }}' + snmp_flags: '-OQUsbe' diff --git a/includes/polling/os/ciscosat.inc.php b/includes/polling/os/ciscosat.inc.php new file mode 100644 index 0000000000..9201c0ddac --- /dev/null +++ b/includes/polling/os/ciscosat.inc.php @@ -0,0 +1,5 @@ +", + "sysObjectID": ".1.3.6.1.4.1.1429.2.2.6.5", + "sysDescr": "D9854 APR", + "sysContact": null, + "version": null, + "hardware": null, + "features": null, + "os": "ciscosat", + "type": "network", + "serial": null, + "icon": "cisco.svg", + "location": null + } + ] + }, + "poller": { + "devices": [ + { + "sysName": "", + "sysObjectID": ".1.3.6.1.4.1.1429.2.2.6.5", + "sysDescr": "D9854 APR", + "sysContact": "", + "version": "1.50(1.11)", + "hardware": "D9859", + "features": null, + "os": "ciscosat", + "type": "network", + "serial": "", + "icon": "cisco.svg", + "location": "" + } + ] + } + }, + "sensors": { + "discovery": { + "sensors": [ + { + "sensor_deleted": 0, + "sensor_class": "fanspeed", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.1", + "sensor_index": "diagFanRPMValue.1", + "sensor_type": "ciscosat", + "sensor_descr": "Fan Speed 1", + "group": "", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 4920, + "sensor_limit": 8856, + "sensor_limit_warn": null, + "sensor_limit_low": 3936, + "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": "fanspeed", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.2", + "sensor_index": "diagFanRPMValue.2", + "sensor_type": "ciscosat", + "sensor_descr": "Fan Speed 2", + "group": "", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 4860, + "sensor_limit": 8748, + "sensor_limit_warn": null, + "sensor_limit_low": 3888, + "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": "fanspeed", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.3", + "sensor_index": "diagFanRPMValue.3", + "sensor_type": "ciscosat", + "sensor_descr": "Fan Speed 3", + "group": "", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 5100, + "sensor_limit": 9180, + "sensor_limit_warn": null, + "sensor_limit_low": 4080, + "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": "fanspeed", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.4", + "sensor_index": "diagFanRPMValue.4", + "sensor_type": "ciscosat", + "sensor_descr": "Fan Speed 4", + "group": "", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 4860, + "sensor_limit": 8748, + "sensor_limit_warn": null, + "sensor_limit_low": 3888, + "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": "fanspeed", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.5", + "sensor_index": "diagFanRPMValue.5", + "sensor_type": "ciscosat", + "sensor_descr": "Fan Speed 5", + "group": "", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 5100, + "sensor_limit": 9180, + "sensor_limit_warn": null, + "sensor_limit_low": 4080, + "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": "fanspeed", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.6", + "sensor_index": "diagFanRPMValue.6", + "sensor_type": "ciscosat", + "sensor_descr": "Fan Speed 6", + "group": "", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 4800, + "sensor_limit": 8640, + "sensor_limit_warn": null, + "sensor_limit_low": 3840, + "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": "fanspeed", + "poller_type": "snmp", + "sensor_oid": ".1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.7", + "sensor_index": "diagFanRPMValue.7", + "sensor_type": "ciscosat", + "sensor_descr": "Fan Speed 7", + "group": "", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 4980, + "sensor_limit": 8964, + "sensor_limit_warn": null, + "sensor_limit_low": 3984, + "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.1429.2.2.5.5.3.2.1.3.1", + "sensor_index": "inputStatusSatLock.1", + "sensor_type": "inputStatusSatLock", + "sensor_descr": "Sat Lock 1", + "group": "", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_current": 3, + "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": "inputStatusSatLock" + } + ], + "state_indexes": [ + { + "state_name": "inputStatusSatLock", + "state_descr": "null", + "state_draw_graph": 0, + "state_value": -1, + "state_generic_value": 3 + }, + { + "state_name": "inputStatusSatLock", + "state_descr": "No Lock", + "state_draw_graph": 1, + "state_value": 1, + "state_generic_value": 2 + }, + { + "state_name": "inputStatusSatLock", + "state_descr": "Lock - Signal", + "state_draw_graph": 1, + "state_value": 2, + "state_generic_value": 1 + }, + { + "state_name": "inputStatusSatLock", + "state_descr": "Lock + Signal", + "state_draw_graph": 1, + "state_value": 3, + "state_generic_value": 0 + } + ] + }, + "poller": "matches discovery" + }, + "wireless": { + "discovery": { + "wireless_sensors": [ + { + "sensor_deleted": 0, + "sensor_class": "snr", + "sensor_index": "1", + "sensor_type": "ciscosat", + "sensor_descr": "C/N Link Margin 1", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_aggregator": "sum", + "sensor_current": 1.6, + "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.1429.2.2.5.5.3.1.1.6.1\"]" + }, + { + "sensor_deleted": 0, + "sensor_class": "snr", + "sensor_index": "2", + "sensor_type": "ciscosat", + "sensor_descr": "C/N Ratio 1", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_aggregator": "sum", + "sensor_current": 10, + "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.1429.2.2.5.5.3.1.1.5.1\"]" + }, + { + "sensor_deleted": 0, + "sensor_class": "rssi", + "sensor_index": "1", + "sensor_type": "ciscosat", + "sensor_descr": "Receive Signal Level 1", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_aggregator": "sum", + "sensor_current": -40, + "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.1429.2.2.5.5.3.1.1.7.1\"]" + }, + { + "sensor_deleted": 0, + "sensor_class": "errors", + "sensor_index": "1", + "sensor_type": "ciscosat", + "sensor_descr": "Uncorrected Errors 1", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_aggregator": "sum", + "sensor_current": 42277, + "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.1429.2.2.5.5.3.1.1.12.1\"]" + } + ] + }, + "poller": { + "wireless_sensors": [ + { + "sensor_deleted": 0, + "sensor_class": "snr", + "sensor_index": "1", + "sensor_type": "ciscosat", + "sensor_descr": "C/N Link Margin 1", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_aggregator": "sum", + "sensor_current": 1.6, + "sensor_prev": 1.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_oids": "[\".1.3.6.1.4.1.1429.2.2.5.5.3.1.1.6.1\"]" + }, + { + "sensor_deleted": 0, + "sensor_class": "snr", + "sensor_index": "2", + "sensor_type": "ciscosat", + "sensor_descr": "C/N Ratio 1", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_aggregator": "sum", + "sensor_current": 10, + "sensor_prev": 10, + "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.1429.2.2.5.5.3.1.1.5.1\"]" + }, + { + "sensor_deleted": 0, + "sensor_class": "rssi", + "sensor_index": "1", + "sensor_type": "ciscosat", + "sensor_descr": "Receive Signal Level 1", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_aggregator": "sum", + "sensor_current": -40, + "sensor_prev": -40, + "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.1429.2.2.5.5.3.1.1.7.1\"]" + }, + { + "sensor_deleted": 0, + "sensor_class": "errors", + "sensor_index": "1", + "sensor_type": "ciscosat", + "sensor_descr": "Uncorrected Errors 1", + "sensor_divisor": 1, + "sensor_multiplier": 1, + "sensor_aggregator": "sum", + "sensor_current": 42277, + "sensor_prev": 42277, + "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.1429.2.2.5.5.3.1.1.12.1\"]" + } + ] + } + } +} diff --git a/tests/snmpsim/ciscosat.snmprec b/tests/snmpsim/ciscosat.snmprec new file mode 100644 index 0000000000..9ab18703d9 --- /dev/null +++ b/tests/snmpsim/ciscosat.snmprec @@ -0,0 +1,59 @@ +1.3.6.1.2.1.1.1.0|4|D9854 APR +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.1429.2.2.6.5 +1.3.6.1.2.1.1.3.0|67|1450484401 +1.3.6.1.2.1.1.4.0|4| +1.3.6.1.2.1.1.5.0|4| +1.3.6.1.2.1.1.6.0|4| +1.3.6.1.4.1.1429.2.2.5.1.1.1.0|4|1.50(1.11) +1.3.6.1.4.1.1429.2.2.5.1.1.4.0|4|D9859 +1.3.6.1.4.1.1429.2.2.5.1.1.5.0|4|361356018144 +1.3.6.1.4.1.1429.2.2.5.5.3.1.1.5.1|4|10.0 +1.3.6.1.4.1.1429.2.2.5.5.3.1.1.6.1|4|1.6 +1.3.6.1.4.1.1429.2.2.5.5.3.1.1.7.1|4|-40 +1.3.6.1.4.1.1429.2.2.5.5.3.1.1.12.1|4|42277 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.1.1|2|1 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.2.1|2|2 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.3.1|2|3 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.4.1|2|1 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.5.1|4|65.32624 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.6.1|4|AMC 11 Transponder 13 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.7.1|4|8404 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.8.1|4|401 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.9.1|2|2 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.10.1|2|2 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.11.1|2|1 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.12.1|2|3 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.13.1|2|1 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.14.1|4|NIT_TS_Change +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.15.1|4|RF1 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.16.1|4|Up +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.17.1|4|None +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.18.1|4|None +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.19.1|4|No +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.20.1|4|110 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.21.1|64|0.0.0.0 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.22.1|64|0.0.0.0 +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.23.1|4|Unk +1.3.6.1.4.1.1429.2.2.5.5.3.2.1.24.1|4|Unk +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.1.1|2|1 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.1.2|2|2 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.1.3|2|3 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.1.4|2|4 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.1.5|2|5 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.1.6|2|6 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.1.7|2|7 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.2.1|4|FAN1 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.2.2|4|FAN2 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.2.3|4|FAN3 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.2.4|4|FAN4 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.2.5|4|FAN5 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.2.6|4|FAN6 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.2.7|4|FAN7 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.1|4|4920 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.2|4|4860 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.3|4|5100 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.4|4|4860 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.5|4|5100 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.6|4|4800 +1.3.6.1.4.1.1429.2.2.5.18.2.2.1.3.7|4|4980 +1.3.6.1.4.1.1429.2.2.5.42.2.1.1.6.1|4|