Skip to content

Commit

Permalink
newdevice: Add support for Halon Gateway (#6716)
Browse files Browse the repository at this point in the history
newdevice: Add support for Halon Gateway
  • Loading branch information
Rosiak authored and murrant committed May 24, 2017
1 parent 88e71a5 commit 88a490a
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 0 deletions.
3 changes: 3 additions & 0 deletions html/images/os/halon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions includes/definitions/halon.yaml
@@ -0,0 +1,9 @@
os: halon
text: Halon
type: appliance
over:
- { graph: device_processor, text: 'Processor Usage' }
- { graph: device_ucd_memory, text: 'Memory Usage' }
discovery:
- sysDescr:
- Halon
15 changes: 15 additions & 0 deletions includes/polling/os/halon.inc.php
@@ -0,0 +1,15 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2017 Søren Friis Rosiak <sorenrosiak@gmail.com>
* 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. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/

$explodeddata = explode("Halon ", $poll_device['sysDescr']);
$version = $explodeddata['1'];
$serial = trim(snmp_get($device, 'HALON-SP-MIB::serialNumber.0', '-OQv'), '"');
128 changes: 128 additions & 0 deletions mibs/halon/HALON-SP-MIB
@@ -0,0 +1,128 @@
HALON-SP-MIB DEFINITIONS ::= BEGIN
IMPORTS
OBJECT-TYPE, MODULE-IDENTITY, enterprises,
Counter64, Integer32
FROM SNMPv2-SMI;

halonSecuritySP MODULE-IDENTITY
LAST-UPDATED "201302061107Z"
ORGANIZATION "Halon Security"
CONTACT-INFO "http://www.halon.se"
DESCRIPTION "SNMP MIB for Halon"

REVISION "201302071132Z"
DESCRIPTION "Initial release"
::= { halonSecurityProducts 1 }


halonSecurity OBJECT IDENTIFIER ::= { enterprises 33234 }

halonSecurityProducts OBJECT IDENTIFIER ::= { halonSecurity 1 }

halonSecuritySPObjects OBJECT IDENTIFIER ::= { halonSecuritySP 1 }

serialNumber OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Serial number"
::= { halonSecuritySPObjects 1 }

configurationRevision OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Running configuration revision"
::= { halonSecuritySPObjects 2 }

mailQueueLength OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Length of mail queue to be delivered"
::= { halonSecuritySPObjects 3 }

quarantinedMessages OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Messages in quarantine"
::= { halonSecuritySPObjects 4 }

statTable OBJECT-TYPE
SYNTAX SEQUENCE OF StatEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Table containing statistics"
::= { halonSecuritySPObjects 5 }

statEntry OBJECT-TYPE
SYNTAX StatEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Statistic entry"
INDEX {
statKey1Index,
statKey2Index,
statKey3Index
}
::= { statTable 1 }

StatEntry ::= SEQUENCE {
statKey1Index
OCTET STRING,
statKey2Index
OCTET STRING,
statKey3Index
OCTET STRING,
statCount
Counter64,
statCreated
Integer32,
statUpdated
Integer32
}

statKey1Index OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Key1"
::= { statEntry 1 }

statKey2Index OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Key2"
::= { statEntry 2 }

statKey3Index OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Key3"
::= { statEntry 3 }

statCount OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Counter value"
::= { statEntry 4 }

statCreated OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Unix timestamp when created"
::= { statEntry 5 }

statUpdated OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Unix timestamp when last updated"
::= { statEntry 6 }

END
2 changes: 2 additions & 0 deletions tests/snmpsim/halon.snmprec
@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Halon 4.1-teamy-amd64
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.8

0 comments on commit 88a490a

Please sign in to comment.