mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #3142 from xbeaudouin/pktj
Gandi Packet Journey support.
This commit is contained in:
BIN
html/images/os/gandi.png
Normal file
BIN
html/images/os/gandi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -228,6 +228,18 @@ $config['os'][$os]['over'][1]['text'] = 'Processor Usage';
|
||||
$config['os'][$os]['over'][2]['graph'] = 'device_mempool';
|
||||
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';
|
||||
|
||||
$os = 'pktj';
|
||||
$config['os'][$os]['type'] = 'network';
|
||||
$config['os'][$os]['group'] = 'unix';
|
||||
$config['os'][$os]['text'] = 'Gandi Packet Journey';
|
||||
$config['os'][$os]['icon'] = 'gandi';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
|
||||
$config['os'][$os]['over'][1]['graph'] = 'device_processor';
|
||||
$config['os'][$os]['over'][1]['text'] = 'Processor Usage';
|
||||
$config['os'][$os]['over'][2]['graph'] = 'device_mempool';
|
||||
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';
|
||||
|
||||
// Other Unix-based OSes here please.
|
||||
$os = 'freebsd';
|
||||
$config['os'][$os]['type'] = 'server';
|
||||
|
||||
@@ -50,6 +50,20 @@ if (!$os) {
|
||||
$os = 'airos-af';
|
||||
}
|
||||
}
|
||||
else if (snmp_get($device, 'GANDI-MIB::rxCounter.0', '-Osqnv', 'GANDI-MIB') !== false) {
|
||||
$os = 'pktj';
|
||||
$pktj_mibs = array (
|
||||
"rxCounter" => "GANDI-MIB", // RX Packets
|
||||
"txCounter" => "GANDI-MIB", // TX Packets
|
||||
"dropCounter" => "GANDI-MIB", // Dropped counters
|
||||
"acldropCounter" => "GANDI-MIB", // ACL Dropped counter
|
||||
"ratedropCounter" => "GANDI-MIB", // Rate Dropped counter
|
||||
"KNIrxCounter" => "GANDI-MIB", // KNI RX counter
|
||||
"KNItxCounter" => "GANDI-MIB", // KNI TX counter
|
||||
"KNIdropCounter" => "GANDI-MIB", // KNI DROP counter
|
||||
);
|
||||
register_mibs($device, $pktj_mibs, "include/discovery/os/linux.inc.php");
|
||||
}
|
||||
else {
|
||||
// Check for Synology DSM
|
||||
$hrSystemInitialLoadParameters = trim(snmp_get($device, 'HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0', '-Osqnv'));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// LMSensors Fanspeeds
|
||||
if ($device['os'] == 'linux') {
|
||||
if ($device['os'] == 'linux' || $device['os'] == 'pktj') {
|
||||
$oids = snmp_walk($device, 'lmFanSensorsDevice', '-OsqnU', 'LM-SENSORS-MIB');
|
||||
d_echo($oids."\n");
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
if ($device['os'] == 'linux') {
|
||||
if ($device['os'] == 'linux' || $device['os'] == 'pktj') {
|
||||
$oids = snmp_walk($device, 'lmTempSensorsDevice', '-Osqn', 'LM-SENSORS-MIB');
|
||||
d_echo($oids."\n");
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// LMSensors Voltages
|
||||
if ($device['os'] == 'linux') {
|
||||
if ($device['os'] == 'linux' || $device['os'] == 'pktj') {
|
||||
$oids = snmp_walk($device, 'lmVoltSensorsDevice', '-OsqnU', 'LM-SENSORS-MIB');
|
||||
d_echo($oids."\n");
|
||||
|
||||
|
||||
137
mibs/GANDI-MIB
Normal file
137
mibs/GANDI-MIB
Normal file
@@ -0,0 +1,137 @@
|
||||
GANDI-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Counter64
|
||||
FROM SNMPv2-SMI
|
||||
enterprises
|
||||
FROM RFC1155-SMI
|
||||
DisplayString
|
||||
FROM SNMPv2-TC;
|
||||
|
||||
gandiMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "201510301800Z"
|
||||
ORGANIZATION "Gandi SAS - www.gandi.net"
|
||||
CONTACT-INFO
|
||||
"63-65 Boulevard Massena
|
||||
75013 PARIS
|
||||
FRANCE
|
||||
|
||||
noc@gandi.net"
|
||||
DESCRIPTION
|
||||
"The MIB module describe our SNMP Objects"
|
||||
::= { enterprises 26384 }
|
||||
|
||||
pktjTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF pktjTable
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The Packet Journey table OID."
|
||||
::= { gandiMIB 1 }
|
||||
|
||||
statTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF statTable
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Packet Journey statistics OID."
|
||||
::= { pktjTable 1 }
|
||||
|
||||
totalTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF totalTable
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Total counters"
|
||||
::= { statTable 1 }
|
||||
|
||||
packetsCounters OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF packetsCounters
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"RX and TX counters passed into DPDK"
|
||||
::= { totalTable 1 }
|
||||
|
||||
rxCounter OBJECT-TYPE
|
||||
SYNTAX Counter64
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"RX packets"
|
||||
::= { packetsCounters 0 }
|
||||
|
||||
txCounter OBJECT-TYPE
|
||||
SYNTAX Counter64
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"TX packets"
|
||||
::= { packetsCounters 1 }
|
||||
|
||||
|
||||
dropCounters OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF dropCounters
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Dropped packets counters passed into DPDK"
|
||||
::= { totalTable 2 }
|
||||
|
||||
dropCounter OBJECT-TYPE
|
||||
SYNTAX Counter64
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Dropped counter"
|
||||
::= { dropCounters 0 }
|
||||
|
||||
acldropCounter OBJECT-TYPE
|
||||
SYNTAX Counter64
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"ACL Dropped counter"
|
||||
::= { dropCounters 1 }
|
||||
|
||||
ratedropCounter OBJECT-TYPE
|
||||
SYNTAX Counter64
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Rate Dropped counter"
|
||||
::= { dropCounters 2 }
|
||||
|
||||
kniCounters OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF kniCounters
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"KNI counters"
|
||||
::= { totalTable 3 }
|
||||
|
||||
KNIrxCounter OBJECT-TYPE
|
||||
SYNTAX Counter64
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"KNI RX counter"
|
||||
::= { kniCounters 0 }
|
||||
|
||||
KNItxCounter OBJECT-TYPE
|
||||
SYNTAX Counter64
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"KNI TX counter"
|
||||
::= { kniCounters 1 }
|
||||
|
||||
KNIdropCounter OBJECT-TYPE
|
||||
SYNTAX Counter64
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"KNI DROP counter"
|
||||
::= { kniCounters 2 }
|
||||
|
||||
END
|
||||
Reference in New Issue
Block a user