Initial Gandi Packet Journey support

This commit is contained in:
Xavier Beaudouin
2016-03-03 15:52:44 +01:00
parent 51780c2123
commit 51cb9ef3d1
6 changed files with 29 additions and 3 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

+12
View File
@@ -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';
+14
View File
@@ -50,6 +50,20 @@ if (!$os) {
$os = 'airos-af';
}
}
else if (trim(snmp_get($device, 'GANDI-MIB::rxCounter.0', '-Osqnv', 'GANDI-MIB')) != '') {
$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");