Added 2n device detection. (#8490)

* Added 2n Intercom mib

* Added 2n png logo

* Added 2n definitions yaml

* changed 2n logo. still needs to be changed later.

* changed 2n logo. still needs to be changed later 2.

* changed os name

* png not working

* trying svg. need to fix still.

* changed to object id detection

* added includes/polling/os/2nipforce.php

* named file correctly 2nipforce.inc.php

* added 2nipforce.snmprec

* added uptime to over graphs

* Changed to HeliosIP OS

* Changed to HeliosIP OS

* Removed Device Traffic from over graphs

* working on review requests 001

* Like so

* Create heliosip.json

* Update heliosip.json

Forgot to clear os cache

* Removed svg dimensions.

* Made 2n logo again.
This commit is contained in:
theherodied 2018-04-07 11:53:17 -04:00 committed by Tony Murray
parent c22b31506e
commit a81e2d25cd
6 changed files with 534 additions and 0 deletions

16
html/images/os/2n.svg Normal file
View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2080.000000 1217.000000" preserveAspectRatio="xMidYMid meet">
<g
transform="translate(0.000000,1217.000000) scale(0.100000,-0.100000)"
fill="#000000"
stroke="none"
id="g6"
style="fill:#005596;fill-opacity:1">
<path
d="M2825 12160 c-898 -5 -900 -5 -1000 -28 -404 -94 -679 -224 -970 -459 -131 -105 -196 -171 -318 -323 -126 -156 -198 -265 -276 -419 -141 -277 -219 -538 -243 -821 -19 -209 -19 -7834 -1 -8055 22 -257 101 -532 229 -787 251 -502 665 -892 1172 -1104 135 -56 337 -116 450 -133 175 -27 1860 -32 9221 -28 5290 3 7558 8 7682 15 195 13 357 47 545 118 717 266 1277 936 1439 1720 39 189 40 295 40 4219 -1 4063 -1 4052 -50 4282 -94 436 -330 864 -651 1179 -341 337 -834 577 -1261 616 -95 8 -2039 12 -7618 12 -4119 1 -7895 -1 -8390 -4z m5758 -2134 c201 -38 359 -102 532 -213 138 -90 320 -296 400 -454 43 -85 100 -248 120 -344 21 -102 31 -1021 17 -1495 -10 -302 -13 -346 -36 -449 -71 -311 -185 -526 -368 -696 -155 -143 -396 -276 -578 -320 -58 -14 -787 -185 -1620 -380 -833 -196 -1686 -396 -1895 -445 -209 -49 -545 -127 -746 -174 -509 -118 -545 -132 -596 -229 l-28 -52 0 -495 c0 -443 2 -502 18 -560 34 -125 97 -192 222 -239 126 -47 38 -46 2906 -43 l2706 2 6 -97 c9 -128 9 -973 0 -1092 l-6 -91 -2851 6 c-1568 3 -3002 9 -3186 14 -374 10 -431 19 -613 94 -357 148 -564 403 -669 821 l-23 90 0 960 c0 947 1 962 22 1075 75 391 227 663 465 833 127 91 346 188 538 240 92 25 1055 240 1390 311 91 19 298 65 460 101 162 37 428 95 590 130 296 65 740 162 1465 321 596 131 698 168 826 296 72 72 116 149 140 248 22 89 19 492 -4 595 -55 238 -190 386 -412 452 -56 16 -173 17 -1720 21 -1057 2 -1728 -1 -1846 -7 -240 -13 -298 -30 -381 -111 -73 -72 -89 -120 -95 -297 l-5 -133 -714 0 -714 0 0 403 c0 529 10 618 86 790 91 209 248 365 468 467 189 89 353 126 616 140 204 12 3471 30 4465 25 473 -2 574 -5 648 -19z m9785 17 l112 -6 -1 -2276 c-1 -1252 -4 -2771 -8 -3376 l-8 -1100 -25 -96 c-140 -522 -515 -865 -1085 -991 -96 -22 -113 -22 -878 -22 -848 0 -867 1 -1113 59 -208 50 -397 133 -533 235 -102 76 -241 228 -299 326 -182 308 -205 387 -350 1214 -296 1682 -310 1762 -470 2625 -28 149 -86 466 -130 705 -154 838 -163 875 -229 977 -71 111 -184 189 -331 230 -94 26 -571 26 -674 0 -154 -39 -259 -112 -316 -219 l-34 -63 -8 -290 c-4 -159 -3 -1345 2 -2635 5 -1290 10 -2531 10 -2759 l0 -414 -627 8 c-346 4 -628 8 -628 8 0 1 3 1514 6 3362 4 2457 9 3382 17 3441 16 110 55 242 103 343 88 188 254 393 394 488 165 111 369 187 547 203 146 13 1668 13 1814 0 280 -25 549 -155 755 -367 117 -121 170 -194 253 -354 152 -293 181 -406 376 -1464 33 -181 81 -436 105 -565 89 -472 199 -1070 320 -1730 176 -959 242 -1311 271 -1425 62 -251 195 -400 414 -462 57 -16 101 -18 352 -16 326 1 407 11 488 54 116 61 219 203 241 330 8 45 13 914 19 2964 4 1595 8 2935 9 2977 l1 77 33 4 c55 7 986 7 1105 0z"
id="path8"
style="fill:#005596;fill-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -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

View File

@ -0,0 +1,29 @@
<?php
/**
* heliosip.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 <http://www.gnu.org/licenses/>.
*
* @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'] : '';

142
mibs/2n/TEL2N-MIB Normal file
View File

@ -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

262
tests/data/heliosip.json Normal file
View File

@ -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
}
]
}
}
}

View File

@ -0,0 +1,74 @@
1.3.6.1.2.1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.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