mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
radlan + allied telesis mibs. add radlan os type. move dell powerconnect 3524 to radlan type. allied telesis at8000s is also radlan.
git-svn-id: http://www.observium.org/svn/observer/trunk@1396 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -4,6 +4,8 @@ if(!$os) {
|
||||
|
||||
if(strstr($sysObjectId, ".1.3.6.1.4.1.207")) { $os = "allied"; }
|
||||
|
||||
if(strstr($sysObjectId, ".1.3.6.1.4.1.207.1.4.126")) { unset($os); }
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
if (!$os)
|
||||
{
|
||||
if (strstr($sysDescr, "Neyland 24T")) { $os = "powerconnect"; } /* Powerconnect 5324 */
|
||||
else if (stristr($sysDescr, "PowerConnect ")) { $os = "powerconnect"; }
|
||||
#if (strstr($sysDescr, "Neyland 24T")) { $os = "powerconnect"; } /* Powerconnect 5324 */
|
||||
if (stristr($sysDescr, "PowerConnect ")) { $os = "powerconnect"; }
|
||||
else if (preg_match("/Dell.*Gigabit\ Ethernet/i",$sysDescr)) { $os = "powerconnect"; }
|
||||
}
|
||||
|
||||
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (!$os)
|
||||
{
|
||||
if (strstr($sysDescr, "Neyland 24T")) { $os = "radlan"; } /* Dell Powerconnect 5324 */
|
||||
if (strstr($sysDescr, "AT-8000")) { $os = "radlan"; } /* Allied Telesis AT-8000 */
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -2,13 +2,16 @@
|
||||
|
||||
echo("Doing Allied Telesyn AlliedWare ");
|
||||
|
||||
$serial = "";
|
||||
list(,$hardware,) = explode(" ", $hardware);
|
||||
$hardware = $sysDescr;
|
||||
$hardware = snmp_get($device, "atiswitchProductType.0", "-OsvQU", "+AtiSwitch-MIB", "+".$config['mib_dir']."/alliedtelesis");
|
||||
$version = snmp_get($device, "atiswitchSwVersion.0", "-OsvQU", "+AtiSwitch-MIB", "+".$config['mib_dir']."/alliedtelesis");
|
||||
$features = snmp_get($device, "atiswitchSw.0", "-OsvQU", "+AtiSwitch-MIB", "+".$config['mib_dir']."/alliedtelesis");
|
||||
|
||||
$features = "";
|
||||
# sysDescr.0 = STRING: "Allied Telesis AT-8624T/2M version 2.9.1-13 11-Dec-2007"
|
||||
# sysDescr.0 = STRING: "Allied Telesyn Ethernet Switch AT-8012M"
|
||||
# sysDescr.0 = STRING: "ATI AT-8000S" <------------------------------------- RADLAN ********
|
||||
# sysDescr.0 = STRING: "Allied Telesyn AT-8624T/2M version 2.8.1-02 05-Sep-2006"
|
||||
# sysDescr.0 = STRING: "AT-8126XL, AT-S21 version 1.4.2"
|
||||
|
||||
echo("$hardware - $version - $features - $serial\n");
|
||||
|
||||
include("hr-mib.inc.php");
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
|
||||
if($sysDescr == "Neyland 24T") {
|
||||
#$hardware = snmp_get($device, "productIdentificationVendor.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
$hardware = "Dell ".snmp_get($device, "productIdentificationDisplayName.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
$version = snmp_get($device, "productIdentificationVersion.0", "-Ovq", "Dell-Vendor-MIB");
|
||||
} else {
|
||||
$version = snmp_get($device, "rndBrgVersion.0", "-Ovq", "RADLAN-MIB", $config['mib_dir'].":".$config['mib_dir'] . "radlan/");
|
||||
$hardware = str_replace("ATI", "Allied Telesis", $sysDescr);
|
||||
}
|
||||
$features = snmp_get($device, "rndBaseBootVersion.00", "-Ovq", "RADLAN-MIB", $config['mib_dir'].":".$config['mib_dir'] . "radlan/");
|
||||
|
||||
$version = str_replace("\"","", $version);
|
||||
$features = str_replace("\"","", $features);
|
||||
$hardware = str_replace("\"","", $hardware);
|
||||
|
||||
|
||||
|
||||
|
||||
$cpurrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/radlan-cpu.rrd";
|
||||
$cpu_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -m RADLAN-rndMng -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'];
|
||||
$cpu_cmd .= " RADLAN-rndMng::rlCpuUtilDuringLastSecond.0";
|
||||
$cpu_usage = trim(shell_exec($cpu_cmd));
|
||||
|
||||
if (!is_file($cpurrd)) {
|
||||
$rrdcreate = shell_exec($config['rrdtool'] ." create $cpurrd --step 300 DS:LOAD:GAUGE:600:-1:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:1:2000 \
|
||||
RRA:AVERAGE:0.5:6:2000 \
|
||||
RRA:AVERAGE:0.5:24:2000 \
|
||||
RRA:AVERAGE:0.5:288:2000 \
|
||||
RRA:MAX:0.5:1:2000 \
|
||||
RRA:MAX:0.5:6:2000 \
|
||||
RRA:MAX:0.5:24:2000 \
|
||||
RRA:MAX:0.5:288:2000 \
|
||||
RRA:MIN:0.5:1:2000 \
|
||||
RRA:MIN:0.5:6:2000 \
|
||||
RRA:MIN:0.5:24:2000 \
|
||||
RRA:MIN:0.5:288:2000");
|
||||
}
|
||||
|
||||
rrdtool_update($cpurrd, "N:$cpu_usage");
|
||||
|
||||
?>
|
||||
@@ -114,6 +114,11 @@ $config['os']['powerconnect']['ifname'] = 1;
|
||||
$config['os']['powerconnect']['type'] = "network";
|
||||
$config['os']['powerconnect']['icon'] = "dell";
|
||||
|
||||
$config['os']['radlan']['text'] = "Radlan";
|
||||
$config['os']['radlan']['ifname'] = 1;
|
||||
$config['os']['radlan']['type'] = "network";
|
||||
|
||||
|
||||
$config['os']['powervault']['text'] = "Dell PowerVault";
|
||||
$config['os']['powervault']['icon'] = "dell";
|
||||
|
||||
@@ -183,6 +188,7 @@ $config['os']['ies']['icon'] = "zyxel";
|
||||
|
||||
$config['os']['allied']['text'] = "AlliedWare";
|
||||
$config['os']['allied']['type'] = "network";
|
||||
$config['os']['allied']['ifname'] = 1;
|
||||
|
||||
$config['os']['mgeups']['text'] = "MGE UPS";
|
||||
$config['os']['mgeups']['group'] = "ups";
|
||||
@@ -295,6 +301,7 @@ if(!$config['mibdir'])
|
||||
{
|
||||
$config['mibdir'] = $config['install_dir']."/mibs/";
|
||||
}
|
||||
$config['mib_dir'] = $config['mibdir'];
|
||||
|
||||
if(isset($config['enable_nagios']) && $config['enable_nagios']) {
|
||||
$nagios_link = mysql_connect($config['nagios_db_host'], $config['nagios_db_user'], $config['nagios_db_pass']);
|
||||
|
||||
Reference in New Issue
Block a user