diff --git a/html/images/os/2n.svg b/html/images/os/2n.svg new file mode 100644 index 000000000000..61e836a5b69e --- /dev/null +++ b/html/images/os/2n.svg @@ -0,0 +1,16 @@ + + + + + + + diff --git a/includes/definitions/heliosip.yaml b/includes/definitions/heliosip.yaml new file mode 100644 index 000000000000..f6b7ae95b53b --- /dev/null +++ b/includes/definitions/heliosip.yaml @@ -0,0 +1,11 @@ +os: heliosip +text: 'Helios IP' +type: appliance +icon: 2n +over: + - { graph: device_uptime, text: 'Device Uptime' } +mib_dir: + - 2n +discovery: + - sysObjectID: + - .1.3.6.1.4.1.6530 diff --git a/includes/polling/os/heliosip.inc.php b/includes/polling/os/heliosip.inc.php new file mode 100644 index 000000000000..3cc685a89dd1 --- /dev/null +++ b/includes/polling/os/heliosip.inc.php @@ -0,0 +1,29 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2018 Ryan Finney + * @author https://github.com/theherodied/ + */ +// SNMPv2-SMI::enterprises.6530.11.1.0 = STRING: "2N IP Force" +// SNMPv2-SMI::enterprises.6530.11.4.0 = STRING: "2.22.0.31.8" +// SNMPv2-SMI::enterprises.6530.11.3.0 = STRING: "54-0880-2424" +$data = snmp_get_multi_oid($device, '.1.3.6.1.4.1.6530.11.1.0 .1.3.6.1.4.1.6530.11.3.0 .1.3.6.1.4.1.6530.11.4.0', '-OUQn'); +$hardware = isset($data['.1.3.6.1.4.1.6530.11.1.0']) ? $data['.1.3.6.1.4.1.6530.11.1.0'] : ''; +$version = isset($data['.1.3.6.1.4.1.6530.11.4.0']) ? $data['.1.3.6.1.4.1.6530.11.4.0'] : ''; +$serial = isset($data['.1.3.6.1.4.1.6530.11.3.0']) ? $data['.1.3.6.1.4.1.6530.11.3.0'] : ''; diff --git a/mibs/2n/TEL2N-MIB b/mibs/2n/TEL2N-MIB new file mode 100644 index 000000000000..8026cebbd0d6 --- /dev/null +++ b/mibs/2n/TEL2N-MIB @@ -0,0 +1,142 @@ + +TEL2N-MIB DEFINITIONS ::= BEGIN + +IMPORTS + OBJECT-TYPE, MODULE-IDENTITY, enterprises, + Integer32, TimeTicks, IpAddress + FROM SNMPv2-SMI; + +tel2n MODULE-IDENTITY + LAST-UPDATED "201505011057Z" + ORGANIZATION + "2N TELEKOMUNIKACE a.s." + CONTACT-INFO + "Modranska 621, 143 01 Praha 4" + DESCRIPTION + "telecommunication company" + + REVISION "201505011057Z" + DESCRIPTION + "Initial version." +::= { enterprises 6530 } + + +-- Helios IP intercoms + +heliosip OBJECT IDENTIFIER ::= { tel2n 11 } + +hipProductName OBJECT-TYPE + SYNTAX OCTET STRING + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of product" + ::= { heliosip 1 } + +hipHwVersion OBJECT-TYPE + SYNTAX OCTET STRING + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Hardware version" + ::= { heliosip 2 } + +hipSerial OBJECT-TYPE + SYNTAX OCTET STRING (SIZE(14)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Unique serial number" + ::= { heliosip 3 } + +hipVersion OBJECT-TYPE + SYNTAX OCTET STRING (SIZE(16)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Firmware version number" + ::= { heliosip 4 } + +hipBootVersion OBJECT-TYPE + SYNTAX OCTET STRING + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Bootloader version number" + ::= { heliosip 5 } + +hipSipTable OBJECT-TYPE + SYNTAX SEQUENCE OF HipSipEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "State of SIP accounts" + ::= { heliosip 6 } + +hipSipEntry OBJECT-TYPE + SYNTAX HipSipEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "" + INDEX { hipIndex } + ::= { hipSipTable 1 } + +HipSipEntry ::= SEQUENCE { + hipIndex + Integer32, + hipPhoneNumber + OCTET STRING, + hipState + INTEGER, + hipRegistrationAt + IpAddress, + hipRegistrationTime + TimeTicks +} + +hipIndex OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Identifier of SIP account" + ::= { hipSipEntry 1 } + +hipPhoneNumber OBJECT-TYPE + SYNTAX OCTET STRING + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Registered phone number" + ::= { hipSipEntry 2 } + +hipState OBJECT-TYPE + SYNTAX INTEGER { + down (0), + goingup (1), + up (2), + goingdown (3) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current state of account" + ::= { hipSipEntry 3 } + +hipRegistrationAt OBJECT-TYPE + SYNTAX IpAddress + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Registrar IP address" + ::= { hipSipEntry 4 } + +hipRegistrationTime OBJECT-TYPE + SYNTAX TimeTicks + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Registration time" + ::= { hipSipEntry 5 } +END diff --git a/tests/data/heliosip.json b/tests/data/heliosip.json new file mode 100644 index 000000000000..c92dd9d610f8 --- /dev/null +++ b/tests/data/heliosip.json @@ -0,0 +1,262 @@ +{ + "os": { + "discovery": { + "devices": [ + { + "sysName": "2n-helios.company.com", + "sysObjectID": ".1.3.6.1.4.1.6530", + "sysDescr": "2N IP Force", + "sysContact": null, + "version": null, + "hardware": "", + "features": null, + "location": null, + "os": "heliosip", + "type": "appliance", + "serial": null, + "icon": "2n.svg" + } + ] + }, + "poller": { + "devices": [ + { + "sysName": "2n-helios.company.com", + "sysObjectID": ".1.3.6.1.4.1.6530", + "sysDescr": "2N IP Force", + "sysContact": "Peter Griffin", + "version": "2.22.0.31.8", + "hardware": "2N IP Force", + "features": null, + "location": "Front Door", + "os": "heliosip", + "type": "appliance", + "serial": "54-2354-8708", + "icon": "2n.svg" + } + ] + } + }, + "ports": { + "discovery": { + "ports": [ + { + "port_descr_type": null, + "port_descr_descr": null, + "port_descr_circuit": null, + "port_descr_speed": null, + "port_descr_notes": null, + "ifDescr": "Internet Adapter", + "ifName": "", + "portName": null, + "ifIndex": "1", + "ifSpeed": null, + "ifConnectorPresent": null, + "ifPromiscuousMode": null, + "ifHighSpeed": null, + "ifOperStatus": null, + "ifOperStatus_prev": null, + "ifAdminStatus": null, + "ifAdminStatus_prev": null, + "ifDuplex": null, + "ifMtu": null, + "ifType": null, + "ifAlias": "", + "ifPhysAddress": null, + "ifHardType": null, + "ifLastChange": "0", + "ifVlan": "", + "ifTrunk": null, + "ifVrf": "0", + "counter_in": null, + "counter_out": null, + "ignore": "0", + "disabled": "0", + "detailed": "0", + "deleted": "0", + "pagpOperationMode": null, + "pagpPortState": null, + "pagpPartnerDeviceId": null, + "pagpPartnerLearnMethod": null, + "pagpPartnerIfIndex": null, + "pagpPartnerGroupIfIndex": null, + "pagpPartnerDeviceName": null, + "pagpEthcOperationMode": null, + "pagpDeviceId": null, + "pagpGroupIfIndex": null, + "ifInUcastPkts": null, + "ifInUcastPkts_prev": null, + "ifInUcastPkts_delta": null, + "ifInUcastPkts_rate": null, + "ifOutUcastPkts": null, + "ifOutUcastPkts_prev": null, + "ifOutUcastPkts_delta": null, + "ifOutUcastPkts_rate": null, + "ifInErrors": null, + "ifInErrors_prev": null, + "ifInErrors_delta": null, + "ifInErrors_rate": null, + "ifOutErrors": null, + "ifOutErrors_prev": null, + "ifOutErrors_delta": null, + "ifOutErrors_rate": null, + "ifInOctets": null, + "ifInOctets_prev": null, + "ifInOctets_delta": null, + "ifInOctets_rate": null, + "ifOutOctets": null, + "ifOutOctets_prev": null, + "ifOutOctets_delta": null, + "ifOutOctets_rate": null, + "poll_prev": null, + "ifInNUcastPkts": null, + "ifInNUcastPkts_prev": null, + "ifInNUcastPkts_delta": null, + "ifInNUcastPkts_rate": null, + "ifOutNUcastPkts": null, + "ifOutNUcastPkts_prev": null, + "ifOutNUcastPkts_delta": null, + "ifOutNUcastPkts_rate": null, + "ifInDiscards": null, + "ifInDiscards_prev": null, + "ifInDiscards_delta": null, + "ifInDiscards_rate": null, + "ifOutDiscards": null, + "ifOutDiscards_prev": null, + "ifOutDiscards_delta": null, + "ifOutDiscards_rate": null, + "ifInUnknownProtos": null, + "ifInUnknownProtos_prev": null, + "ifInUnknownProtos_delta": null, + "ifInUnknownProtos_rate": null, + "ifInBroadcastPkts": null, + "ifInBroadcastPkts_prev": null, + "ifInBroadcastPkts_delta": null, + "ifInBroadcastPkts_rate": null, + "ifOutBroadcastPkts": null, + "ifOutBroadcastPkts_prev": null, + "ifOutBroadcastPkts_delta": null, + "ifOutBroadcastPkts_rate": null, + "ifInMulticastPkts": null, + "ifInMulticastPkts_prev": null, + "ifInMulticastPkts_delta": null, + "ifInMulticastPkts_rate": null, + "ifOutMulticastPkts": null, + "ifOutMulticastPkts_prev": null, + "ifOutMulticastPkts_delta": null, + "ifOutMulticastPkts_rate": null + } + ] + }, + "poller": { + "ports": [ + { + "port_descr_type": null, + "port_descr_descr": null, + "port_descr_circuit": null, + "port_descr_speed": null, + "port_descr_notes": null, + "ifDescr": "Internet Adapter", + "ifName": "Internet Adapter", + "portName": null, + "ifIndex": "1", + "ifSpeed": "100000000", + "ifConnectorPresent": null, + "ifPromiscuousMode": null, + "ifHighSpeed": null, + "ifOperStatus": "up", + "ifOperStatus_prev": null, + "ifAdminStatus": "up", + "ifAdminStatus_prev": null, + "ifDuplex": null, + "ifMtu": "1500", + "ifType": "ethernetCsmacd", + "ifAlias": "Internet Adapter", + "ifPhysAddress": "38432d31462d", + "ifHardType": null, + "ifLastChange": "0", + "ifVlan": "", + "ifTrunk": null, + "ifVrf": "0", + "counter_in": null, + "counter_out": null, + "ignore": "0", + "disabled": "0", + "detailed": "0", + "deleted": "0", + "pagpOperationMode": null, + "pagpPortState": null, + "pagpPartnerDeviceId": null, + "pagpPartnerLearnMethod": null, + "pagpPartnerIfIndex": null, + "pagpPartnerGroupIfIndex": null, + "pagpPartnerDeviceName": null, + "pagpEthcOperationMode": null, + "pagpDeviceId": null, + "pagpGroupIfIndex": null, + "ifInUcastPkts": "0", + "ifInUcastPkts_prev": "0", + "ifInUcastPkts_delta": null, + "ifInUcastPkts_rate": null, + "ifOutUcastPkts": "0", + "ifOutUcastPkts_prev": "0", + "ifOutUcastPkts_delta": null, + "ifOutUcastPkts_rate": null, + "ifInErrors": "0", + "ifInErrors_prev": "0", + "ifInErrors_delta": null, + "ifInErrors_rate": null, + "ifOutErrors": "0", + "ifOutErrors_prev": "0", + "ifOutErrors_delta": null, + "ifOutErrors_rate": null, + "ifInOctets": "0", + "ifInOctets_prev": "0", + "ifInOctets_delta": null, + "ifInOctets_rate": null, + "ifOutOctets": "0", + "ifOutOctets_prev": "0", + "ifOutOctets_delta": null, + "ifOutOctets_rate": null, + "poll_prev": null, + "ifInNUcastPkts": "0", + "ifInNUcastPkts_prev": "0", + "ifInNUcastPkts_delta": null, + "ifInNUcastPkts_rate": null, + "ifOutNUcastPkts": "0", + "ifOutNUcastPkts_prev": "0", + "ifOutNUcastPkts_delta": null, + "ifOutNUcastPkts_rate": null, + "ifInDiscards": "0", + "ifInDiscards_prev": "0", + "ifInDiscards_delta": null, + "ifInDiscards_rate": null, + "ifOutDiscards": "0", + "ifOutDiscards_prev": "0", + "ifOutDiscards_delta": null, + "ifOutDiscards_rate": null, + "ifInUnknownProtos": "0", + "ifInUnknownProtos_prev": "0", + "ifInUnknownProtos_delta": null, + "ifInUnknownProtos_rate": null, + "ifInBroadcastPkts": "0", + "ifInBroadcastPkts_prev": "0", + "ifInBroadcastPkts_delta": null, + "ifInBroadcastPkts_rate": null, + "ifOutBroadcastPkts": "0", + "ifOutBroadcastPkts_prev": "0", + "ifOutBroadcastPkts_delta": null, + "ifOutBroadcastPkts_rate": null, + "ifInMulticastPkts": "0", + "ifInMulticastPkts_prev": "0", + "ifInMulticastPkts_delta": null, + "ifInMulticastPkts_rate": null, + "ifOutMulticastPkts": "0", + "ifOutMulticastPkts_prev": "0", + "ifOutMulticastPkts_delta": null, + "ifOutMulticastPkts_rate": null + } + ] + } + } +} diff --git a/tests/snmpsim/heliosip.snmprec b/tests/snmpsim/heliosip.snmprec new file mode 100644 index 000000000000..a95742f83129 --- /dev/null +++ b/tests/snmpsim/heliosip.snmprec @@ -0,0 +1,74 @@ +1.3.6.1.2.1.1.1.0|4|2N IP Force +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.6530 +1.3.6.1.2.1.1.3.0|67|855600 +1.3.6.1.2.1.1.4.0|4|Peter Griffin +1.3.6.1.2.1.1.5.0|4|2n-helios.company.com +1.3.6.1.2.1.1.6.0|4|Front Door +1.3.6.1.2.1.1.7.0|2|72 +1.3.6.1.2.1.2.1.0|2|1 +1.3.6.1.2.1.2.2.1.1.1|2|1 +1.3.6.1.2.1.2.2.1.2.1|4|Internet Adapter +1.3.6.1.2.1.2.2.1.3.1|2|6 +1.3.6.1.2.1.2.2.1.4.1|2|1500 +1.3.6.1.2.1.2.2.1.5.1|66|100000000 +1.3.6.1.2.1.2.2.1.6.1|4|8C-1F-B4-00-F2-05 +1.3.6.1.2.1.2.2.1.7.1|2|1 +1.3.6.1.2.1.2.2.1.8.1|2|1 +1.3.6.1.2.1.2.2.1.9.1|67|0 +1.3.6.1.2.1.2.2.1.10.1|2|0 +1.3.6.1.2.1.2.2.1.11.1|2|0 +1.3.6.1.2.1.2.2.1.12.1|2|0 +1.3.6.1.2.1.2.2.1.13.1|2|0 +1.3.6.1.2.1.2.2.1.14.1|2|0 +1.3.6.1.2.1.2.2.1.15.1|2|0 +1.3.6.1.2.1.2.2.1.16.1|2|0 +1.3.6.1.2.1.2.2.1.17.1|2|0 +1.3.6.1.2.1.2.2.1.18.1|2|0 +1.3.6.1.2.1.2.2.1.19.1|2|0 +1.3.6.1.2.1.2.2.1.20.1|2|0 +1.3.6.1.2.1.2.2.1.21.1|2|0 +1.3.6.1.2.1.2.2.1.22.1|2|0 +1.3.6.1.2.1.11.1.0|65|5128 +1.3.6.1.2.1.11.2.0|65|5129 +1.3.6.1.2.1.11.3.0|65|0 +1.3.6.1.2.1.11.4.0|65|8 +1.3.6.1.2.1.11.5.0|65|0 +1.3.6.1.2.1.11.6.0|65|0 +1.3.6.1.2.1.11.8.0|65|0 +1.3.6.1.2.1.11.9.0|65|2204 +1.3.6.1.2.1.11.10.0|65|0 +1.3.6.1.2.1.11.11.0|65|0 +1.3.6.1.2.1.11.12.0|65|8 +1.3.6.1.2.1.11.13.0|65|3115 +1.3.6.1.2.1.11.14.0|65|0 +1.3.6.1.2.1.11.15.0|65|2308 +1.3.6.1.2.1.11.16.0|65|2826 +1.3.6.1.2.1.11.17.0|65|0 +1.3.6.1.2.1.11.18.0|65|5143 +1.3.6.1.2.1.11.19.0|65|0 +1.3.6.1.2.1.11.20.0|65|0 +1.3.6.1.2.1.11.21.0|65|2204 +1.3.6.1.2.1.11.22.0|65|0 +1.3.6.1.2.1.11.24.0|65|8 +1.3.6.1.2.1.11.25.0|65|122 +1.3.6.1.2.1.11.26.0|65|2816 +1.3.6.1.2.1.11.27.0|65|0 +1.3.6.1.2.1.11.28.0|65|5152 +1.3.6.1.2.1.11.29.0|65|1 +1.3.6.1.2.1.11.31.0|65|1 +1.3.6.1.2.1.11.32.0|65|0 +1.3.6.1.4.1.6530.11.1.0|4|2N IP Force +1.3.6.1.4.1.6530.11.2.0|4|555v3 +1.3.6.1.4.1.6530.11.3.0|4|54-2354-8708 +1.3.6.1.4.1.6530.11.4.0|4|2.22.0.31.8 +1.3.6.1.4.1.6530.11.5.0|4|2.8.0.17.1 +1.3.6.1.4.1.6530.11.6.1.1.1|2|1 +1.3.6.1.4.1.6530.11.6.1.1.2|2|2 +1.3.6.1.4.1.6530.11.6.1.2.1|4|2499 +1.3.6.1.4.1.6530.11.6.1.2.2|4| +1.3.6.1.4.1.6530.11.6.1.3.1|2|2 +1.3.6.1.4.1.6530.11.6.1.3.2|2|0 +1.3.6.1.4.1.6530.11.6.1.4.1|4|10.1.1.10 +1.3.6.1.4.1.6530.11.6.1.4.2|4| +1.3.6.1.4.1.6530.11.6.1.5.1|67|1522768058 +1.3.6.1.4.1.6530.11.6.1.5.2|67|0