mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
Finished dell rac support and updated mib
This commit is contained in:
@@ -19,5 +19,6 @@ include("includes/discovery/power.inc.php");
|
||||
include("includes/discovery/fanspeeds.inc.php");
|
||||
include("includes/discovery/charge.inc.php");
|
||||
include("includes/discovery/load.inc.php");
|
||||
include "includes/discovery/states.inc.php";
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
echo "States: ";
|
||||
|
||||
$include_dir = "includes/discovery/states";
|
||||
include("includes/include-dir.inc.php");
|
||||
|
||||
if ($debug) {
|
||||
print_r($valid['sensor']['states']);
|
||||
}
|
||||
|
||||
check_valid_sensors($device, 'states', $valid['sensor']);
|
||||
|
||||
echo "\n";
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
if ($device['os'] == "linux") {
|
||||
$oids = snmp_walk($device, "virtualDiskNumber", "-Oesqn", "StorageManagement-MIB");
|
||||
$main_oid = ".1.3.6.1.4.1.674.10893.1.20.140.1.1.";
|
||||
if ($debug) {
|
||||
echo $oids."\n";
|
||||
}
|
||||
$oids = trim($oids);
|
||||
if ($oids) {
|
||||
echo "Dell ";
|
||||
foreach (explode("\n", $oids) as $data) {
|
||||
list($oid,) = explode(" ", $data, 2);
|
||||
$state_oid = "4.1";
|
||||
$state_current = snmp_get($device, $main_oid.$state_oid, "-Oevq");
|
||||
discover_sensor($valid['sensor'], 'state', $device, $main_oid.$state_oid, "virtualDiskState.$state_oid", 'dell', 'Raid State', '1', '1', NULL, NULL, NULL, NULL, $state_current);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,8 @@ function poll_sensor($device, $class, $unit)
|
||||
sleep(1); # Give the TME some time to reset
|
||||
}
|
||||
}
|
||||
} elseif ($class == "state") {
|
||||
$sensor_value = trim(str_replace("\"", "", snmp_walk($device, $sensor['sensor_oid'], "-Oevq", "SNMPv2-MIB")));
|
||||
} else {
|
||||
if ($sensor['sensor_type'] == 'apc') {
|
||||
$sensor_value = trim(str_replace("\"", "", snmp_walk($device, $sensor['sensor_oid'], "-OUqnv", "SNMPv2-MIB:PowerNet-MIB$mib")));
|
||||
|
||||
@@ -22,7 +22,8 @@ $supported_sensors = array('current' => 'A',
|
||||
'temperature' => 'C',
|
||||
'dbm' => 'dBm',
|
||||
'charge' => '%',
|
||||
'load' => '%'
|
||||
'load' => '%',
|
||||
'state' => '#',
|
||||
);
|
||||
|
||||
foreach ($supported_sensors as $sensor_type => $sensor_unit)
|
||||
|
||||
Reference in New Issue
Block a user