Skip to content

Commit

Permalink
Added 2n device detection. (librenms#8490)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
theherodied authored and TheMysteriousX committed May 20, 2018
1 parent 2c21623 commit 8f61f2e
Show file tree
Hide file tree
Showing 6 changed files with 534 additions and 0 deletions.
16 changes: 16 additions & 0 deletions html/images/os/2n.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions 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
29 changes: 29 additions & 0 deletions includes/polling/os/heliosip.inc.php
@@ -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 changes: 142 additions & 0 deletions 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

0 comments on commit 8f61f2e

Please sign in to comment.