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:
Tom Laermans
2010-07-15 17:21:02 +00:00
parent 265a54e462
commit 3f3b6c1c86
5 changed files with 18 additions and 3 deletions
+2 -2
View File
@@ -23,10 +23,10 @@ if($argv[1]) {
if ( isPingable($argv[1])) {
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")));
if ($snmphost != "" || $snmphost && ($snmphost == $host || $hostshort = $host)) {
if ($snmphost == "" || ($snmphost && ($snmphost == $host || $hostshort = $host))) {
$return = createHost ($host, $community, $snmpver, $port);
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 ping $host\n"); }
} else { echo("Could not resolve $host\n"); }