mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
More Dell iDrac Additions
- Basic DRAC5 && iDRAC6 recognition - State sensor support based on earlier work from @laf
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
if (!$os) {
|
||||
|
||||
if (strstr($sysDescr, "Dell Out-of-band SNMP Agent for Remote Access Controller") || strstr($sysObjectId, "1.3.6.1.4.1.674.10892.5")) {
|
||||
#DRAC5, iDRAC6 - 1.3.6.1.4.1.674.10892.2
|
||||
#iDRAC7, iDRAC8 - 1.3.6.1.4.1.674.10892.5
|
||||
if (strstr($sysDescr, "Dell Out-of-band SNMP Agent for Remote Access Controller") || strstr($sysObjectId, "1.3.6.1.4.1.674.10892.2") || strstr($sysObjectId, "1.3.6.1.4.1.674.10892.5")) {
|
||||
$os = "drac";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'] == "drac") {
|
||||
$oids = snmp_walk($device, "virtualDiskNumber", "-Oesqn", "IDRAC-MIB-SMIv2");
|
||||
$main_oid = ".1.3.6.1.4.1.674.10892.5.5.1.20.140.1.1.";
|
||||
if ($debug) {
|
||||
echo $oids."\n";
|
||||
}
|
||||
$oids = trim($oids);
|
||||
if ($oids) {
|
||||
echo "Dell iDRAC";
|
||||
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", 'drac', 'Raid State', '1', '1', NULL, NULL, NULL, NULL, $state_current);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user