mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
actually commit powervault detection + minor polling
git-svn-id: http://www.observium.org/svn/observer/trunk@1357 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+2
-2
@@ -23,10 +23,10 @@ if($argv[1]) {
|
|||||||
if ( isPingable($argv[1])) {
|
if ( isPingable($argv[1])) {
|
||||||
if ( isSNMPable($argv[1], $community, $snmpver, $port)) {
|
if ( isSNMPable($argv[1], $community, $snmpver, $port)) {
|
||||||
$snmphost = trim(str_replace("\"", "", shell_exec($config['snmpget'] ." -m SNMPv2-MIB -Oqv -$snmpver -c $community $host:$port sysName.0")));
|
$snmphost = trim(str_replace("\"", "", shell_exec($config['snmpget'] ." -m SNMPv2-MIB -Oqv -$snmpver -c $community $host:$port sysName.0")));
|
||||||
if ($snmphost != "" || $snmphost && ($snmphost == $host || $hostshort = $host)) {
|
if ($snmphost == "" || ($snmphost && ($snmphost == $host || $hostshort = $host))) {
|
||||||
$return = createHost ($host, $community, $snmpver, $port);
|
$return = createHost ($host, $community, $snmpver, $port);
|
||||||
if($return) { echo($return . "\n"); } else { echo("Adding $host failed\n"); }
|
if($return) { echo($return . "\n"); } else { echo("Adding $host failed\n"); }
|
||||||
} else { echo("Given hostname does not match SNMP-read hostname!\n"); }
|
} else { echo("Given hostname does not match SNMP-read hostname ($snmphost)!\n"); }
|
||||||
} else { echo("Could not reach $host with SNMP\n"); }
|
} else { echo("Could not reach $host with SNMP\n"); }
|
||||||
} else { echo("Could not ping $host\n"); }
|
} else { echo("Could not ping $host\n"); }
|
||||||
} else { echo("Could not resolve $host\n"); }
|
} else { echo("Could not resolve $host\n"); }
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ function getHostOS($device)
|
|||||||
$sysDescr = snmp_get ($device, "sysDescr.0", "-Ovq");
|
$sysDescr = snmp_get ($device, "sysDescr.0", "-Ovq");
|
||||||
$sysObjectId = snmp_get ($device, "sysObjectID.0", "-Ovqn");
|
$sysObjectId = snmp_get ($device, "sysObjectID.0", "-Ovqn");
|
||||||
|
|
||||||
|
|
||||||
$dir_handle = @opendir($config['install_dir'] . "/includes/osdiscovery") or die("Unable to open $path");
|
$dir_handle = @opendir($config['install_dir'] . "/includes/osdiscovery") or die("Unable to open $path");
|
||||||
while ($file = readdir($dir_handle))
|
while ($file = readdir($dir_handle))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if(!$os) {
|
||||||
|
|
||||||
|
if(strstr($sysObjectId, ".1.3.6.1.4.1.674.10893.2.102")) { $os = "powervault"; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$version = trim(snmp_get($device, "1.3.6.1.4.1.674.10893.2.102.3.1.1.9.1", "-OQv", "", ""),'"');
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -101,6 +101,8 @@ $config['os']['powerconnect']['text'] = "Dell PowerConnect";
|
|||||||
$config['os']['powerconnect']['ifname'] = 1;
|
$config['os']['powerconnect']['ifname'] = 1;
|
||||||
$config['os']['powerconnect']['type'] = "network";
|
$config['os']['powerconnect']['type'] = "network";
|
||||||
|
|
||||||
|
$config['os']['powervault']['text'] = "Dell PowerVault";
|
||||||
|
|
||||||
$config['os']['airport']['type'] = "network";
|
$config['os']['airport']['type'] = "network";
|
||||||
$config['os']['airport']['text'] = "Apple AirPort";
|
$config['os']['airport']['text'] = "Apple AirPort";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user